$(document).ready(function(){jQuery.fn.exists=function(){return jQuery(this).length>0};function b(j){var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.$!;:-_#";for(var h=0;h<j.length;h++){}return true}function a(n,j){var l=0;var g=100;var h=7;var o=g/h;var m="0123456789";if(d(n,m)){l++}m="abcdefghijklmnopqrstuvwxyz";if(d(n,m)){l++}m="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(d(n,m)){l++}if(n.length<6){l=0}if(n.length>=6){l++}if(n.length>=8){l++}if(n.length>=10){l++}var k=l*o;if(k>g){k=g}return Math.ceil(k)}function d(g,h){for(i=0;i<g.length;i++){if(h.indexOf(g.charAt(i))>-1){return true}}return false}$("input[type=password], input[type=text], textarea").filter(".autoclear").each(function(){var g=this.value;$(this).focus(function(){if($(this).attr("readonly")){$(this).select();return}if(this.value==g){this.value=""}});$(this).blur(function(){if(this.value==""){this.value=g}})});$("#registerForm").validationEngine({validationEventTriggers:"keyup blur",inlineValidation:true});$("#loginForm, #pwlostForm, #changepwForm, #emailChangeForm, #resendactivForm, #lostPasswordCodeForm, #recruitMailForm, #creationForm, #captchaForm").validationEngine({validationEventTriggers:"blur",inlineValidation:true});$("#registerForm input").keyup(function(){if(!$.validationEngine.loadValidation(this)){if(!$(this).parent().has(".valid-check").length){$(this).after('<div class="valid-check"></div>')}}else{$(this).parent().find(".valid-check").remove()}});$("#registerForm #ignoreTransferCode").change(function(){if($("#ignoreTransferCode:checked").length){$("#transfercode-register-area").hide();$("#transfercode").removeClass("validate[required]");$(".transfercodeformError").fadeOut(150,function(){$(this).remove()})}else{$("#transfercode-register-area").show();$("#transfercode").addClass("validate[required]")}});var c=function(){$("#checkerror label").toggleClass("green")};if($("#tac:checked").length){c()}$("#tac").click(c);var e="";var f=8;$("#password, #newPassword").keyup(function(){$("#validChar").text("");var g=$(this).val();if(!b(g)){$("#validChar").text($("#txtInvalidChar").text());return}if(g.length>=8){$("#securePwd .valid-icon").removeClass("invalid");$("#securePwd").closest(".formError").addClass("valid")}else{$("#securePwd .valid-icon").addClass("invalid");$("#securePwd").closest(".formError").removeClass("valid")}e=a($(this).val(),f);if(e){$("#securePwdBar").css({width:e+"%"});if(e>69){$("#securePwd #securePwdBar").css("background-position","0 -39px")}else{if(e>41){$("#securePwd #securePwdBar").css("background-position","0 -26px")}else{if(e<41){$("#securePwd #securePwdBar").css("background-position","0px 0px !important")}else{$("#securePwd #securePwdBar").css("background-position","0px 0px")}}}}else{$("#securePwdBar").css({width:0});$("#securePwd .valid-icon").addClass("invalid")}if((e>49)&&(g.length<5)){$("#securePwdBar").css({width:"48px","background-position":"0px 0px"})}});$("#submitBtn").click(function(){var g=$(this).parent().validationEngine({returnIsValid:true});if(g==true){}});$("a#single_image").fancybox();$("a#popupChar").fancybox({autoDimensions:false,width:300,height:200,padding:0,scrolling:"no",overlayColor:"#000",overlayOpacity:0.8,overlayShow:true,hideOnContentClick:true})});function showScreenshots(b){b=parseInt(b);var a="/cdn/img/screenshots/";Slimbox.open([[a+"screenshot-gallery-1.jpg",""],[a+"screenshot-gallery-2.jpg",""],[a+"screenshot-gallery-3.jpg",""],[a+"screenshot-gallery-4.jpg",""],[a+"screenshot-gallery-5.jpg",""],[a+"screenshot-gallery-6.jpg",""],[a+"screenshot-gallery-7.jpg",""],[a+"screenshot-gallery-8.jpg",""]],b)}function showIndexScreenshots(b){b=parseInt(b);var a="/cdn/img/screenshots/";Slimbox.open([[a+"screenshot-index-1.jpg",""],[a+"screenshot-index-2.jpg",""],[a+"screenshot-index-3.jpg",""],[a+"screenshot-index-4.jpg",""]],b)}function showWallpapers(a){a=parseInt(a);var b="/cdn/img/wallpapers/";Slimbox.open([[b+"wallpaper-1.jpg",""],[b+"wallpaper-2.jpg",""],[b+"wallpaper-3.jpg",""],[b+"wallpaper-4.jpg",""],[b+"wallpaper-5.jpg",""],[b+"wallpaper-6.jpg",""],[b+"wallpaper-7.jpg",""],[b+"wallpaper-8.jpg",""]],a)}function submitEnter(c,b){var a;if(window.event){a=window.event.keyCode}else{if(c){a=c.which}else{return true}}if(a==13){document.forms[b].submit();return false}else{return true}}function setCookie(c,d,a){var b=new Date();b.setDate(b.getDate()+a);document.cookie=c+"="+escape(d)+"; path=/; expires="+b.toGMTString()+";"};