$(document).ready(function(){
$("#left-menu-fixed-guest").hover(function(){
$("#left-menu-fixed-guest").animate({"left": "0%"}, 300);
},function(){
$("#left-menu-fixed-guest").animate({"left": "-4%"}, 300);
});
$("#left-menu-fixed-user").hover(function(){
$("#left-menu-fixed-user").animate({"left": "0%"}, 300);
},function(){
$("#left-menu-fixed-user").animate({"left": "-4%"}, 300);
});
$("#topanimateleftmenu").click(function(){
$("#left-menu-fixed-guest").animate({"top": "-=15px"}, 300);
$("#left-menu-fixed-user").animate({"top": "-=15px"}, 300);
});
$("#bottomanimateleftmenu").click(function(){
$("#left-menu-fixed-guest").animate({"top": "+=15px"}, 300);
$("#left-menu-fixed-user").animate({"top": "+=15px"}, 300);
});
$(".bg-search").toggle(function(){
$("#bg-search").show(2000);
},function(){
$("#bg-search").hide(2000);
});
$("#searchkon").click(function () {
$('#searcher').animate({marginTop:'10px',}, 200);
$('#searcher').animate({marginTop:'0px',}, 200);
$('#searcher').animate({marginTop:'50px',}, 300);
$('#searcher').animate({marginTop:'0px',top:'-1000px'}, 900);
$("#searchkonaja").animate({bottom:"80%"},3000);
});


$("#vip-click").click(function () {
$('#vip-close').fadeIn(700);
$('#vip-close2').fadeIn(700);
$('.vip-detail').fadeIn(1300);
});
$("#closepopupie").click(function () {
$('.ie6warn').fadeOut(700);
});
$("#vip-close").click(function () {
$('#vip-close').fadeOut(700);
$('#vip-close2').fadeOut(700);
$('.vip-detail').fadeOut(1300);
});
$("#vip-close2").click(function () {
$('#vip-close').fadeOut(700);
$('#vip-close2').fadeOut(700);
$('.vip-detail').fadeOut(1300);
});

$("#vpn-click").click(function () {
$('#vpn-close').fadeIn(700);
$('#vpn-close2').fadeIn(700);
$('.vpn-detail').fadeIn(1300);
});

$("#vpn-close").click(function () {
$('#vpn-close').fadeOut(700);
$('#vpn-close2').fadeOut(700);
$('.vpn-detail').fadeOut(1300);
});
$("#vpn-close2").click(function () {
$('#vpn-close').fadeOut(700);
$('#vpn-close2').fadeOut(700);
$('.vpn-detail').fadeOut(1300);
});
$("#login-click").click(function () {
$('#login-close').fadeIn(700);
$('#login-close2').fadeIn(700);
$('.login-detail').fadeIn(1300);
});

$("#login-close").click(function () {
$('#login-close').fadeOut(700);
$('#login-close2').fadeOut(700);
$('.login-detail').fadeOut(1300);
});
$("#login-close2").click(function () {
$('#login-close').fadeOut(700);
$('#login-close2').fadeOut(700);
$('.login-detail').fadeOut(1300);
});

});

// ## Menu Jquery ## WTJ ## \\
$(document).ready(function(){					
$(" #nav ul ").css({display: "none"});
$(" #nav li").hover(function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
},function(){
$(this).find('ul:first').css({visibility: "hidden"});
});
});
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}

function submitRate(id,score){
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not supsearchwtj AJAX!");
return;
}
var theUL = document.getElementById('unit_ul'+id);
theUL.innerHTML = '<div class="loading"></div>';
var url="ajax.php?req=SubmitNewsRate&score="+score+"&id="+id;
xmlHttp.onreadystatechange=loadRate;
xmlHttp.open('GET', url, true);
xmlHttp.send(null);
}
function loadRate(){
if(xmlHttp.readyState==4)
{
var response = xmlHttp.responseText;
var update = new Array();
if(response.indexOf('|') != -1) {
update = response.split('|');
document.getElementById(update[0]).innerHTML = update[1];
}
}
}

jQuery(function(){
$("#searchajax").click(function(){
var searchVal = $("#searchtext").val();
if(searchVal == '') {
$('#ErrorSearch').animate({"right":'40%'}, 1000);
$('#ErrorSearch').fadeOut(900);
$('#ErrorSearch').fadeIn(300);
$('#ErrorSearch').fadeOut(900);
$('#ErrorSearch').fadeIn(300);
$('#ErrorSearch').animate({"right":'150%'}, 1000);
$('#ErrorSearch').animate({"top":'-150%'});
$('#ErrorSearch').animate({"right":'-150%'});
$('#ErrorSearch').animate({"top":'30%'});
}else{
$('#closesearch').show();
$('#resultsearchajax').show();
$( "#rsa" ).css({ height: ""});
$('#rsa').fadeIn(1000);
}
});
});
jQuery(function(){
$("#closesearch").click(function(){
$('#resultsearchajax').hide(300);
$('#closesearch').hide();
$('#rsa').animate({height:"15px"} ,500);
$('#rsa').fadeOut(1000);
});
});
// Search Ajax And Jquery By Www.Wtj.Ir وب طراحان جوان
var searchwtj=new GetXmlHttpObject();
function searchwtjload(){
if(searchwtj.readyState==4){
document.getElementById("resultsearchajax").innerHTML=searchwtj.responseText;
}else{
document.getElementById("resultsearchajax").innerHTML='<center><img src="images/ajax-loader.gif"></center>';
}
}
function searchwtjfunction(){
var parm="";
var searchtext = document.getElementById("searchtext").value;
if(searchtext == ""){}else{
parm += "searchtext="+searchtext;
searchwtj.open("POST", "search.php", true);
searchwtj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
searchwtj.setRequestHeader("Connection", "close");
searchwtj.send(parm);
searchwtj.onreadystatechange=searchwtjload;
}
}

function LoadSlide(){
$.ajax({
type: "POST",
url: "tab-l.php",
data: '',
success: function (responseText) {
var ObjCss = {
'opacity' : 0,
'display' : 'block'
}
$('.bgajaxload').css( "background","none" );
$("#slideloadajax").html(responseText);
$("#slideloadajax").css(ObjCss).animate({ opacity: 1.0 },{queue: false, duration: 1000});
}
});
}
window.onload = LoadSlide;




