google.load("jquery","1.3.2");$(document).ready(function(){$(document).konami(function(){if($("#egg")){if($("#egg").css("display")=="none"){$("#promo").hide();$("#egg").show()}else{$("#egg").hide();$("#promo").show()}}});$("#state-select").change(function(){var a=$(this).val();if(a!=""){$("#province-input").attr("disabled","disabled");$("#province-input").val("");$("#province").removeClass("required")}else{$("#province").addClass("required");$("#province-input").val("");$("#province-input").attr("disabled","")}});$(".search-results").tooltip({position:"right top",tip:".tooltip",offset:[120,-30],opacity:0.9,effect:"slide",slideFade:true,slideOffset:10,direction:"up",bounce:true}).dynamic({right:{direction:"right",bounce:true},bottom:{direction:"down",bounce:true},left:{direction:"left",bounce:true},top:{direction:"up",bounce:true}});$("#template-checkout-login :input").tooltip({position:"center left",tip:".tooltip",offset:[210,-290],opacity:0.9,effect:"slide",slideFade:true,slideOffset:10,direction:"right",bounce:true}).dynamic({right:{direction:"right",bounce:true},bottom:{direction:"right",bounce:true},left:{direction:"left",bounce:true},top:{direction:"right",bounce:true}});$("#template-checkout-info :input").tooltip({position:"right",tip:".tooltip",opacity:0.9,effect:"slide",slideFade:true,slideOffset:10,direction:"right",bounce:true}).dynamic({right:{direction:"right",bounce:true},bottom:{direction:"right",bounce:true},left:{direction:"left",bounce:true},top:{direction:"right",bounce:true}});$("#password_check").passStrength({userid:"#username",verify:"#password_verify",messageloc:1});$("#password_check_no_verify").passStrength({userid:"#username",messageloc:1});$(".boxgrid.captionfull").hover(function(){$(".cover",this).stop().animate({top:"0px"},{queue:false,duration:160})},function(){$(".cover",this).stop().animate({top:"-100px"},{queue:false,duration:160})});$("a[rel*=gallery]").lightBox({fixedNavigation:true});$("#showcase").click(function(){centerPopup("showcase_popup");loadPopup("showcase_popup")});$(".showcase").click(function(){var a=$(this).attr("rel");centerPopup("showcase_popup_"+a);loadPopup("showcase_popup_"+a)});$("#close_popup").click(function(){disablePopup()});$(".close_popup").click(function(){disablePopup()});$("a#add_to_cart").attr({rel:"nofollow"});$("div#loader").ajaxStart(function(){$(this).show()});$("div#loader").ajaxStop(function(){$(this).hide()});$("form#testimonial").submit(function(){var c=this;var f=c.first.value+"";var n=c.last.value+"";var b=c.organization.value+"";var a=c.url.value+"";var l=c.submitted.value+"";var k=c.math.value+"";var m=c.submitcaptcha.value+"";var d=c.testimonial.value+"";var g=c.lastname.value+"";var h=c.isCustom.checked;var j=c.isCustom.checked;var e="first="+f+"&last="+n+"&organization="+b+"&url="+a+"&isTemplate="+h+"&isCustom="+j+"&submitted="+l+"&math="+k+"&submitcaptcha="+m+"&lastname="+g+"&testimonial="+d;$.ajax({type:"GET",url:"../ajax/testimonial.php",data:e,dataType:"text",async:true,success:function(o){if(!o){o="<p>There was a problem submitting the testimonial, please try again...</p>"}o=o+"<br />";$("div#message").html(o);$("div#message p").addClass("message");$("input#submit").disabled=false},error:function(q,o,p){msg="<p>There was a problem submitting the testimonial, please try again...</p>";msg=msg+"<p>"+o;msg=msg+"<br />";$("div#message").html(msg);$("div#message p").addClass("message");$("input#submit").disabled=false}});return false});$("form#contactForm").submit(function(){var f=this;var h="SECOgaming support:  ";var g="Support";var c=escape(f.name.value+"");var b=escape(f.email.value+"");var a=escape(f.url.value+"");var d=escape(f.message.value+"");var e="theSub="+h+"&name="+c+"&url="+a+"&mail_type="+g+"&mail_from="+b+"&notes="+d;$.ajax({type:"GET",url:"../ajax/mail.php",data:e,dataType:"text",async:true,success:function(j){if(!j){j="<p>There was a problem sending the email, please try again...</p>"}j=j+"<br />";$("div#message").html(j);$("div#message p").addClass("message");$("input#submit").disabled=false},error:function(l,j,k){msg="<p>There was a problem sending the email, please try again...</p>";msg=msg+"<p>"+j;msg=msg+"<br />";$("div#message").html(msg);$("div#message p").addClass("message");$("input#submit").disabled=false}});return false});$("input[name='template_color']").change(function(){var c=$("input[name='template_color']:checked").val();var b=c.split("/");var a=$("a#template_preview1").attr("href").split("/");b=b[b.length-1].split(".");b=b[0];a[a.length-1]=b;a=a.join("/");$("a#template_preview1").attr({href:a});$("a#template_preview2").attr({href:a});$("img.template_preview").attr({src:c,alt:"Live Preview"})})});DA=(document.all)?1:0;function handle_error(){alert("\nNothing was printed. \n\nIf you do want to print this page, then\nclick on the printer icon in the toolbar above.");return true}function lookup(b,a){if(b.length==0){$("#suggestions").hide()}else{$.get(a+"/ajax/search.php",{queryString:""+b+""},function(c){if(c.length>0){$("#suggestions").show();$("#autoSuggestionsList").html(c)}})}}function fill(a){$("#inputString").val(a);$("#suggestions").hide()}function addNow(){$("form#add_to_cart").submit()}function addToCart(b,a,c){jConfirm("This item has configurable options, would you like to view them?","More options available!",function(d){if(d){$("form#add_to_cart").attr({action:c+"/detailed/"+b+"/"+a});$("input#more_info").val("1")}else{$("input#more_info").val("0")}$("input#addons").val($("input[name='template_color']:checked").attr("rel"));$("form#add_to_cart").submit()})}var preloadFlag=false;function preloadImages(){if(document.images){preloadFlag=true}}function popUpImage(URL,w,h){theWidth=w;theHeight=h;day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + theWidth + ',height=' + theHeight);")}function popUp(URL,w,h){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+"');")}function doSubmitSupport(){if(document.contactForm.name.value==""){alert("You must enter your name.");return false}else{if(document.contactForm.email.value==""){alert("You must enter your email address.");return false}else{if(document.contactForm.subject.value==""){alert("You must enter a subject.");return false}else{if(document.contactForm.notes.value==""){alert("You must enter a message.");return false}else{parser=document.contactForm.notes.value.split("\n");theNotes="";for(i=0;i<parser.length;i++){theNotes=theNotes+parser[i]+"<br />"}document.contactForm.submit.disabled=true;document.contactForm.theSub.value="SECOgaming.com Support:  "+document.contactForm.subject.value;document.contactForm.mail_from.value=document.contactForm.email.value;document.contactForm.theBody.value="<html><head></head><body><b>Name:</b> "+document.contactForm.name.value+"<br /><b>Email:</b> "+document.contactForm.email.value+"<br /><b>URL:</b> "+document.contactForm.url.value+"<br /><br /><b>Subject:</b> "+document.contactForm.subject.value+"<br /><b>Message:</b> "+theNotes+"</body></html>";return true}}}}return false}function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage:"en",gaTrack:true,layout:google.translate.TranslateElement.InlineLayout.SIMPLE},"google_translate_element")}(function(a){a.fn.konami=function(b,c){c=a.extend({},a.fn.konami.params,c);this.each(function(){var d=a(this);d.bind("konami",b).bind("keyup",function(e){a.fn.konami.checkCode(e,c,d)})});return this};a.fn.konami.params={code:[38,38,40,40,37,39,37,39,66,65],step:0};a.fn.konami.checkCode=function(b,c,d){if(b.keyCode==c.code[c.step]){c.step++}else{c.step=0}if(c.step==c.code.length){d.trigger("konami");c.step=0}}})(jQuery);
