function getElementsByClassName(n,t){return n.getElementsByClassName?n.getElementsByClassName(t):document.querySelectorAll("."+t)}function lzInit(){for(var o=document.links,s=o.length,e,n,t;s--;)e=o[s],e.getAttribute("data-lightzap")!=null&&(e.onclick=function(){return lzStart(this)});for(var h=["IsFullScreen","FullScreen"],r=["CancelFullScreen","RequestFullScreen"],f,i,c="undefined",u=0;u<pfx.length&&!document[i];){for(f=0;f<h.length;){if(i=h[f],pfx[u]==""&&(i=i.substr(0,1).toLowerCase()+i.substr(1),r[0]=r[0].substr(0,1).toLowerCase()+r[0].substr(1),r[1]=r[1].substr(0,1).toLowerCase()+r[1].substr(1)),i=pfx[u]+i,c=typeof document[i],c!="undefined"){pfx=[pfx[u]+r[0],pfx[u]+r[1],i],u=2;break}f++}u++}$lightzap=document.createElement("div"),$lightzap.id="lightzap",$lightzap.style.display="none",document.body.appendChild($lightzap),n=document.createElement("div"),n.className="lz-bg",n.onclick=lzEnd,$lightzap.appendChild(n),$container=document.createElement("div"),$container.className="lz-container",$container.style.display="none",$lightzap.appendChild($container),n=document.createElement("div"),n.className="lz-loader",$container.appendChild(n),$image=document.createElement("img"),$image.className="lz-image",$container.appendChild($image),t=document.createElement("div"),t.className="lz-nav",$container.appendChild(t),n=document.createElement("a"),n.className="lz-prev",n.onclick=function(){return lzChangeImage(currentImageIndex+1),!1},t.appendChild(n),n=document.createElement("a"),n.className="lz-next",n.onclick=function(){return lzChangeImage(currentImageIndex-1),!1},t.appendChild(n),t=document.createElement("div"),t.className="lz-buttonContainer",$container.appendChild(t),n=document.createElement("a"),n.className="lz-button lz-more",n.onclick=function(){return getElementsByClassName($container,"lz-desc")[0].style.display=getElementsByClassName($container,"lz-desc")[0].style.display=="none"?"":"none",!1},t.appendChild(n),n=document.createElement("a"),n.className="lz-button lz-print",n.onclick=lzPrint,t.appendChild(n),n=document.createElement("a"),n.className="lz-button lz-download",n.onclick=lzDownload,n.target="_blank",t.appendChild(n),n=document.createElement("a"),n.className="lz-button lz-like",n.onclick=lzLike,t.appendChild(n),u!=3?pfx=!1:(n=document.createElement("div"),n.className="lz-button lz-fullScreen",n.onclick=function(){isfull?document[pfx[0]]():$lightzap[pfx[1]]()},t.appendChild(n)),n=document.createElement("a"),n.className="lz-button lz-close",n.onclick=lzEnd,t.appendChild(n),$lbContainer=document.createElement("div"),$lbContainer.className="lz-labelContainer",$container.appendChild($lbContainer),n=document.createElement("div"),n.className="lz-float lz-caption",$lbContainer.appendChild(n),n=document.createElement("div"),n.className="lz-float lz-desc",n.style.display="none",$lbContainer.appendChild(n),n=document.createElement("div"),n.className="lz-float lz-resolution",$lbContainer.appendChild(n),n=document.createElement("a"),n.className="lz-float lz-by",n.target="_blank",$lbContainer.appendChild(n),n=document.createElement("div"),n.className="lz-float lz-number",$lbContainer.appendChild(n)}function lzStart(n){var t,f,s,u,r,i;if(lzShowOthers(!1),lzSizeOverlay(),$lightzap.style.display="",$container.style.display="",window.onresize=lzSizeOverlay,marginWidth==-1&&(imgNotFound=window.getComputedStyle($image,"").getPropertyValue("background-image").replace("url(","").replace(")","").replace('"',"").replace('"',""),$image.style.backgroundImage="none",t=window.getComputedStyle($container,""),marginHeight=parseInt(t.getPropertyValue("margin-top"))+parseInt(t.getPropertyValue("margin-bottom"))+parseInt(t.getPropertyValue("padding-top"))+parseInt(t.getPropertyValue("padding-bottom"))+parseInt(t.getPropertyValue("border-top-width"))+parseInt(t.getPropertyValue("border-bottom-width")),marginWidth=parseInt(t.getPropertyValue("margin-left"))+parseInt(t.getPropertyValue("margin-right"))+parseInt(t.getPropertyValue("padding-left"))+parseInt(t.getPropertyValue("padding-right"))+parseInt(t.getPropertyValue("border-left-width"))+parseInt(t.getPropertyValue("border-right-width"))),album=[],r=0,n.getAttribute("data-lightzap")=="")lzReadAlbum(n);else for(var u=document.links,h=n.href,o=n.getAttribute("data-lightzap"),f=u.length,e=0;f--;)i=u[f],i.getAttribute("data-lightzap")!=null&&i.getAttribute("data-lightzap")==o&&(lzReadAlbum(i),i.href==n.href&&(r=e),e++);return lzChangeImage(r),!1}function lzReadAlbum(n){var i=!1,r=!1,u=!1,t=n.getAttribute("data-options");t!=null&&t.length>3&&(i=t.indexOf("download")!=-1,r=t.indexOf("like")!=-1,u=t.indexOf("print")!=-1),album.push({link:n.getAttribute("href"),title:n.getAttribute("title"),desc:n.getAttribute("data-desc"),by:n.getAttribute("data-by"),by_link:n.getAttribute("data-link"),download:i,print:u,like:r})}function lzChangeImage(n){document.onkeypress=lzKeyboardAction,getElementsByClassName($container,"lz-loader")[0].style.display="",getElementsByClassName($container,"lz-nav")[0].style.display="none",getElementsByClassName($container,"lz-buttonContainer")[0].style.display="none",$lbContainer.style.display="none",$image.className="lz-hide";var t=new Image;t.onload=function(){return $image.src=album[n].link,originalWidth=t.width,originalHeight=t.height,currentImageIndex=n,lzGetImageSize()},t.onerror=function(){return album[n].title=notfoundtext,album[n].link=imgNotFound,$image.src=album[n].link,originalWidth=256,originalHeight=256,currentImageIndex=n,lzGetImageSize()},t.src=album[n].link}function lzSizeOverlay(){var n,t;typeof window.innerWidth=="number"?(n=Math.min(window.innerWidth,document.body.clientWidth),t=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(n=document.documentElement.clientWidth,t=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(n=document.body.clientWidth,t=document.body.clientHeight),(windowWidth!=n||windowHeight!=t)&&(windowWidth=n,windowHeight=t,$lightzap.style.width=n,$lightzap.style.height=t,isfull=!1,pfx!=!1&&(isfull=typeof document[pfx[2]]=="function"?document[pfx[2]]():document[pfx[2]]),isfull||(isfull=windowWidth>=screen.width*.99&&windowHeight>=screen.height*.99),isfull?($lightzap.className="full-screen",$lightzap.style.width="",$lightzap.style.height="",$container.style.height="100%",getElementsByClassName($lightzap,"lz-bg")[0].onclick=null):(getElementsByClassName($lightzap,"lz-bg")[0].onclick=lzEnd,$lightzap.className="",$container.style.width="",$container.style.height=""),album.length>0&&lzGetImageSize())}function lzGetImageSize(){var i=windowWidth,r=windowHeight,n=originalWidth,t=originalHeight,u=$container.style,f=$image.style;isfull?(f=u,u=$image.style,pfx&&(i=screen.width,r=screen.height)):(i-=marginWidth,r-=marginHeight),n>i&&(t=i*t/n,n=i),t>r&&(n=r*n/t,t=r),f.top="0",f.left="0",f.width="",f.height="",u.top=(r-t)*.5+"px",u.left=(i-n)*.5+"px",u.width=n+"px",u.height=t+"px",lzShowImage()}function lzShowImage(){lzUpdateNav(),lzUpdateDetails();var n,t;album.length>currentImageIndex+1&&(n=new Image,n.src=album[currentImageIndex+1].link),currentImageIndex>0&&(t=new Image,t.src=album[currentImageIndex-1].link),setTimeout(function(){$image.className="lz-image",getElementsByClassName($container,"lz-nav")[0].style.display="",$lbContainer.style.display="",getElementsByClassName($container,"lz-buttonContainer")[0].style.display="",getElementsByClassName($container,"lz-loader")[0].style.display="none"},380)}function lzUpdateDetails(){var n=getElementsByClassName($lbContainer,"lz-number")[0];if(album.length>1?(n.textContent=imagetext+(album.length-currentImageIndex)+oftext+album.length,n.style.display=""):n.style.display="none",n=getElementsByClassName($lbContainer,"lz-caption")[0],album[currentImageIndex].title!=null&&album[currentImageIndex].title!=""){if(n.textContent=album[currentImageIndex].title,n.style.display="",album[currentImageIndex].title==notfoundtext)return!1}else n.style.display="none";n=getElementsByClassName($container,"lz-more")[0],album[currentImageIndex].desc!=null&&album[currentImageIndex].desc!=""?(n.style.display="",n=getElementsByClassName($lbContainer,"lz-desc")[0],n.innerHTML=album[currentImageIndex].desc,n.style.display="none"):(n.style.display="none",getElementsByClassName($lbContainer,"lz-desc")[0].style.display="none"),n=getElementsByClassName($lbContainer,"lz-by")[0],album[currentImageIndex].by!=null&&album[currentImageIndex].by!=""?(n.innerHTML=bytext+" <span>"+album[currentImageIndex].by+"<\/span>",n.style.display="",album[currentImageIndex].by_link!=null&&album[currentImageIndex].by_link!=""&&(n.href=album[currentImageIndex].by_link)):(n.innerHTML="",n.style.display="none",album[currentImageIndex].by_link!=null&&album[currentImageIndex].by_link!=""&&getElementsByClassName($container,".lz-caption").html()+"<\/a>"),getElementsByClassName($container,"lz-like")[0].style.display=album[currentImageIndex].like!=like?"":"none",getElementsByClassName($container,"lz-download")[0].style.display=album[currentImageIndex].download!=download?"":"none",getElementsByClassName($container,"lz-print")[0].style.display=album[currentImageIndex].print!=print?"":"none",getElementsByClassName($lbContainer,"lz-resolution")[0].textContent=originalWidth+" x "+originalHeight}function lzUpdateNav(){getElementsByClassName($container,"lz-prev")[0].style.display="none",getElementsByClassName($container,"lz-next")[0].style.display="none",currentImageIndex>0&&(getElementsByClassName($container,"lz-next")[0].style.display=""),currentImageIndex<album.length-1&&(getElementsByClassName($container,"lz-prev")[0].style.display="")}function lzKeyboardAction(n){var t=n.keyCode,i=String.fromCharCode(n.charCode).toLowerCase(),r=27,u=37,f=39,e=122;t==r||i.match(/x|o|c/)?lzEnd():i=="n"||t==f?currentImageIndex!=0&&lzChangeImage(currentImageIndex-1):(i=="p"||t==u)&&currentImageIndex!=album.length-1&&lzChangeImage(currentImageIndex+1)}function lzPrint(){win=window.open(),self.focus(),win.document.open(),win.document.write("<html><body stlye='margin:0 auto;padding:0;'><h1 style='margin:0 0 0.48em;'>"+getElementsByClassName($container,"lz-caption")[0].textContent+"<\/h1><div style='text-align:center;'><img src='"+album[lz.currentImageIndex].link+"' style='max-width:100%;max-height:100%;'/><\/div><div style='text-align:right;'><i>"+getElementsByClassName($container,"lz-by")[0].textContent+"<\/i><\/div><\/body><\/html>"),win.document.close(),win.print(),win.close()}function lzLike(){if(!window.focus)return!0;window.open("http://www.facebook.com/sharer/sharer.php?u="+$image.src,"","width=400,height=200,scrollbars=yes")}function lzDownload(){var t,n,i;if(window.webkitURL)return t=new XMLHttpRequest,t.open("GET",album[currentImageIndex].link),t.responseType="blob",t.onreadystatechange=function(){var n=document.createElement("a"),i;n.href=window.URL?window.URL.createObjectURL(t.response):window.webkitURL.createObjectURL(t.response),n.download=album[currentImageIndex].link.substring(album[currentImageIndex].link.lastIndexOf("/")+1),i=document.createEvent("MouseEvents"),i.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)},t.send(),!0;if(navigator.appName=="Microsoft Internet Explorer")return win=window.open(album[currentImageIndex].link),self.focus(),win.document.execCommand("SaveAs"),win.close(),!0;if(n=document.createElement("canvas"),document.body.appendChild(n),typeof n.getContext!="undefined")try{return i=n.getContext("2d"),n.width=Math.min(originalWidth,1024),n.height=Math.min(originalHeight,originalHeight/originalWidth*1024),n.style.width=n.width+"px",n.style.height=n.height+"px",i.drawImage($image,0,0,n.width,n.height),document.location.href=n.toDataURL("image/png").replace("image/png","image/octet-stream"),document.body.removeChild(n),!0}catch(r){document.body.removeChild(n)}alert("Sorry, can't download")}function lzEnd(){return isfull&&pfx!=!1&&document[pfx[0]](),album=[],document.onkeypress=null,window.onresize=null,$lightzap.style.display="none",$container.style.display="none",lzShowOthers(!0),!1}function lzShowOthers(n){var t,i,u=["select","object","embeds"],r=3;for(n=n?"visible":"hidden";r--;)for(t=document.getElementsByTagName(u[r]),i=t.length;i--;)t[i].style.visibility=n}var imgNotFound,imagetext="",oftext=" / ",bytext="by",notfoundtext="Image not found",print=!1,download=!1,like=!0,$lightzap,$container,$image,$lbContainer,windowWidth,windowHeight,originalWidth,originalHeight,album=[],currentImageIndex=0,isfull=!1,marginWidth=-1,marginHeight=-1,pfx=["webkit","moz","ms","o",""],sol;window.onload=lzInit,function(n){n.extend({getQueryString:function(n){function t(){for(var t={},n,r=/\+/g,u=/([^&=]+)=?([^&]*)/g,i=function(n){return decodeURIComponent(n.replace(r," "))},f=window.location.search.substring(1);n=u.exec(f);)t[i(n[1])]=i(n[2]);return t}return this.queryStringParams||(this.queryStringParams=t()),this.queryStringParams[n]}})}(jQuery),$.fn.moveUp=function(){before=$(this).prev(),$(this).insertBefore(before)},sol={},sol.common={showLoading:function(){var t={lines:9,length:5,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#fff",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2e9,top:10,left:"auto"},n=document.getElementById("mainSpinner"),i;$(n).show(),i=new Spinner(t).spin(n)},hideLoading:function(){$("#mainSpinner").hide()},formatToMoney:function(n,t){return(t?"$":"")+n.formatMoney(2,".",",")},doPostBack:function(n){n?n.hasClass("btnClicked")||(n.addClass("btnClicked"),__doPostBack()):__doPostBack()},insertHeaderPageTitle:function(n){$("#header DIV.mainSectionContent").append($("<h3>"+n+"<\/h3>"))},insertCategoryImage:function(n){var t="";n=n.toLowerCase().trim(),n=="afl"?t="catImgAfl":n=="baseball"?t="catImgBaseball":n=="basketball"?t="catImgBasketball":n=="boxing"?t="catImgBoxing":n=="cricket"?t="catImgCricket":n=="cycling"?t="catImgCycling":n=="golf"?t="catImgGolf":n=="horse racing"?t="catImgHorseRacing":n=="motorsports"?t="catImgMotorSports":n=="nfl"?t="catImgNfl":n=="rugby union"?t="catImgRugbyUnion":n=="soccer"?t="catImgSoccer":n=="tennis"&&(t="catImgTennis"),t&&$("#header DIV.mainSectionContent").addClass(t)},isImageLoaded:function(n){return n.complete?n.naturalWidth===0?!1:!0:!1},redirectToHttpIfHttps:function(){window.location.protocol=="https:"&&(window.location="http://"+window.location.hostname+window.location.pathname+window.location.hash)}},Number.prototype.formatMoney=function(n,t,i){var u=this,n=isNaN(n=Math.abs(n))?2:n,t=t==undefined?",":t,i=i==undefined?".":i,e=u<0?"-":"",f=parseInt(u=Math.abs(+u||0).toFixed(n))+"",r=(r=f.length)>3?r%3:0;return e+(r?f.substr(0,r)+i:"")+f.substr(r).replace(/(\d{3})(?=\d)/g,"$1"+i)+(n?t+Math.abs(u-f).toFixed(n).slice(2):"")},sol.SocialMedia=function(){},sol.SocialMedia.prototype={init:function(n){this.initTwitter(n),this.initFacebook(n),this.initGPlus(n)},initTwitter:function(n){var i="script",r="twitter-wjs",t,u=n.getElementsByTagName(i)[0];n.getElementById(r)||(t=n.createElement(i),t.id=r,t.src="https://platform.twitter.com/widgets.js",u.parentNode.insertBefore(t,u))},initFacebook:function(n){var i="script",r="facebook-jssdk",t,u=n.getElementsByTagName(i)[0];n.getElementById(r)||(t=n.createElement(i),t.id=r,t.src="//connect.facebook.net/en_US/all.js#xfbml=1",u.parentNode.insertBefore(t,u))},initGPlus:function(n){var t=n.createElement("script"),i;t.type="text/javascript",t.async=!0,t.src="https://apis.google.com/js/plusone.js",i=n.getElementsByTagName("script")[0],i.parentNode.insertBefore(t,i)},refreshAll:function(){try{FB.XFBML.parse()}catch(n){}try{twttr.widgets.load()}catch(n){}try{gapi.plusone.go()}catch(n){}}},function(){var t=new sol.SocialMedia;t.init(document)}(document),sol.MasterPage=function(){this.init()},$(window).load(function(){sol.MasterPage.prototype.matchProductListingItemHeights(10)}),sol.MasterPage.prototype={init:function(){this.registerEvents(),this.tagInputElements(),this.populateQuickSearchBox(),this.moveSubContentElement(),this.movePageId(),this.makeHeaderPageTitle()},registerEvents:function(){$("#quickSearch FORM").bind("submit",function(){var n=$("#txtQuickSearch").val().trim();if(n==""||n.length<3)alert("Please enter a search term of min. 3 characters");else return!0;return!1}),$("#quickSearch A").bind("click",function(){return $(this).closest("FORM").submit(),!1}),$("FORM#subForm").bind("submit",function(n){n.preventDefault(),$.getJSON(this.action+"?callback=?",$(this).serialize(),function(n){n.Status===400?alert("Oops! That didn't work. Please check your details and try again."):($("FORM#subForm H1").text("Thank You!"),$("FORM#subForm P").text("You are now subscribed to our newsletter."),$("FORM#subForm DIV.form").hide())})}),$("FORM#subForm DIV.fiAction A").bind("click",function(){return $(this).closest("FORM").submit(),!1}),$("A.btnLoading").bind("click",function(){sol.common.showLoading()}),$("A.btnSubmitForm").bind("click",function(){return sol.common.doPostBack($(this).closest("FORM")),!1}),$("#mainContent INPUT:text.onKeyupSubmit, #mainContent INPUT:password.onKeyupSubmit").bind("keyup",function(n){(window.event&&n.keyCode==13||n.which==13)&&sol.common.doPostBack($(this).closest("FORM"))})},tagInputElements:function(){$("INPUT:text,INPUT:password").addClass("txtInput")},populateQuickSearchBox:function(){var n=$.getQueryString("keywords");n&&$("#txtQuickSearch").val(n)},movePageId:function(){if($("INPUT:hidden[id$=hidPageId]").length){var n=$("INPUT:hidden[id$=hidPageId]").val();$("BODY").attr("id",n),n!="home"&&$("LI#topNavSubscribe").show()}},makeHeaderPageTitle:function(){var n,i,r,t;$("INPUT:hidden[id$=hidPageId]").length&&(n=$("INPUT:hidden[id$=hidPageId]").val(),n!="home"&&n!="productItem"&&n!="categoryListing"&&n!="blogArticle"?(t=$("#mainContent H1").first(),t.length&&sol.common.insertHeaderPageTitle(t.text())):n=="blogArticle"?sol.common.insertHeaderPageTitle("Sports Online Blog"):(n=="productItem"||n=="categoryListing")&&(i=$("#memorabiliaCategories > UL > LI.current"),i.length?(r=i.find(">A").text(),sol.common.insertHeaderPageTitle(r),sol.common.insertCategoryImage(r)):(t=$("#mainContent H2.categoryTitle"),t.length&&sol.common.insertHeaderPageTitle(t.text()))))},matchProductListingItemHeights:function(n){var t=this;$("DIV.productListing").length&&setTimeout(function(){$("DIV.productListing").each(function(){var i=0,r=0,u=0,f;$(this).find("DIV.productListingItem").each(function(){f=$(this),t.addMoreLink(f),r=$(this).find("DIV.productsListingImg").height()>r?$(this).find("DIV.productsListingImg").height():r,u=$(this).find("DIV.productsListingDesc").height()>u?$(this).find("DIV.productsListingDesc").height():u,i++,i==3&&(t.matchProductListingItemHeight(f,i,r,u),i=0,r=0,u=0)}),i>1&&t.matchProductListingItemHeight(f,i,r,u)}),n>0&&setTimeout(function(){t.matchProductListingItemHeight(--n)},2500)},500)},addMoreLink:function(n){var t=n.find("DIV.productsListingDesc"),i=t.find("A").attr("href");n.append($('<div class="productsListingMoreInfo"><a class="btnMoreInfo" href="'+i+'"><span>More Info<\/span><\/a><\/div>'))},matchProductListingItemHeight:function(n,t,i,r){while(t>0)n.find("DIV.productsListingImg").height(i),n.find("DIV.productsListingDesc").height(r),t--,n=n.prev()},moveSubContentElement:function(){$("#subContent").moveUp(),$("#subContent").show(),$("#mainContent").css("margin-left","10px")}},sol.Home=function(){this.init()},sol.Home.prototype={init:function(){sol.common.showLoading(),setTimeout(function(){$("#headerPromo").slidesjs({width:956,height:329,navigation:{active:!1,effect:"fade"},pagination:{active:!0,effect:"fade"},effect:{fade:{speed:800,crossfade:!0}},play:{active:!1,effect:"fade",interval:5e3,auto:!0,swap:!0,pauseOnHover:!1,restartDelay:2500}}),sol.common.hideLoading()},700),this.showSubscribeButton(-150)},showSubscribeButton:function(n){var t=this;n<0&&setTimeout(function(){n=n+1,$("LI#topNavSubscribe").css("top",n+"px"),t.showSubscribeButton(n)},10)}},sol.Category=function(n){$.extend(this,n),this.init()},sol.Category.prototype={init:function(){var n=$("INPUT:hidden[name$=hidCategoryId]").val();n=="118"&&$("#mainContent DIV.productPrice").hide()}},sol.Product=function(){this.init()},sol.Product.prototype={init:function(){$("UL#productInfo LI, #purchaseOptions UL LI").each(function(){$(this).text()==""&&$(this).remove()}),$("#productImg1 A.zoom").attr("href",$("#productImg1 P>A").attr("href")),$('[id$="productImg2"] A.zoom').attr("href",$('[id$="productImg2"] P>A').attr("href")),$('[id$="productImg3"] A.zoom').attr("href",$('[id$="productImg3"] P>A').attr("href")),$('[id$="productImg4"] A.zoom').attr("href",$('[id$="productImg4"] P>A').attr("href"))}},sol.Cart=function(n){$.extend(this,n),this.init()},sol.Cart.prototype={init:function(){this.registerEvents(),this.moveTotalValues(),this.isAllowPayPal()},registerEvents:function(){$("A.btnRemoveFromCart").bind("click",function(){if(confirm("Remove this item from the shopping cart?")){var n=$(this).attr("id").replace("ci_","");$("INPUT[id$=hidRemoveItem]").val(n),sol.common.doPostBack()}return!1}),$("A#btnCheckout").bind("click",function(){return $("INPUT[id$=hidIsCheckout]").val("True"),sol.common.doPostBack(),!1}),$("A#btnPayPal").bind("click",function(){return $("INPUT[id$=hidIsPayPalCheckout]").val("True"),sol.common.doPostBack(),!1}),$("A.applyCouponCode").bind("click",function(){var n=$("INPUT.couponCode").val().trim();return n&&(sol.common.showLoading(),$("INPUT[id$=hidApplyCouponCode]").val(n),sol.common.doPostBack()),!1}),$("INPUT.couponCode").bind("keyup",function(n){return(window.event&&n.keyCode==13||n.which==13)&&$("A.applyCouponCode").trigger("click"),!1})},moveTotalValues:function(){var r=parseFloat($("INPUT[id$=hidSubtotal]").val()),u=parseFloat($("INPUT[id$=hidDelivery]").val()),n=parseFloat($("INPUT[id$=hidGrandTotal]").val()),t=parseFloat($("INPUT[id$=hidGrandTotalToCharge]").val()),i=parseFloat($("INPUT[id$=hidDiscounted]").val());$("SPAN#spnSubtotal").text(sol.common.formatToMoney(r,!0)),$("SPAN#spnDelivery").text(sol.common.formatToMoney(u,!0)),$("SPAN#spnGrandTotal").text(sol.common.formatToMoney(n,!0)),$("SPAN#spnGrandTotalToCharge").text(sol.common.formatToMoney(t,!0)),i>0&&($("SPAN#spnDiscountByCoupon").html("-"+sol.common.formatToMoney(i,!0)+"<span>(Coupon: "+$("INPUT[id$=hidCouponCode]").val()+")<\/span>"),$("TR#discountByCoupon").show()),n>t&&$("TR#depositDue").show()},isAllowPayPal:function(){$("SPAN.partPaymentInfo").length&&$("DIV.cartAction DIV.payPal").html(""),$("DIV.cartAction DIV.payPal").show()}},sol.Login=function(){this.init()},sol.Login.prototype={init:function(){this.registerEvents()},registerEvents:function(){}},sol.Register=function(){this.init()},sol.Register.prototype={init:function(){this.registerEvents()},registerEvents:function(){}},sol.CustomerProfileForm=function(){this.init()},sol.CustomerProfileForm.prototype={init:function(){this.registerEvents(),this.hideShowShippingAddressByCheckbox()},registerEvents:function(){var n=this;$("INPUT[id$=chkAddress]").bind("change",function(){n.hideShowShippingAddressByCheckbox()}),$("A#btnSubmit").bind("click",function(){return n.copyBillingAddressDetailsToShipping(),sol.common.doPostBack($(this).closest("FORM")),!1})},hideShowShippingAddressByCheckbox:function(){var n=$("INPUT[id$=chkAddress]");n.is(":checked")?$("#shippingAddress DIV.addressFormItems").hide():$("#shippingAddress DIV.addressFormItems").show()},copyBillingAddressDetailsToShipping:function(){var n=$("INPUT[id$=chkAddress]");n.is(":checked")&&($("#shippingAddress INPUT[id$=txtAddress1]").val($("#billingAddress INPUT[id$=txtAddress1]").val()),$("#shippingAddress INPUT[id$=txtAddress2]").val($("#billingAddress INPUT[id$=txtAddress2]").val()),$("#shippingAddress INPUT[id$=txtSuburb]").val($("#billingAddress INPUT[id$=txtSuburb]").val()),$("#shippingAddress INPUT[id$=txtState]").val($("#billingAddress INPUT[id$=txtState]").val()),$("#shippingAddress INPUT[id$=txtPostCode]").val($("#billingAddress INPUT[id$=txtPostCode]").val()),$("#shippingAddress SELECT[id$=ddlCountry]").val($("#billingAddress SELECT[id$=ddlCountry]").val()))}},sol.Payment=function(){this.ddlPaymentCardType=$("SELECT.paymentCardType"),this.ddlPaymentMethod=$("SELECT[id$=ddlPaymentMethod]"),this.lblAmount=$("SPAN.payAmount"),this.init()},sol.Payment.prototype={init:function(){this.lblAmount.data("Amount",parseFloat(this.lblAmount.text().substr(1).replace(/\,/g,""))),this.recalculatePaymentAmount(),this.hideShowShippingAddressByCheckbox(),this.registerEvents(),$("INPUT[ID$=hidIsOrderSubmit]").val("")},registerEvents:function(){var n=this;this.ddlPaymentCardType.on("change",function(){n.recalculatePaymentAmount()});this.ddlPaymentMethod.on("change",function(){sol.common.showLoading()});$("INPUT[id$=chkAddress]").on("change",function(){n.hideShowShippingAddressByCheckbox()});$("A#btnSubmit").bind("click",function(){return n.copyBillingAddressDetailsToShipping(),$("INPUT[ID$=hidIsOrderSubmit]").val("True"),sol.common.doPostBack($(this).closest("FORM")),!1})},recalculatePaymentAmount:function(){var n=this.lblAmount.data("Amount");this.ddlPaymentCardType.val()=="19"&&(n=this.lblAmount.data("Amount")*1.03),this.lblAmount.text("$"+n.formatMoney(2,".",","))},hideShowShippingAddressByCheckbox:function(){var n=$("INPUT[id$=chkAddress]");n.is(":checked")?$("#shippingAddress DIV.addressFormItems").hide():$("#shippingAddress DIV.addressFormItems").show()},copyBillingAddressDetailsToShipping:function(){var n=$("INPUT[id$=chkAddress]");n.is(":checked")&&($("#shippingAddress INPUT[id$=txtAddress1]").val($("#billingAddress INPUT[id$=txtAddress1]").val()),$("#shippingAddress INPUT[id$=txtAddress2]").val($("#billingAddress INPUT[id$=txtAddress2]").val()),$("#shippingAddress INPUT[id$=txtSuburb]").val($("#billingAddress INPUT[id$=txtSuburb]").val()),$("#shippingAddress INPUT[id$=txtState]").val($("#billingAddress INPUT[id$=txtState]").val()),$("#shippingAddress INPUT[id$=txtPostCode]").val($("#billingAddress INPUT[id$=txtPostCode]").val()),$("#shippingAddress SELECT[id$=ddlCountry]").val($("#billingAddress SELECT[id$=ddlCountry]").val()))}}