var confDel='Are you sure you want to delete?';jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires='; expires='+date.toUTCString()}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};var dat=new Date();var res=screen.width+'x'+screen.height;$.cookie("userTime",dat.getTime(),{expires:7,path:'/'});$.cookie("userRes",res,{expires:7,path:'/'});function selAvatar(aVal){jQuery("#mAvatar").html("<img src=\'_s/loading.gif\' alt=\'loading...\' />").load('aj/aMem/'+aVal+'/');jQuery('#memInfo').html("<span style=\"color: red;\">Your profile image is now set!</span>")}function swList(id){var oClas=document.getElementById("to"+id);if(oClas.className.match("toggle-close")){document.getElementById("to"+id).className="toggle-open";jQuery("#exp"+id).slideUp()}else{document.getElementById("to"+id).className="toggle-close";jQuery("#exp"+id).slideDown()}}function swList(id){var oClas=document.getElementById("to"+id);if(oClas.className.match("toggle-close")){document.getElementById("to"+id).className="toggle-open"}else{document.getElementById("to"+id).className="toggle-close"}jQuery("#exp"+id).slideToggle('normal')}function sComm(wre,wht){var txtVal=$("#sCommArea").val();if(txtVal==''||txtVal=='Write your comment here...'){alert("Please write comment!")}else{$.ajax({type:'POST',url:'comme.php',data:({wre:wre,wht:wht,msg:txtVal}),cache:false,success:function(htmLo){document.getElementById('sCommArea').value='Write your comment here...';jQuery('#listComm').append(htmLo);jQuery('ul#listComm li:last').fadeIn(1000);jQuery('ul#listComm li:last').effect("highlight",{color:"#99c0e1"},5000)}})}}function sMess(wre,mid){var sbjVal=$("#sbj").val();var txtVal=$("#sMessArea").val();if(txtVal==''){alert("Please write message!")}else{jQuery("#wrComm").html("<img src=\'_s/loading.gif\' alt=\'loading...\' />");$.ajax({type:'POST',url:'comme.php',data:({wre:wre,wht:'melMess',msg:txtVal,sbj:sbjVal,mid:mid}),cache:false,success:function(htmLo){$("#wrComm").html(htmLo)}})}}function likeThis(vWre,vId){jQuery("#vLike").load("aj/"+vWre+"/"+vId+"/")}function showPic(whichpic,thg){if(document.getElementById){jQuery(".galThumbs a").removeClass("current");jQuery("#thg"+thg).addClass("current");document.getElementById('galMainImg').src=whichpic.href;return false}else{return true}}function selMod(mVal){jQuery("#dispMod").html("<img src=\'_s/loading.gif\' alt=\'loading...\' />").load('ajload.php?wre=melModels&wht='+mVal)}function setAlCov(imId,wCov){jQuery('.capt > small').removeClass('confDel');jQuery('#hd'+imId).addClass('confDel');jQuery('.imgDef').html('Set as default image');jQuery('#iDe'+imId).html('<img src="/_s/i_check.png" alt="" /> <strong style="color: #2e9427;">Default image</strong>');jQuery("#reqBack").load("aj/"+wCov+"/"+imId+"/",null,function(){jQuery("#reqBack").effect("highlight",{color:"#99c0e1"},5000)})}function delIm(imId){if($('#hd'+imId).hasClass("confDel")){alert('You can`t delete image used as album cover!')}else{$('#srtItm_'+imId).addClass("confDel");if(confirm(confDel)){jQuery("#loi"+imId).html("<img src=\'_s/lib/ajaximg/load01.gif\' alt=\'loading...\' />");jQuery("#reqBack").load("aj/deImg/"+imId+"/",null,function(){$('#srtItm_'+imId).slideUp(700)})}else{$('#srtItm_'+imId).removeClass("confDel")}}}function delComMe(deId,deWre){$('#com'+deId).addClass("confDel");if(confirm(confDel)){jQuery("#lComm").load("aj/"+deWre+"/"+deId+"/",null,function(){$('#com'+deId).fadeOut(700)})}else{$('#com'+deId).removeClass("confDel")}}function delItm(itId,itWre){jQuery('#di'+itId).addClass("confDel");if(confirm(confDel)){jQuery("#it"+itId).html("<img src=\'_s/lib/ajaximg/load01.gif\' alt=\'loading...\' />");jQuery("#it"+itId).load("aj/"+itWre+"/"+itId+"/",null,function(){jQuery("#di"+itId).fadeOut('slow')})}else{jQuery('#di'+itId).removeClass("confDel")}}function shItm(vId,itWre){var shTxt=jQuery("#sht"+vId).html();jQuery("#it"+vId).load("aj/"+itWre+"/"+vId+"/",null,function(){$('#hidenItms').slideUp(700);if(shTxt=='Show'){jQuery("#sht"+vId).html('Hide').removeClass('warning')}else{jQuery("#sht"+vId).html('Show').addClass('warning')}})}
