function CheckCCType(n,t){var i="";t.IsValid=t.Value.length>0;t.IsValid&&(i=t.Value.substring(0,1),t.IsValid=i=="5"||i=="4"||i=="6"||i=="3")}function AgeValidation(n,t){if(t.IsValid=!isNaN(t.Value),t.IsValid){var i=parseInt(t.Value,10);i<18&&(alert("You must be 18 or over to register on our site."),window.location.href="../default.aspx")}}function reportError(n){alert("Error "+n.status+" -- "+n.statusText)}function ChangeColor(n,t){n.className=t=="1"?"but_hover":"but"}function post(n){var t=document.createElement("form");return t.action=n,t.method="POST",document.body.appendChild(t),t.submit(),t}function PopClose(n){var t=document.getElementById(n);t.style.visibility="hidden"}function PopOpen(n){var t=document.getElementById(n);t.style.visibility="visible";t.style.left="425px";t.style.top="245px"}function popUpFAQ(n){popUpFAQEx(n,"../")}function popUpFAQEx(n,t){window.open(t+"help/faq.aspx?faq="+n,"faq","toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=380")}function popUpCVVEx(n,t){n=n||"0";t=t||"/";window.open(t+"help/cvv.aspx?ptc="+n,"cvv_help","toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=380")}function popUpWindow(n,t,i,r){return window.open(n,t,"toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=1,width="+i+",height="+r)}function taLimit(n,t,i){var r=n,u=document.getElementById(i);if(r.value.length==t)return u.innerHTML="0",!1;r.value.length>t&&(r.value=r.value.substring(0,t));u.innerHTML=t-r.value.length}function replaceChars(n,t,i){for(temp=""+n;temp.indexOf(t)>-1;)pos=temp.indexOf(t),temp=""+(temp.substring(0,pos)+i+temp.substring(pos+t.length,temp.length));return temp}function reSizeImage(n){for(i=0;i<100;i++)x="";n.width>200&&(n.width=200);n.height>200&&(n.height=200)}function reSizeImageToSpecificSize(n,t,i){n.width>t&&(n.width=t);n.height>i&&(n.height=i)}function resizeImageToFit(n,t,i){var r=n.height,u=n.width;(hfactor=i/r,wfactor=t/u,$(n).removeAttr("height"),$(n).removeAttr("width"),hfactor>1&&wfactor>1)||(factor=Math.min(hfactor,wfactor),n.width=u*factor,n.height=r*factor)}function centerImageVertically(n,t,i){var r=n.height,u=n.width;hfactor=i/r;wfactor=t/u;hfactor>1&&wfactor>1&&(hfactor=1,wfactor=1);factor=Math.min(hfactor,wfactor);var o=u*factor,e=r*factor,f=(i-e)/2;$(n).css("margin-top",f);$(n).css("margin-bottom",f)}function post_to_url(n,t,i){var r,f,u;i=i||"post";r=document.createElement("form");r.setAttribute("method",i);r.setAttribute("action",n);for(f in t)u=document.createElement("input"),u.setAttribute("type","hidden"),u.setAttribute("name",f),u.setAttribute("value",t[f]),r.appendChild(u);document.body.appendChild(r);r.submit()}function resetDotNetScrollPosition(){var n=document.getElementById("__SCROLLPOSITIONX"),t=document.getElementById("__SCROLLPOSITIONY");n!=null&&t!=null&&(n.value=0,t.value=0)}function correctFlashDropdownProblem(){$('[id^="zone"]').find("*").each(function(){$(this).css("z-index","0")})}$(function(){correctFlashDropdownProblem()});var gb=function(n){var t={xldesktop:{breakpoint:1200},desktop:{breakpoint:992},tablet:{breakpoint:768},mobile:{breakpoint:480},oldHeader:{breakpoint:988},current:{size:Math.max(document.documentElement.clientWidth,window.innerWidth||0)}};return n.pageConfig=t,n}(gb||{}),gb=function(n){var t={Android:function(){return navigator.userAgent.match(/Android/i)},BlackBerry:function(){return navigator.userAgent.match(/BlackBerry/i)},iOS:function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return navigator.userAgent.match(/Opera Mini/i)},Windows:function(){return navigator.userAgent.match(/IEMobile/i)},any:function(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()}};return n.detectMobileDevice=t,n}(gb||{});$(function(){$(".accordion-toggle").on("click",function(){$(this).find(".glyphicon").toggleClass("glyphicon-menu-up glyphicon-menu-down")})});$(function(){$("#mobileMenuIcon").on("click",function(){$("#bs-example-navbar-collapse-1").hasClass("collapsing")||$("#mobileMenuIcon .icon-bar").toggleClass("active")})});$(function(){gb.detectMobileDevice.any()&&gb.detectMobileDevice.iOS()&&$(".play-store-icon").hide();gb.detectMobileDevice.any()&&gb.detectMobileDevice.Android()&&($(".play-store-icon").show(),$(".apple-store-icon").hide())});$(function(){var n=$("header"),t=$(".app-banner"),i,r,u;(gb.pageConfig.current.size>=gb.pageConfig.tablet.breakpoint||$(".v5")[0])&&n.css("position")!="relative"&&(u=n.outerHeight(),$(".main-content").css("margin-top",u));$(window).scroll(function(){var u=$("#btnBrowseCats").attr("aria-expanded")==="true";u?(n.addClass("undocked").css("top",0),t.addClass("undocked"),$(".main-content").css("margin-top",0)):i&&r&&(n.css("top",i),$(".main-content").css("margin-top",r));$(this).scrollTop()>1&&!u?(n.addClass("docked").removeClass("undocked"),t.addClass("docked").removeClass("undocked")):(n.removeClass("docked"),t.removeClass("docked"))});$(".browse").on("show.bs.dropdown",function(){i=n.css("top");r=$(".main-content").css("margin-top")})});$(function(){$(".dropdown-menu").on("click","li",function(n){var t=$(n.target).attr("href");t==="#"&&n.preventDefault();n.stopPropagation()})});$(function(){var n=$("header"),t=$(".app-banner"),i=$("header").outerHeight();$.cookie("alert")||(t.show(),(gb.pageConfig.current.size>=gb.pageConfig.tablet.breakpoint||$(".v5")[0])&&n.css("position")!="relative"&&(n.css("top",t.outerHeight()),$(".main-content").css("margin-top",t.outerHeight()+i)));$("#appBannerClose").on("click",function(){t.toggleClass("hidden");$.cookie("alert",!0,{path:"/"});n.css("top","0");(gb.pageConfig.current.size>=gb.pageConfig.tablet.breakpoint||$(".v5")[0])&&n.css("position")!="relative"&&$(".main-content").css("margin-top",i)})});$(function(){$(".currency").each(function(){if(this.getAttribute("min")){var n=Number(this.getAttribute("min"));jQuery.extend(jQuery.validator.messages,{min:"Please enter a dollar amount greater than or equal to $"+n.toFixed(2)})}})})