function url(e){if($url_type=="rewrite"){return"/"+e+$rewrite_prefix}else if($url_type=="i"){return"?i="+e.replace(/\//,"&")}}function theme_url(e){if(e.substr(0,6)!="theme/"){return"/theme/"+$theme+"/"+e}else{return"/"+e}}function login(e){if(firstlogin==true){$("#password").val("");firstlogin=false}var t=e.username.value;if(t==""||t==" "){alert("لطفا نام خود را وارد کنید");return false}$.ajax({type:"POST",url:url("ajax/login/multi"),data:$(e).serialize(),success:function(e){switch(e){case"ok":top.location.href=url("chat");break;case"badname":alert("این نام در لیست سیاه قرار دارد");break;case"benn":alert("شما اجازه ورود به چتروم را ندارید");break;case"capacity":alert("ظرفیت چت روم پر است");break;case"running":$("#lay_pw").slideDown(1e3);$("#lay_gender").slideUp(1e3);break;case"passwh":$("#lay_pw").slideDown(1e3);$("#lay_hide").slideDown(1e3);$("#lay_gender").slideUp(1e3);break;case"pass":alert("کلمه عبور اشتباه است");break;default:alert(e);break}}});return false}(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(e){function t(e){return u.raw?e:encodeURIComponent(e)}function n(e){return u.raw?e:decodeURIComponent(e)}function r(e){return t(u.json?JSON.stringify(e):String(e))}function i(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{e=decodeURIComponent(e.replace(o," "))}catch(t){return}try{return u.json?JSON.parse(e):e}catch(t){}}function s(t,n){var r=u.raw?t:i(t);return e.isFunction(n)?n(r):r}var o=/\+/g;var u=e.cookie=function(i,o,a){if(o!==undefined&&!e.isFunction(o)){a=e.extend({},u.defaults,a);if(typeof a.expires==="number"){var f=a.expires,l=a.expires=new Date;l.setDate(l.getDate()+f)}return document.cookie=[t(i),"=",r(o),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=i?undefined:{};var h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;pبستن [x]';var o='
'+s+'
';$("body").append(o);$("#ad-"+e.ads[t].id+" img").load(function(){$(this).parent().parent().css({width:$(this).width()+"px",height:$(this).height()+20+"px"})});break;case"popup":case"newtab":if($("#popuplink").length==0){var o='';$("body").append(o)}if(!$("#popuplink").attr("ads"))var u=new Array;else{var u=$("#popuplink").attr("ads");u=u.split(",")}u.push(t);$("#popuplink").attr("ads",u.join(","));$("#popuplink").one("click",function(){if(r==true)return false;r=true;var t=$.cookie("Dads");if(typeof t=="undefined")t={};else if(typeof t=="string"){try{t=$.parseJSON(t)}catch(n){t={};t=$.cookie("Dads","")}}var i=$(this).attr("ads");i=i.split(",");for(var s=0;s!=i.length;s++){var o=e.ads[i[s]];if(o.inputs.cockie!=0){if(typeof t["ad-"+o.id]!="undefined"){continue}}if(o.type=="popup"){window.open(o.url,"link"+o.id,"height=400,width=600,scrollbars=yes");window.focus()}else if(o.type=="newtab"){window.open(o.url,"_blank");window.focus()}if(o.inputs.cockie!=0){t["ad-"+o.id]=o.inputs.cockie}}$("#popuplink").hide();$("#popuplink").remove();$.cookie("Dads",t)});break}}}})})