function CloseClubStorePitch(){$("#club-store-modal-trigger").moby("hide")}function popupAudioPlayer(n){return AjaxJsonPostWrapper.ajaxRouteNonAsync("product","getaudiofile",{videoid:n},function(n){$("#div-audio").html(n);$("#div-audio").show()})}function addToWishList(n,t,i,r){var u=$(n).closest("form"),f;u.valid()&&($("#Personalize").is(":checked")&&$("[name='Personalize']").each(function(){$(this).val()=="false"&&$(this).remove()}),f=AjaxJsonPostWrapper.getFormData(u),Gorilla.util.setCookie("_wishlist-product-data",btoa(JSON.stringify(f))),window.location=r?"/wishlist/index":"/authenticate/accountlogin?returnUrl=/wishlist/index")}function updateQtyInWishList(n,t,i,r){if(i==0||$(n).valid()&&$.trim(i)!="")return AjaxJsonPostWrapper.ajaxRoute("wishlist","updateqtyinwishlist",{entryId:t,qty:i,cqo:r},function(n){n.cartQty>0?n.cartHtml&&n.cartHtml!=""&&($("#cartContainer").html(n.cartHtml),$("#cartModifiedBtn").click(),Gorilla.util.initForms()):window.location.replace("/wishlist/index")})}function editPersonalization(n,t){AjaxJsonPostWrapper.ajaxRoute("wishlist","editpersonalization",{entryId:n,isPersonalized:t},function(n){n.personalizeHtml&&(n.personalizeHtml.substr(0,10)=="embroidery"?document.location.href="/wishlist/"+n.personalizeHtml:($personalizeTrigger=$("#personalize-trigger")).length&&($personalizeModal=$("#personalize-modal")).length&&($personalizeModal.html(n.personalizeHtml),$personalizeTrigger.moby({modalClass:"personalize-mod",onCompleteCallback:function(){Gorilla.util.initForms();$("#personalize-mod").validate()}}).moby("show","#personalize-modal")))})}function CartMoveToWishListAfterLogin(n,t){Gorilla.util.setCookie("_wishlist-ceid",btoa(JSON.stringify(n)));var i=t?"/checkout/payment":"/cart/viewcart";window.location="/authenticate/accountlogin?returnUrl="+i}function CartMoveToWishListAsync(n,t){AjaxJsonPostWrapper.ajaxRouteNonAsync("wishlist","movetowishlist",{entryId:n},function(){});var i=t?"updateqtyincheckout":"updateqty";AjaxJsonPostWrapper.ajaxRouteNonAsync("cart",i,{entryId:n,qty:0,cqo:0},function(n){n.cartQty>0?n.cartHtml&&n.cartHtml!=""&&($("#cartContainer").html(n.cartHtml),$("#cartModifiedBtn").click(),Gorilla.util.initForms(),t||setCartQuantityText(),$("#wishlistmessage-modal").html("Item moved to Wish List"),$("#wishlistmessage-trigger").click()):window.location.replace("/cart/viewcart")})}function HandleCartMoveToWishListAfterLogin(n){var t=Gorilla.util.getCookie("_wishlist-ceid"),i,r;t!=null&&(i=atob(t),r=JSON.parse(i),Gorilla.util.deleteCookie("_wishlist-ceid"),CartMoveToWishListAsync(r,n))}function WishListAddToWishList(){var n=Gorilla.util.getCookie("_wishlist-product-data"),t,i;n!=null&&(t=atob(n),i=JSON.parse(t),Gorilla.util.deleteCookie("_wishlist-product-data"),AjaxJsonPostWrapper.ajaxRoute("wishlist","addtowishlist",{data:i},function(n){n.success?(n.personalizeHtml?n.personalizeHtml.substr(0,10)=="embroidery"?document.location.href="/wishlist/"+n.personalizeHtml:($personalizeTrigger=$("#personalize-trigger")).length&&($personalizeModal=$("#personalize-modal")).length&&($personalizeModal.html(n.personalizeHtml),$personalizeTrigger.moby({modalClass:"personalize-mod",onCompleteCallback:function(){Gorilla.util.initForms();$("#personalize-mod").validate()},onCloseCallback:function(){$("#cartContainer").html().indexOf("Loading...")>=0&&($("#cartContainer").html(n.cartHtml),$("#cartSummary").html(""))}}).moby("show","#personalize-modal")):($("#cartContainer").html(n.cartHtml),$("#cartSummary").html("")),$(".notifyBtn").find("a").moby({modalClass:"giveaway-modal",onCompleteCallback:function(){}}),Gorilla.util.initForms()):alert(n.message)},function(n){alert(JSON.stringify(n))}))}function WishListCopyToCart(n){return AjaxJsonPostWrapper.ajaxRoute("wishlist","copytocart",{entryId:n},function(n){updateShowMiniCart(n.miniCartHtml)})}function WishListMoveToCart(n){AjaxJsonPostWrapper.ajaxRoute("wishlist","movetocart",{entryId:n},function(n){n.cartHtml&&n.cartHtml!=""&&($("#cartContainer").html(n.cartHtml),$("#cartModifiedBtn").click(),Gorilla.util.initForms());n.cartQty==0&&$("#wishlist-action-bar").fadeOut("slow");updateShowMiniCart(n.miniCartHtml)})}function updateShowMiniCart(n){n&&n!==""&&(window.scrollTo(0,0),setCartQuantityText(),$("#cartSummary").html(n),$(".customer-nav").DropIt("showMenu",$("#mini-cart .drop-down")),window.setTimeout($.proxy(function(){$(".customer-nav").DropIt("hideMenu",$("#mini-cart .drop-down"))},this),5e3))}function CheckAccountRegistered(){var n=Gorilla.util.getCookie("_acct-reg-new");n!=null&&(Gorilla.util.deleteCookie("_acct-reg-new"),$("#welcome-trigger").click())}function ak(n,t,u){function ni(){f(document,"keydown",gt);f(h,"blur",ct);f(document,"keypress",dt)}function ct(n){n||(n=event);v(document,"keydown",gt);v(h,"blur",ct);v(document,"keypress",dt);k()}function lt(n){var r,u,i,t,o,f;for(e.aL.length>0?(r=p[d].aU().aP(),u=p[d].aU().length):(r=h.value.aP(),u=h.value.length),i="",o=e.bl?new RegExp("^"+r,"i"):new RegExp(r,"i"),f=n.search(o),t=0;t<f;t++)i+=n.substr(t,1);for(i+="<font style='"+e.bn+"'>",t=f;t<u+f;t++)i+=n.substr(t,1);for(i+="<\/font>",t=u+f;t<n.length;t++)i+=n.substr(t,1);return i}function ti(){var i,first,j,bt;if(document.getElementById("tat_table")&&(b=!1,document.body.removeChild(document.getElementById("tat_table"))),ft==0){b=!1;return}for(a=document.createElement("table"),a.cellSpacing="1px",a.cellPadding="2px",a.style.position="absolute",a.style.zIndex=e.ba,a.style.border=e.bh,a.style.width=e.bb,a.style.top=eval(L(h)+h.offsetHeight)+"px",a.style.left=P(h)+"px",a.style.backgroundColor=e.aw,a.id="tat_table",a.className="suggestaheadtable",document.body.appendChild(a),first=!0,j=1,e.aF&&(a.onmouseout=wt,a.onmouseover=pt),bt=0,i=0;i<e.ay.length;i++)if(tt[i]&&(bt++,r=a.insertRow(-1),r.style.backgroundColor=e.aw,r.id="tat_tr"+j,c=r.insertCell(-1),c.style.color=e.aO,c.style.fontFamily=e.bg,c.style.fontSize=e.aM,c.innerHTML=lt(e.ay[i]),c.id="tat_td"+j,c.setAttribute("pos",j),c.style.textAlign="left",c.style.padding="1px 5px",e.aF&&(c.style.cursor="pointer",c.onclick=yt,c.onmouseover=bt),j++),j-1==e.bs&&j<rt){r=a.insertRow(-1);r.style.backgroundColor=e.aw;c=r.insertCell(-1);c.style.color=e.aO;c.style.fontFamily="arial narrow";c.style.fontSize=e.aM;c.align="center";o(c,"\\/");e.aF&&(c.style.cursor="pointer",c.onclick=vt);break}g=1;nt=j-1;b=!0}function at(){document.body.removeChild(document.getElementById("tat_table"));a=document.createElement("table");a.cellSpacing="1px";a.cellPadding="2px";a.style.position="absolute";a.style.zIndex=e.ba;a.style.border=e.bh;a.style.width=e.bb;a.style.top=eval(L(h)+h.offsetHeight)+"px";a.style.left=P(h)+"px";a.style.backgroundColor=e.aw;a.className="test2";a.id="tat_table";e.aF&&(a.onmouseout=wt,a.onmouseover=pt);document.body.appendChild(a);var i,first=!0,j=1;for(g>1&&(r=a.insertRow(-1),r.style.backgroundColor=e.aw,c=r.insertCell(-1),c.style.color=e.aO,c.style.fontFamily="arial narrow",c.style.fontSize=e.aM,c.align="center",o(c,"/\\"),e.aF&&(c.style.cursor="pointer",c.onclick=ui)),i=0;i<e.ay.length;i++)if(tt[i]&&(j>=g&&j<=nt?(r=a.insertRow(-1),r.style.backgroundColor=e.aw,r.id="tat_tr"+j,c=r.insertCell(-1),c.style.color=e.aO,c.style.fontFamily=e.bg,c.style.fontSize=e.aM,c.innerHTML=lt(e.ay[i]),c.id="tat_td"+j,c.setAttribute("pos",j),c.style.textAlign="left",c.style.padding="1px 5px",e.aF&&(c.style.cursor="pointer",c.onclick=yt,c.onmouseover=bt),j++):j++),j>nt)break;j-1<rt&&(r=a.insertRow(-1),r.style.backgroundColor=e.aw,c=r.insertCell(-1),c.style.color=e.aO,c.style.fontFamily="arial narrow",c.style.fontSize=e.aM,c.align="center",o(c,"\\/"),e.aF&&(c.style.cursor="pointer",c.onclick=vt))}function ii(){b&&s!=1&&(document.getElementById("tat_tr"+s).style.backgroundColor=e.aw,s--,s<g&&ot(),document.getElementById("tat_tr"+s).style.backgroundColor=e.aN,y&&clearTimeout(y),e.av>0&&(y=setTimeout(function(){w=0;k()},e.av)))}function ri(){b&&s!=rt&&(s>0&&(document.getElementById("tat_tr"+s).style.backgroundColor=e.aw),s++,s>nt&&et(),document.getElementById("tat_tr"+s).style.backgroundColor=e.aN,y&&clearTimeout(y),e.av>0&&(y=setTimeout(function(){w=0;k()},e.av)))}function et(){g++;nt++;at()}function ot(){g--;nt--;at()}function vt(){document.getElementById("tat_tr"+s).style.backgroundColor=e.aw;s++;et();document.getElementById("tat_tr"+s).style.backgroundColor=e.aN;h.focus();w=0;y&&clearTimeout(y);e.av>0&&(y=setTimeout(function(){w=0;k()},e.av))}function ui(n){n||(n=event);n.stopPropagation?n.stopPropagation():n.cancelBubble=!0;document.getElementById("tat_tr"+s).style.backgroundColor=e.aw;s--;ot();document.getElementById("tat_tr"+s).style.backgroundColor=e.aN;h.focus();w=0;y&&clearTimeout(y);e.av>0&&(y=setTimeout(function(){w=0;k()},e.av))}function yt(n){(n||(n=event),b)&&(w=0,s=this.getAttribute("pos"),kt())}function pt(){w=1}function wt(){w=0;y&&clearTimeout(y);e.av>0&&(y=setTimeout(function(){w=0;k()},e.av))}function bt(){for(w=1,(s==null||s==0)&&(s=1),document.getElementById("tat_tr"+s).style.backgroundColor=e.aw,s=this.getAttribute("pos");s<g;)ot();while(s>nt)et();document.getElementById("tat_tr"+s).style.backgroundColor=e.aN;y&&clearTimeout(y);e.av>0&&(y=setTimeout(function(){w=0;k()},e.av))}function fi(n){if(e.aL.length>0){for(aB="",l=0,i=0;i<p.length;i++){if(d==i){for(bk=bj="",bi=!1,j=0;j<p[i].length;++j){if(p[i].charAt(j)!=" "){bi=!0;break}bk+=" "}for(j=p[i].length-1;j>=0;--j){if(p[i].charAt(j)!=" ")break;bj+=" "}aB+=bk;aB+=n;l=aB.length;bi&&(aB+=bj)}else aB+=p[i];i!=p.length-1&&(aB+=st[i])}h.value=aB;ab(h,l)}else h.value=n;w=0;k()}function kt(){var t,i,n;if(b){for(b=!1,t="",i=0,n=0;n<=e.ay.length;n++)if(tt[n]&&i++,i==s){t=e.ay[n];break}fi(t);l=A(h);ei()}}function ei(){if(document.getElementById(e.bm)!=null){var n=document.getElementById(e.bm);n.submit()}}function k(){w==0&&(b=0,document.getElementById("tat_table")&&document.body.removeChild(document.getElementById("tat_table")),y&&clearTimeout(y))}function dt(n){return it&&ac(n),!it}function gt(n){n||(n=event);a=n.keyCode;bu=A(h);it=0;switch(a){case 38:return ii(),it=1,!1;case 40:return ri(),it=1,!1;case 13:case 9:return b&&s>0?(it=1,kt(),!1):!0;default:setTimeout(function(){oi(a)},50)}}function oi(n){var o,i,t,f,r,u,c;if(n!=38&&n!=40&&n!=13){if(b){for(o=0,i=0,t=0;t<=e.ay.length;t++)if(tt[t]&&i++,i==s){o=t;break}ut=o}else ut=-1;if(h.value==""){w=0;k();return}if(e.aL.length>0){for(bu=A(h),bd=V(h),aT="",t=0;t<e.aL.length;t++)aT+=e.aL[t];for(aT=aT.aP(),be=new RegExp("(["+aT+"])"),i=0,p=[],p[0]="",t=0,j=h.value.length;t<h.value.length;t++,j--)h.value.substr(t,j).search(be)==0?(bp=h.value.substr(t,j).match(be),st[i]=bp[1],i++,p[i]=""):p[i]+=h.value.charAt(t);for(f=0,d=-1,t=0;t<p.length;t++)bd>=f&&bd<=f+p[t].length&&(d=t),f+=p[t].length+1;r=p[d].aU();u=p[d].aP().aU()}else r=h.value,u=h.value.aP();if(r.length==0&&(w=0,k()),r.length<e.bw)return this;for(c=e.bl?new RegExp("^"+u,"i"):new RegExp(u,"i"),rt=0,ht=!1,ft=0,t=0;t<e.ay.length;t++)tt[t]=!1,c.test(e.ay[t])&&(rt++,tt[t]=!0,ft++,ut==t&&(ht=!0));y&&clearTimeout(y);e.av>0&&(y=setTimeout(function(){w=0;k()},e.av));ti()}}var e;this.av=-1;this.bs=10;this.bl=!1;this.aF=!0;this.aL=[";",","];this.bw=3;this.bm=u;this.aw="#FFFFFF";this.aO="#000000";this.bh="1px solid #000000";this.aN="#FFE597";this.bg='"roboto",helvetica,arial,sans-serif';this.aM="11px";this.bn='text-decoration:underline;font-weight="bold"';this.bb="330px";this.ba="99999";var p=[],d=0,st=[],b=!1,s=0,rt=0,h=null,g=0,nt=0,tt=[],ut=0,y,ht=!1,w=1,ft=0,it=!1;return this.ay=[],this.ay=t,e=this,h=n,f(h,"focus",ni),this}function f(n,t,i){n!=null&&(n.attachEvent?n.attachEvent("on"+t,i):n.addEventListener?n.addEventListener(t,i,!0):n["on"+t]=i)}function v(n,t,i){n.detachEvent?n.detachEvent("on"+t,i):n.removeEventListener?n.removeEventListener(t,i,!0):n["on"+t]=null}function ac(n){return n||window.event,n.stopPropagation?(n.stopPropagation(),n.preventDefault()):typeof n.cancelBubble!="undefined"&&(n.cancelBubble=!0,n.returnValue=!1),!1}function ai(n){return window.event?window.event.srcElement:n.currentTarget}function ah(n){return window.event?window.event.srcElement:n.target}function al(n){typeof n.onselectstart!="undefined"&&f(n,"selectstart",function(){return!1})}function V(n){var i,t,r;if(typeof n.selectionEnd!="undefined")return n.selectionEnd;if(document.selection&&document.selection.createRange){i=document.selection.createRange();try{t=i.duplicate();t.moveToElementText(n)}catch(u){t=n.createTextRange()}return(t.setEndPoint("EndToEnd",i),r=t.text.length,r>n.value.length)?-1:r}}function A(n){var i,t,r;if(typeof n.selectionStart!="undefined")return n.selectionStart;if(document.selection&&document.selection.createRange){i=document.selection.createRange();try{t=i.duplicate();t.moveToElementText(n)}catch(u){t=n.createTextRange()}return(t.setEndPoint("EndToStart",i),r=t.text.length,r>n.value.length)?-1:r}}function ab(n,t){n.focus();n.setSelectionRange?n.setSelectionRange(t,t):n.createTextRange&&(m=n.createTextRange(),m.moveStart("character",t),m.collapse(),m.select())}function am(n,t,i){n.focus();n.setSelectionRange?n.setSelectionRange(t,i):n.createTextRange&&(m=n.createTextRange(),m.moveStart("character",t),m.moveEnd("character",i),m.select())}function L(n){for(aQ=0;n;)aQ+=n.offsetTop,n=n.offsetParent;return aQ}function P(n){for(aQ=0;n;)aQ+=n.offsetLeft,n=n.offsetParent;return aQ}function aj(n){return typeof n=="number"&&isFinite(n)}function o(n,t){while(bv=n.childNodes[0])n.removeChild(bv);n.appendChild(document.createTextNode(t))}function getTabletMobileDeptMenu(){if($(".shop").find(".drop-down"))return AjaxJsonPostWrapper.ajaxRouteNonAsync("sitemap","gettabletmobilecategorymenu",{},function(n){$(".shop").find(".drop-down").html(n)})}function addItemsToCart(n){var t=[];return $("."+n).find("form").each(function(){var n=AjaxJsonPostWrapper.getFormData(this);t.push(n)}),AjaxJsonPostWrapper.ajaxRoute("cart","addtocart",{data:t},function(n){for(var u=!1,i,r,t=n.inventoryInfo.length-1;t>-1;t--)i=n.inventoryInfo[t],i.SellAction!="X"&&i.SellAction!="N"&&($("#quickOrderItems").find("form")[t].remove(),u=!0);u==!0&&($(window).scrollTop(0),updateCartSummary(),r=$("#tealiumAjax"),r.empty(),r.append(n.tealium));n.alertMsg!=""&&alert(n.alertMsg)})}function addItemToCart(n){var t=[],i=AjaxJsonPostWrapper.getFormData($(n).closest("form"));t.push(i);doAddToCartSingleItem(t)}function addItemToCartCustom(n,t,i,r,u,f){var o={ID:n,PromoCode:t,ColorCode:i,SizeCode:r,Quantity:u,IsPersonalized:f},e=[];e.push(o);doAddToCartSingleItem(e)}function doAddToCartSingleItem(n){return alert(JSON.stringify(n)),AjaxJsonPostWrapper.ajaxRoute("cart","addtocart",{data:n},function(t){if(alert(JSON.stringify(t)),t.inventoryInfo[0].SellAction=="N")notifyMe(n.ID,n.PromoCode,n.Name);else if(t.inventoryInfo[0].SellAction=="X")alert(t.inventoryInfo[0].Message);else{t.inventoryInfo[0].Message!="In Stock"&&alert(t.inventoryInfo[0].Message);$(window).scrollTop(0);updateCartSummary();var i=$("#tealiumAjax");i.empty();i.append(t.tealium)}})}function getTerminalPickupInfo(){return AjaxJsonPostWrapper.ajaxRoute("product","getterminalpickupoption",{zipCode:$("#terminalPickupZip").val()},function(n){$("#terminalPickupResponse").html(n.display)})}function acceptTerminalPickup(){$("#AcceptTerminalPickup").prop("checked","checked");$("#btnTermPickupYes").css("border","1px solid black");$("#btnTermPickupNo").css("border","0px");$("#termPickupStatusMsg").html("Your terminal pick-up option and pricing will be applied AFTER YOU ADD THIS ITEM TO YOUR CART ABOVE.")}function declineTerminalPickup(){$("#AcceptTerminalPickup").prop("checked",!1);$("#btnTermPickupNo").css("border","1px solid black");$("#btnTermPickupYes").css("border","0px");$("#termPickupStatusMsg").html("You have declined to take advantage of the Terminal Pickup Option.  PLEASE ADD THIS ITEM TO YOUR CART ABOVE.")}function getNextProductOption(n,t,i,r,u){var f=$(n).closest("form"),e;return i&&($(f).find("#WaistCode").val(""),$(f).find("#WaistCode").prop("disabled",!0),$(f).find("#WaistCode").customSelect("updateText")),r&&($(f).find("#SizeCode").val(""),$(f).find("#SizeCode").prop("disabled",!0),$(f).find("#SizeCode").customSelect("updateText")),u&&($(f).find("#ColorCode").val(""),$(f).find("#ColorCode").prop("disabled",!0),$(f).find("#ColorCode").customSelect("updateText")),resetPrices(f),$(f).find("#startingAt").text($(f).find("#hdnStartingAt").val()),$(f).find(".addToCartButtonDiv").show(),$(f).find(".notifyMeButtonDiv").hide(),$(f).find(".stock-note").text(" "),n.value!=""?(e=AjaxJsonPostWrapper.getFormData(f),AjaxJsonPostWrapper.ajaxRoute("product","getproductoption",e,function(n){var i=$(f).find("input[id=ID]").val(),r;prices[i]=n.Prices;clubPrices[i]=n.ClubPrices;prices[i][0]!=undefined&&clubPrices[i][0]!=undefined&&arrayAllTheSameValues(prices[i])&&(setPrices(f,$(f).find("#hdnCurrency").val()+Number(prices[i][0]).toFixed(2),$(f).find("#hdnCurrency").val()+Number(clubPrices[i][0]).toFixed(2)),$(f).find("#startingAt").text(" "));expectDates[i]=n.ExpectDates;sellActions[i]=n.SellActions;r=$(f).find("#"+t);r.empty();$("<option/>",{value:"",text:"Select an Option"}).appendTo(r);$(n.Values).each(function(){$("<option/>",{value:this.Code,text:this.Desc}).appendTo(r)});r.prop("disabled",!1);r.customSelect("updateText")})):void 0}function setPrices(n,t,i){$(n).find("#productCart .regular-price .price").text(t);$(n).find("#productCart .clearance-price .price").text(t);$(n).find("#productCart .club-price .price").text(i)}function resetPrices(n){var t=$(n).find("#hdnPrice").val(),i=$(n).find("#hdnClubPrice").val();setPrices(n,t,i)}function arrayAllTheSameValues(n){var i=n[0],t=!0;return $(n).each(function(r){n[r]!=i&&(t=!1)}),t}function processSelectedProductOption(n){var t=$(n).closest("form"),f=$(t).find(".addToCartButtonDiv"),l=$(t).find(".addToCartButton"),e=$(t).find(".notifyMeButtonDiv"),i=$(t).find(".stock-note"),r=$(n).prop("selectedIndex")-1,s;if(r>-1){var o=$(t).find("input[id=ID]").val(),u=sellActions[o][r],h=prices[o][r],c=clubPrices[o][r];setPrices(t,$(t).find("#hdnCurrency").val()+Number(h).toFixed(2),$(t).find("#hdnCurrency").val()+Number(c).toFixed(2));$(t).find("#startingAt").text(" ");$(i).addClass("out").removeClass("in");s=expectDates[o][r];u=="S"||u=="B"?($(e).hide(),$(f).show(),u=="B"?$(i).text("Expected availability: "+s):($(i).addClass("in").removeClass("out"),$(i).text("In Stock"))):u=="N"?($(i).text("Item not currently available for sale."),$(e).show(),$(f).hide()):u=="X"&&($(i).text("SOLD OUT"),$(e).hide(),$(f).hide())}else $(e).hide(),$(f).show(),$(i).text(" "),resetPrices(t),$(t).find("#startingAt").text($(t).find("#hdnStartingAt").val())}function loadProductReviewPage(n,t){return AjaxJsonPostWrapper.ajaxRoute("product","getproductreviewpage",{ID:n,Page:t},function(n){$("#productReviewsSummary").html(n.reviewPageSummary);$("#productReviewContainer").html(n.reviews);$("#tabs").resize()})}function loadCustomerCommentPage(){}function catalogQuickOrderChange(){var t=$("#newItemNumber").val(),i=0,n="",r;t.split("-").length==2&&(i=parseInt(t.split("-")[1],10),r=new RegExp("^[a-zA-Z0-9]+$"),n=t.split("-")[0].toUpperCase(),r.test(n)||(n=""));$("#quickorderbtn").attr("href","/product/getproductcartdata?ID="+i+"&PromoCode="+n)}function notifyMe(n){var t=AjaxJsonPostWrapper.getFormData($(n).closest("form"));return AjaxJsonPostWrapper.ajaxRoute("product","notifymeform",t,function(n){$("#notifyMe").html(n)})}function testFuncAS(){return!1}function updateQty(n,t,i,r){if((i==0||$(n).valid())&&$.trim(i)!="")return AjaxJsonPostWrapper.ajaxRoute("cart","updateqty",{entryId:t,qty:i,cqo:r},function(n){removeClubTrialMessage();n.cartHtml&&n.cartHtml!=""&&(setCartQuantityText(),$("#cartContainer").replaceWith(n.cartHtml),$("#cartSummary").html(""),Gorilla.util.initForms());$quickorderAdd=$("#quickorder-add");$quickorderAdd.length&&$(".btn-quickview").find("a").moby({modalClass:"quickview",onCompleteCallback:function(){Gorilla.util.initForms();$(".quickview-form").validate()}})})}function updateCartSummary(){return AjaxJsonPostWrapper.ajaxRoute("cart","getcartpreview",{},function(n){var t=$("#cartSummary");t.empty();t.append(n)})}function applyGiftCard(){return!1}function removeClubTrialMessage(){$("#cartTrialMessage").length>0&&$("#cartTrialMessage").html("")}function productQuickView(n,t,i){return AjaxJsonPostWrapper.ajaxRoute("product","getproductcartdata",{ID:t,PromoCode:i,AdId:n},function(n){$("#notifyMe").html("<div id='productCart' style='width:1100px; background-color:white; border:5px outset black;'>"+n+"<\/div>");$("#notifyMe").show()})}var AjaxJsonPostWrapper,customarray,EmbroideryTool;!function(n){n.validator.addMethod("postalCode",function(n,t){return this.optional(t)||/^[a-zA-Z][0-9][a-zA-Z] *[0-9][a-zA-Z][0-9]$/.test(n)},"Please enter a valid postal code.");n.validator.setDefaults({errorPlacement:function(n,t){var i=t.parent();i.hasClass("style-radio")?n.prependTo(i.parents(".form-list")):n.appendTo(t.parent())},highlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).addClass(i).removeClass(r):(n(t).addClass(i).removeClass(r),n(t.form).find("label[for="+t.id+"]").addClass("label-"+i),($select=n(t).parent(".select-wrap")).length&&$select.addClass(i).removeClass(r))},unhighlight:function(t,i,r){t.type==="radio"?this.findByName(t.name).removeClass(i).addClass(r):(n(t).removeClass(i).addClass(r),n(t.form).find("label[for="+t.id+"]").removeClass("label-"+i),($select=n(t).parent(".select-wrap")).length&&$select.removeClass(i).addClass(r))},ignoreTitle:!0,onkeyup:!1});n("#product-form").validate();n(".validate-form").each(function(){n(this).validate()});n(document).on("change.country","select.country-select",function(){var r=n(this),o=r.parents("form"),s=o.data("validator"),t=r.parents(".form-list").find("select.state"),u=r.parents(".form-list").find("input.zip"),f=r.parents(".form-list").find("input.phone"),i=r.val(),e;if(i!=""){if(i=="US"||i=="CA")return t.addClass("required").parents("li").show(),u.addClass("required"),f.removeClass("phoneNonUS").addClass("phoneUS"),e=t.val(),t.find("option").eq(0).siblings().remove(),i=="CA"?u.removeClass("zipUS").addClass("zipCA"):i=="US"&&u.removeClass("zipCA").addClass("zipUS"),AjaxJsonPostWrapper.ajaxRouteNonAsync("Product","GetStateList",{country:i},function(i){n(i).each(function(){n("<option/>",{value:this.Value,text:this.Text}).appendTo(t)})},null,function(){t.find("option").each(function(){n(this).val()===e&&n(this).prop("selected",!0)});t.customSelect("updateText")});t.empty();t.removeClass("required").parents("li").hide();u.removeClass("zipCA").removeClass("zipUS");f.removeClass("phoneUS").addClass("phoneNonUS")}});n(document).on("change.month","select.month-select",function(){for(var u=n(this),r=u.parents("form"),i=r.find(".day-select"),o=new Date,s=parseInt(u.val()),h=r.find(".year-select").val()==""?o.getFullYear():parseInt(r.find(".year-select").val()),f=new Date(h,s,0).getDate(),e=i.children("option").length-1,t=e;t>=0;t--)t>f&&i.children("option").eq(t).remove();for(t=e+1;t<=f;t++)i.append('<option value="'+t+'">'+t+"<\/option>");i.customSelect("updateText")})}(window.jQuery);!function(n){var r=this,t="AjaxCart",i=this.AjaxCart=function(t,i){this.$element=n(t);this.$element.data(this.namespace,this);this.options=n.extend({},this.defaults,i);this.prepare()};i.prototype={namespace:t,defaults:{miniCartContainer:"#cartSummary",onBeforeSubmitCallback:null,onSuccessCallback:null,onFailureCallback:null},prepare:function(){var n="",t=null;if(($form=this.$element.parents("form")).length&&$form.data("validator")&&$form.valid()&&(n=$form.prop("action"),t=$form.serialize(),this.setButtonState(!1),this.submit(n,t),typeof this.options.onBeforeSubmitCallback=="function"))this.options.onBeforeSubmitCallback(this)},setButtonState:function(n){n?this.$element.prop("disabled",!1).removeClass("disabled"):this.$element.prop("disabled",!0).addClass("disabled")},submit:function(t,i){var r=this;Gorilla.util.messages.clearMessages();n.ajax({type:"POST",url:t.toLowerCase(),data:i,dataType:"json"}).done(function(n){r.handleSuccess(n)}).fail(function(n,t,i){r.handleFailure(i)}).always(function(){r.setButtonState(!0)})},handleSuccess:function(t){var i,r;if(t.success?(t.message!=null&&t.message!=""&&Gorilla.util.messages.addMessages(t.messages,"success"),i=n("#tealiumAjax"),i.empty(),i.append(t.tealium),t.certona&&(r=n("#certonaAjax"),r.empty(),r.append(t.certona)),window.scrollTo(0,0),window.location.href.indexOf("cart/viewcart")>-1&&setTimeout(function(){window.location.replace(window.location)},2e3)):t.messages&&Gorilla.util.messages.addMessages(t.messages,"error"),typeof this.options.onSuccessCallback=="function")this.options.onSuccessCallback(this,t)},handleFailure:function(n){if(alert("An error occurred while process your request. Please try again shortly."),typeof this.options.onFailureCallback=="function")this.options.onFailureCallback(this,n)},reset:function(){},unset:function(){n(document).off("click.ajaxCart")}};n.fn[t]=function(r){var f=arguments,u;if(r===undefined&&(r={}),typeof r=="object")return this.each(function(){new i(this,r)});typeof r=="string"&&i.prototype[r]?(u=n(this).data(t),u[r].apply(u,Array.prototype.slice.call(f,1))):console.error("Method "+r+" does not exist in "+t)};n(document).on("click.ajaxCart",'[data-ajax="true"]',function(t){t.preventDefault();n(this).AjaxCart()})}(jQuery);AjaxJsonPostWrapper=function(){var n={};return n.async=!0,n.getBaseUrl=function(){var n=window.location.pathname.split("/");return window.location.protocol+"//"+window.location.host},n.getUrl=function(t,i){return n.getBaseUrl()+"/"+t+"/"+i},n.getFormData=function(n){for(var i=$(n).serializeArray(),r={},t=0;t<i.length;t++)r[i[t].name]=i[t].value;return r},n.ajaxUrl=function(t,i,r,u,f,e){var o="POST";return e!=undefined&&(o=e),$.ajax({type:o,url:t,async:n.async,data:JSON.stringify(i),contentType:"application/json",traditional:!0,success:function(n){r!=undefined&&r(n)},complete:function(){f!=undefined&&f()},error:function(n,t,i){if(n.responseJSON.systemError){var r=AjaxJsonPostWrapper.getBaseUrl()+"/error/error?errId="+n.responseJSON.errorId;window.location.replace(r)}u!=undefined?u(i):Gorilla.util.messages.addMessage("Sorry, there was an error with your request. Please try again shortly.","error")}}).done(function(n){n.errors&&onDataError(n)})},n.ajaxRoute=function(t,i,r,u,f,e,o){n.async=!0;var s=n.getUrl(t.toLowerCase(),i.toLowerCase());return n.ajaxUrl(s,r,u,f,e,o)},n.ajaxRouteNonAsync=function(t,i,r,u,f,e,o){n.async=!1;var s=n.getUrl(t.toLowerCase(),i.toLowerCase());return n.ajaxUrl(s,r,u,f,e,o)},n}();!function(n){n(function(){function o(t,i){switch(n(i).get(0).tagName.toLowerCase()){case"a":document.location.href=i;break;case"img":var r=n(i).parent();r.get(0).tagName.toLowerCase()=="a"&&(document.location.href=r.attr("href"))}}var u,t,i,f,c,e,r;Modernizr.addTest("csscalc",function(){var n="width:",t=document.createElement("div");return t.style.cssText=n+Modernizr._prefixes.join("calc(10px);"+n),!!t.style.length});Modernizr.csscalc||n("html").addClass("no-csscalc");Gorilla.util.initForms();($tabs=n("#tabs")).length&&$tabs.tabby({tabs:".tab",tabContainers:".tab-container"});($modalTrigger=n(".trigger-modal")).length&&$modalTrigger.moby({modalClass:"generic"});($tooltip=n(".tool-tip")).length&&$tooltip.tipsy({tip:".tip",bounds:n("body"),responsive:!0});($lazyImg=n("img.lazy")).length&&$lazyImg.lazyload({data_attribute:"orig"});($hero=n("#hero")).length&&($hero.carouselSlider({responsive:!0,animation:"horizontal-slide",tagType:".hero-slide"}),$hero.swipe({click:function(n,t){o(n,t)},swipe:function(n,t){t=="right"?$hero.carouselSlider("slide","previous"):t=="left"&&$hero.carouselSlider("slide","next")},allowPageScroll:"vertical",excludedElements:"button, input, select, textarea, .noSwipe"}));($slider=n(".default-slider")).length&&($slider.bananaPeel({navigation:!1,track:"ul",items:"li",itemsToShow:4,callback:function(){$slider.find("img.lazy").lazyload({data_attribute:"orig",event:"showImages"});n("img.lazy").trigger("showImages")}}),n("html").hasClass("ie8")||$slider.swipe({click:function(t,i){if(n(this).attr("id")!="alternate-images")o(t,i);else switch(n(i).get(0).tagName.toLowerCase()){case"img":var r=n(i).parent();r.get(0).tagName.toLowerCase()=="a"&&r.attr("rel")=="zoom-id:main-image"&&(n("#mainImageCaption").text(n(i).attr("title")),MagicZoomPlus.update("main-image",r.attr("href"),n(i).attr("src")))}},swipe:function(t,i){i=="right"?n(this).bananaPeel("slide","previous"):i=="left"&&n(this).bananaPeel("slide","next")},allowPageScroll:"vertical",excludedElements:"button, input, select, textarea, .noSwipe"}));($clubStoreTrigger=n("#club-store-modal-trigger")).length&&setTimeout(function(){$clubStoreTrigger.moby({modalClass:"club-store-modal",bodyClose:!1,keyActions:!1,onCompleteCallback:function(){}}).moby("show","#club-store-modal")},1e3);AjaxCart.prototype.defaults.onSuccessCallback=function(t,i){if(i.miniCartHtml&&i.miniCartHtml!==""&&(setCartQuantityText(),n(t.options.miniCartContainer).html(i.miniCartHtml),n(".customer-nav").DropIt("showMenu",n("#mini-cart .drop-down")),window.setTimeout(n.proxy(function(){n(".customer-nav").DropIt("hideMenu",n("#mini-cart .drop-down"))},this),5e3)),i.freeGiftHtml&&($giftTrigger=n("#freegift-trigger")).length&&($giftModal=n("#freegift-modal")).length&&($giftModal.html(i.freeGiftHtml),$giftTrigger.moby({modalClass:"free-gift",onCompleteCallback:function(){Gorilla.util.initForms();n("#free-gift").validate()}}).moby("show","#freegift-modal")),i.personalizeHtml&&(i.personalizeHtml.substr(0,10)=="embroidery"?document.location.href="/cart/"+i.personalizeHtml:($personalizeTrigger=n("#personalize-trigger")).length&&($personalizeModal=n("#personalize-modal")).length&&($personalizeModal.html(i.personalizeHtml),$personalizeTrigger.moby({modalClass:"personalize-mod",onCompleteCallback:function(){Gorilla.util.initForms();n("#personalize-mod").validate()}}).moby("show","#personalize-modal"))),i.success?($moby=t.$element.parents(".moby-container")).length&&($moby.find(".moby-close").trigger("click").off("click"),n("#FreeGiftItemId").val(0),n("FreeGiftPromoCode").val("")):Gorilla.util.messages.addMessages(i.messages,"error"),$quickorderAdd=n("#quickorder-add"),$quickorderAdd.length)return AjaxJsonPostWrapper.ajaxRoute("cart","getquickordercart",{},function(t){n(".main").html(t);updateCartSummary();setCartQuantityText();Gorilla.util.initForms();n(".btn-quickview").find("a").moby({modalClass:"quickview",onCompleteCallback:function(){var t,i;Gorilla.util.initForms();t=n(".quickview-form");t.validate();i=t.find(".product-description");Gorilla.util.truncateAndReplaceHtml(i,600);n(".quickview").find("#quickViewMoreDetails").detach().appendTo(".quickview .product-description")}})});i.cartHtml&&n("#cartContainer").html(i.cartHtml)};var a=n("a[id$=intl-shopping-trigger]").moby({modalClass:"generic intl-shopping-modal",onCompleteCallback:function(){Gorilla.util.initForms();n("#intl-shopping-form").validate();n("#intl-shopping").find(".close-link").click(function(t){t.preventDefault();n("#"+n("#hidden-intl-shopping-trigger").val()).moby("hide")})}}),v=n(".tracking-info-trigger").moby({modalClass:"generic tracking-info-modal",onCompleteCallback:function(){Gorilla.util.initForms()}}),y=n("#div-audio-trigger").moby({modalClass:"audio-modal",onCompleteCallback:function(){Gorilla.util.initForms()}});n(".btn-quickview").find("a").moby({modalClass:"quickview",onCompleteCallback:function(t){var i=n(t).find("form"),r;i.validate();r=i.find(".product-description");Gorilla.util.truncateAndReplaceHtml(r,600);i.find("#quickViewMoreDetails").detach().appendTo(".quickview .product-description");i.find(".notifyBtn").find("a").moby({modalClass:"giveaway-modal",onCompleteCallback:function(){}});Gorilla.util.initForms()}});n(".notifyBtn").find("a").moby({modalClass:"giveaway-modal",onCompleteCallback:function(){}});var p=n(".sharewishlist-trigger").moby({modalClass:"generic sharewishlist-modal",onBeforeCloseCallback:function(){n("#email-wishlist-form").trigger("reset");var t=n("#email-wishlist-form").validate();t.resetForm();n("#email-wishlist-form label").removeClass("label-error");n("#message-block").fadeOut("slow");n("#message-block").html("")},onCompleteCallback:function(){Gorilla.util.initForms();n("#sharewishlist-modal").find(".close-link").click(function(t){t.preventDefault();n(".sharewishlist-trigger").moby("hide")})}}),w=n("#wishlistmessage-trigger").moby({modalClass:"generic wishlistmessage-modal",onBeforeCloseCallback:function(){},onCompleteCallback:function(){}}),b=n("#welcome-trigger").moby({modalClass:"generic welcome-modal",onBeforeCloseCallback:function(){},onCompleteCallback:function(){n("#welcome-modal").find(".close-link").click(function(t){t.preventDefault();n("#welcome-trigger").moby("hide")})}});if(n("body").hasClass("view-all")){u=n("#product-listing-container");t=n("#back-to-top");t.click(function(){n("html, body").animate({scrollTop:0},"fast")});function s(){t.css("left",u.offset().left+u.width()-t.width()-2)}s();n(window).on("resize.backToTop",Gorilla.util.throttle(function(){s()},150));function h(){n(window).scrollTop()>150?t.css({display:"block"}):t.css({display:"none"})}h();n(window).on("scroll.backToTop",Gorilla.util.throttle(function(){h()},150));u.infinitescroll({loading:{finishedMsg:"",msgText:"",selector:null,speed:"fast",img:"/images/gorilla/ajax-loader.gif"},debug:!0,binder:n(window),nextSelector:".toolbar .paging a.next",navSelector:".toolbar .paging ol",maxPage:n(".toolbar .paging .total-pages").html(),contentSelector:"#product-listing-container",itemSelector:"#product-listing-container .products-grouping",bufferPx:10},function(t){n.each(t,function(){n(this).find("img.lazy").lazyload({data_attribute:"orig",event:"showImages"});Gorilla.util.setHeight(n(this));n(this).find(".btn-quickview > a").moby({modalClass:"quickview",onCompleteCallback:function(){var t=n(".quickview-form"),i;t.validate();i=t.find(".product-description");Gorilla.util.truncateAndReplaceHtml(i,600);n(".quickview").find("#quickViewMoreDetails").detach().appendTo(".quickview .product-description");Gorilla.util.initForms()}})});n("img.lazy").trigger("showImages")})}if(Gorilla.util.getCookie("_giveAway")||(i=n("#EnticementId").val(),i!=null&&i!=""&&i!="0"&&AjaxJsonPostWrapper.ajaxRoute("main","gethomepagepopup",{id:i},function(t){t.popupHtml!=""&&n("#EnticementDiv").replaceWith(t.popupHtml)},null,function(){var t=n("#giveaway-modal-trigger");t.length&&setTimeout(function(){t.moby({modalClass:"giveaway-modal",onCompleteCallback:function(){Gorilla.util.setCookie("_giveAway","true",30);n("a.close").on("click",function(i){i.preventDefault();n(t).moby("hide")})}}).moby("show","#giveaway-modal")},500)})),f=n("#new-number-form"),f.length){c=n("#existing-numbers");function l(t,i){var u=t.find(".ajax-loader").fadeIn(),r;n("#global-messages").html("");r=t.prop("action");n.post(r,t.serialize(),function(r){var f,e;u.fadeOut();r.success?(Gorilla.util.messages.addSuccess(r.message,!1),f=t.find(".input-text"),i?($template.find(".number").text(f.val()),f.val("")):(e=t.parents("li"),e.find(".number").text(f.val()),e.find(".info").show(),t.remove())):Gorilla.util.messages.addError(r.message,!1);Gorilla.util.scrollTo(n("#global-messages"),!0,400)},"json")}f.validate({submitHandler:function(){l(f,!0)}})}e=n("#card-balance-form");e.length&&(r=n("#balance-message"),e.validate({submitHandler:function(t){var i=n(t).find(".ajax-loader"),u=n(t).prop("action");r.text("");i.show();n.post(u,n(t).serialize(),function(n){r.text(n.message);n.success?r.addClass("success"):r.addClass("error");i.hide()})}}));n(document).on("touchmove",function(t){if(n("body").hasClass("nav-showing")){var i=n(t.target);(i.is("#nav-wrapper")||i.parents("#nav-wrapper"))&&t.stopPropagation()}})})}(window.jQuery);String.prototype.aP=function(){return this.replace(/(["\\\.\|\[\]\^\*\+\?\$\(\)])/g,"\\$1")};String.prototype.aU=function(){return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")};customarray=[".223 ammunition","carhartt","crossbow",".22 ammunition","9mm ammunition","223 ammo","7.62x39 ammunition","ar15","trail camera","sks","backpack","game camera","holster","holsters","guide gear","gun safe","under armour","ar 15","wrangler","vest","wolverine","tent","flashlight","gun safes","22lr ammunition","glock","22 ammo","9mm",".308 ammunition","wolf ammunition","german","9mm ammo","300 aac ammo","ar",".223","ak","ammo cans","ar-15",".22 lr","hunting blinds","hornady ammunition","tents","ruger 10/22","ar 15 magazine","air rifle","sks magazine","sunglasses","black powder","rocky boots","gloves","wool","7.62x39","10/22","223","atn nightvision","magazines","range finder","ar15 magazine","ak47","laser","glock magazine","crossbows","hammock","22 lr ammunition","magazine","tarp","dickies","reloading","22lr",".380 ammunition","binoculars","5.56 ammunition","solar","tree stands","mosin nagant","tree stand","bipod","mens watches","watch","7.62x54r","camera","targets","gas mask","walls","hat","1911","sleeping bag","hats","1911 holster","ground blind","gun case","ar15 accessories","reloading supplies","womens boots","ak 47","generator","ruger","wrangler and riggs","22",".40 s","223 ammunition","ammo box","blinds","blind","night vision","parts kit","shooting targets","7.62x54r ammunition","socks","fixed blade knives","mre","axe","british","browning","belt","laser boresighter","10/22 magazine","5.11 tactical","tactical vest","watches","crossbow bolts","ar 15 accessories","rangefinder","heater","300 blackout",".223 ammo","rifle case","mini 14","survival","rope","sling","machete","sks stock","voodoo tactical","22 lr","zombie","gps","spotting scope","eotech","shoulder holster","smith ","trail cameras","9mm luger","gun cleaning kit","rocky","308 ammo","waders","polarized sunglasses","ladder stand","shotgun","compass","emergency food","carhartt jacket","helmet","game cameras","chair","5.11","swiss","flashlights","shorts","tarps","1911 magazine","canteen",".45 ammunition","tactical flashlight","compound bow","5.56","belts",".22","cot","archery target","5.45x39","pmag","black powder guns","first aid kit","poncho","barrel","merrell","molle","safe","ar-15 accessories","danner boots","shotgun accessories","stove","ak-47",".223 ammunition ","cargo pants","lantern","bayonet","9mm ammunition ","dog bed","scent-lok","115 or 124 or 147",".45 acp","red dot","mini 14 mag","folding knife","gun holster","wool blanket",".22 magnum","motorcycle","frogg toggs","leupold","trail cam","gas can","swedish","green laser sights","blanket","deer feeder","air gun","muck boots","boresighter","bulk ammo","m1 carbine","kayak","camo pants","goggles","blankets","first aid","rifle sling","barnett crossbow","wolverine boots","grill","tactical light",".22lr","mens slippers",".22 ammo","5.7x28","fire starter","underarmour","bedding","pistol case","heaters","gun cases","wallet","red dot sight","ar 15 upper","pellet rifle","range bag","308","atn night vision","meat grinder","italian","m16","12 gauge","snake boots","45 acp ammunition","remington 870","backpacks","camo clothes","metal detector","smoker","parka","tactical backpacks","scent lok","cooler","leather holster","12 gauge bulk ammunition","bdu","guide gear hunting","traps","nikon","buckshot","38 special","30-06 ammunition","red dot scope","russian","batteries","gun rack","ruger magazine","9 mm ammo","green laser","composite toe","target","ammo boxes","ruger holster","tactical scope","recurve bow","vests","rain gear","fire pit","red rock","coveralls","saiga","pistol scope","enter a stock number","hunting blind","camo netting","chairs","mossberg 500","wool pants","canopy","mag pouch","feeders","led flashlight","jerry can","22lr ammo","binocular","gun cabinet","scope rings","concealment vest","carhartt clothing","ak 47 magazine","solar light","wellington boots","deer stand","new balance","solar panel","para cord","ladder tree stand","ak magazine","tomahawk","radio","purse","ak47 magazine",".308","knife sharpener","steel toe","thermold","boat seat","blackhawk holsters","pepper spray","tapco","trail camera ","shotgun ammunition","french","broadhead","357 ammunition","bandolier","shooting rest","air mattress","concealed carry vest","brass","22 lr ammo","czech","9 mm","blackhawk","22 long rifle","speedloader","winch","game camera ","hiking boots","vortex","hatchet","laser sight","bdu pants","portable generator","shotgun scabbard","deer cart","air rifles","ground blinds","primers","luggage","ruger mini 14","fleece","ar mag","cameras","ar15 parts","22 magnum ammunition","spotlight","hunting gear","hunting backpacks","dog","tripod","ar15 scopes","range finders","patio sets","30-30","snow camo","deer hunting","cannon","glock holster","scent blocker","hearing protection","45 acp ammo","converse boots","sog","propane heater","cowboy boots","paracord","1911 grips","scope mount","mosin","army boots","treestand","bb gun","ar15 barrel","ruger 10/22 ","broadheads","night vision scope","boat seats","ladder stands",".410 ammunition","womens clothing","quiver","mossberg","merrell footwear","scope mounts","mens belts","carhartt pants","womens footwear","pouch","slings","fox tactical","bib overalls","ak parts kit","crossbow scope","air guns","ar 15 parts","berne","45 acp","ar15 upper","hang on tree stand","fleece jacket","40 s","mauser","shooting stick","wiley x","stun gun","boresight","tripod deer stand","water filter","sleeping bags","upper","223 amo","truck seat covers","rain jacket","trolling motor","cross bow","m14","gun powder","seat cover","mags","boonie hat","12 gauge slug","beretta","black powder bullets","dpms","slippers","womens shoes","multicam","groovystuff bench","danner","generators","puma knife","flare gun","snow camo clothing","battery charger","camp stove","back pack","wool socks","justin","colt","sks parts",".30 carbine","pellet gun","beretta 92","shovel","wool clothing","walther",".22 lr ammo","cci","gun rest","oakley","patio umbrella","patio heater","sog knives","mens shirts","paper targets","duffel bag","bore sight","barrels","gun cleaning","quad rail","cots","ar upper","safety harness","coolers","voodoo","boat cover","military boots","taurus","crossbow arrows","propane","mens carhartt","ear protection","axes","10/22 stock","shoulder bag","carhartt jeans","hdtv antenna","snowshoes","crossbow accessories","solar battery charger","feeder","hunting waders","reloading kit","gun vise","7.62","gun storage","sandals","new balance shoes",".45 long colt ammo","truck tent","patio furniture","hydration pack","safes","sks scope mount","laser sights","air pistol","22 ammunition","guide gear boots","pea coat","ar-15 magazine","antenna","womens slippers","snow shoe","pistol magazines","trailer","ar 15 magazine ","solar lights","coverall","smokers","leather jacket","sun glasses","airsoft","straps","barska","tankless water heater","gamo","saiga 12","deer camera","rain coat",".22 ammunition ","sightmark","556 ammunition","remington","7.62x25 ammunition","crossbow case","hoodie","georgia boots","water container","handgun safe","carolina","cargo shorts","bedding set","laser rangefinder","380 ammo","climbing stick","gore tex","mens cargo pants","sights","logger boots","seat covers","2 man tree stand","life vest","umbrella","barnett","luminox","parachute cord","columbia","chippewa","suspenders","hand guns","bibs","red jacket","shotgun case","conceal carry","40 cal ammunition","hornady","animal trap","fanny pack","saw","alice pack","ar magazine","chest wader","mens socks","mens shorts","jeans","underwear","magazine pouch","cva","ghillie suit","45acp","trench coat","270 ammunition","inversion table","bow case","side zip boots",".22 mag","purses","hq issue","deer stands","2 man ladder stand","fishing reel","bipods","slide fire","henley","rifle cases","ar-15 parts","ankle holster","conceal vest","reflex sight","boot socks","dog beds","survival kit","m1a","8mm mauser","insulated rubber boots","ar-15 magazines","243 ammunition","clips","h","surplus ammo",".17 hmr","survival knife","10-22","mess kit","climber tree stand","7.62x25","carolina boots","shotgun sling","bb guns","electric heaters","wolf 223","sks magazine ","bear spray","helicopter","marlin 795","comforter","rain suit","chaps","fireplace","makarov","climbing tree stand","electric smoker","teepee tent","back packs","survival food","under armour hoodie","castlecreek","storage box","sks ammunition","buck knife","trijicon","caldwell","shotgun ammo","mittens","lasers","nikon scope","kolpin","grills","converse","flannel lined jeans","gun parts kit","shooting bench","pets","ar 15 scope","airguns","cleaning kit","moultrie game camera","hand warmers","log furniture","44 mag ammunition","gaiters","concealed carry","exploding target","sling bag","rechargeable flashlight","food dehydrator","t shirt","atv cover","outdoor mats","machette","kershaw","ladder","thompson center","45 ammo","legendary","groovystuff table","10 22","7.62x54","lanterns","mesa tactical","30 carbine ammunition","wise food","camo backpack","bench","7.62x39 ammo","dehumidifier","magazines pk","bowie knife","gun sling","military helmet","pistol grips","gamo air rifle","30-06","6.8 spc","muzzleloader bullets","military tents","fire","camo jacket","bulk ammunition","poncho liner","polo shirt","wool coat","flag","irish setter boots","realtree","baton","crosbow","tactical shoulder holster",".22lr ammo","reloader","cast iron","ar 15 sights","toilet","motorcycle helmet","bsa scope","camo boots","7.62x51","crossbow broadheads","muzzleloaders","wallets","polish","ladder treestand","springfield xd","snow shoes","womens camo","scent killer","bore sighter","bushnell","military hats","waterfowl","scabbard","food plot","tactical boots","under armour ","camo bedding","ammo pouch","helmets","wood stove","cross bows","308 ammunition","reloading press","red kap",".300 win mag","game feeder","insulated bibs","merino wool socks","t shirts","leather belt","british military","rod holder","45 long colt","dehydrator","gerber","shelter","steel targets","tactical gun case","shooting glasses","youth bow","trap","concealment","hi point","hydration","air rifle ","rucksack","lacrosse boots","handheld gps","decoys","water shoes","hooded sweatshirt","5.56 ammo","pellets","chippewa boots","scentblocker","m16a1","neoprene waders","area rug","shower","stock","sweater","deer blind","mtm","bulgarian","stocks","beef jerky","fishing rod","ax","22 rifle scope","turkey","mens coats","seat","fish finder","bates boots","9x18","remington 597","magazine loader","hammocks","fly fishing","ar barrel","mountain house","balaclava","cart","5.7","winchester","security camera","gun sock","lower parts kit","throwing knife","ak-47 mags","jerky","hunting hats","primer","guide gear apparel","snow pants","flags","sig sauer","belgian","rimfire ammo","thompson","puma","30 round .223 ar15 magazines","sled","stool","tripods","barska rifle scope","shotgun scope","ghille suit","duffle bag","flannel shirt","mossy oak","matches",".380","infrared heater","45 colt","ghillie","water purification","rubber boots","meat slicer","multi tool","scent control","timberland boots","usmc","pmc","shotgun shells",".22 lr ","m1","freeze dried food","seats","carhart","scarf","rangefinders","fan","shooting sticks","rifle slings","ar15 stock",".177 pellet",".38 s","life jacket","ruger lcp","patio bench","45","camo shirt","decoy","power inverter","blind chair","steel toe shoes","20 gauge","hunting vest","380","camo coveralls","battery","powder","game cart","primos","tool box","ariat","predator call","pocket knife","trail cams","camo tarp","air bed","night vision monocular","wool sweater","emergency","boot dryer","glock magazine ","thermal underwear","flash light","ammo case","ar mags","ozonics","meat tenderizer","patio glider","irish setter","flare","ar parts","bolt",".22 scope","00002","molle pouch","smith and wesson","atn","762x39","ammo storage","cover scent","plano","hunting chair","kevlar","gerber knife","gunsmith tools","cold weather gloves","10/22 mag","medical","handgun case","blackpowder","archery targets","infrared game camera","bow holder","m1 garand","mens wolverine","long underwear","gazebo","bushnell ","870","hang on treestand","field jacket","garden","single point sling","face mask","wildgame innovations","rain","shotguns","military belts","bed","led","slingshot","ar 15 optics","towels","nagant","bar stool",".40","athletic shoes","shotgun slugs","airgun","climbing sticks","hunting clothes","choke tube","marlin","303 british","long johns","bed frame","hitch","3xl","ar15 magazine ","fuel can","dickies pants","solar charger","tactical lights","duty boots",".308 ammunition ","duck decoys","ar scope","east german","ammo magazines","deer decoy","electric fireplace","hip waders","aimpoint","game cam","electric fireplaces","traditions","firearms","insulated boots","garmin gps","folding chair","camp chair","atv winch","boat shoes","stoves","cord","gun clock","ruger clips","leather jackets","treestands","justin boots","ncstar","m4","ameristep hunting blind","walls clothing","22 wmr","coleman","thermacell","zip off pants","ar 15 stock","ar magazines","cross bows barnett","hide a gun","deer feeders","hunting seat","drum","greenhouse","utv accessories","kids","tackle box","insulated coveralls","winchester ammunition","10mm ammunition","crossbow scopes","assault rifle case","recoil pad","pouches",".357 sig","canoe","300 aac","compound bows","aim sports","pet","12 gauge ammo","22 mag","sling shot","38 special ammo","solar radio","tactical rifle case",".38 special","shell holder","awning","led lantern","hot water heater","sweatpants",".308 ammo","410 shotgun",".22 short","mres","pistol scopes","hunting camera","uzi","30.06 ammunition","airsoft gun","mr heater","pac boots","ghillie suits","22-250 ammunition","bivy","38 ammo","remington ammunition","magnifier","sleeping pad","sketchers","muzzleloader scope","security man","hunting gloves","gas cans","ear muffs","g3","m65","hunting boots","flashlight mount","mickey mouse boots","promag","net","picatinny","crossbow pistol","flash lights","bowfishing","speed loader","key","mora","wellington","ar-15 scope","denim shirt","17 hmr","german military","rimfire","fiocchi","5.11 pants","cast iron cookware","atv rack","womens carhartt","mickey boots","rail","spotting scopes","bed sheets","45-70","atv hitch","golf","muck","cookware","sabot slugs","fishing vest","cap","womens hunting boots","hiking shoes","curtains","flecktarn","carharrt","bomber jacket","gas heater","snowmobile","mens tactical pants","waterproof shoes","bolts","ghost blind","military jacket","serbian","hk","ar-15 mag","pistol holster","work pants","ghilie suit","scent","pillow","ear plugs","mag loader","tactical bag","bike","pet bed","hoist","wellco","laser light","bsa sweet","anchor","fountain","fishing tackle","infared heater","4xl","moccasin","silver bear","browning knife","motorcycle boots","550 cord","cuddeback","muzzle brake","foregrip","dutch","sks scope","clock",".32 ammunition","leather vest","candle","fans","pink camo","pet supplies","shooting bag","burris","mattress","overalls","30-30 ammo","monocular","ground blind ","gun parts","mini 14 mag ","timberland","train set","tow strap","10/22 barrel","mosquito","dutch oven","7.62 x 39","sweatshirt","folding shovel","military watch","scale","headlamp","snow",".30-06","mini 14 stock","wolf","womens coats","camp kitchen","22ammo","norwegian","federal ammunition","laser flashlight","rain pants","chamois shirt","italian wool blanket","buddy heater","tripod stand",".45","paintball","harness","arrow rest","tumbler","ballistic vest","double sleeping bag","22 hornet","heated gloves","crossbow ","fishing line","mosquito net","leatherman","rails","canvas","night vision binoculars","30 carbine","shooting rail","digital camo","pink","ar stock","bicycle","bi pod","quilt","pse","bear","carpenter jeans","blaze orange","camo fleece","556","body armor","bird feeder","merrell shoes","atv gun rack","duster","russell outdoors","ruger 10/22 magazine","parts kits","camo hoodie","sword","combat shirt","receiver","3006 ammunition","double gun case","utv","beretta holster",".357","green house","molle gear","bates","9mm fmj","pajamas","camo rain gear","lighter","22 mag ammo","winter boots","leather gloves","propet","bow fishing","ammo belt","jump starter","4 season tent","glock magazines","dpm","fishfinder","stripper clip","waterproof jacket","acog","mens hoodies","laser boresighter ","motorcycle cover","beds","spoting scope","hand warmer","7mm-08","memory foam mattress","shotgun bulk ammo","ar 15 accessories ","22 lr ammunition ","combat boots","streamlight","carhartt vest","police","table lamp","pentax scope","ar-15 mags","glasses","quilts","amo","water storage","safety glasses","22 cal ammo","hunting pants","rcbs","stealth cam","2 way radios","security","rage broadheads","electric blanket","camo gloves","camo vest","lowrance","blank gun","sight","chamois shirts","glock parts","mini 30","mosin nagant ","rifle scabbard","ar 15 magazines","pontoon","moultrie","chainsaw","trigger","gun racks","backpack ","mens pants","brass catcher","38","chest rig","revolver holster","ak mag","7.62x54 ammo","bow hanger","fishing pole","pistol rack","camo shorts","deer","netting","sig","lone wolf","5.45","telescope","pistol cases","clogs","capote","demin shirt","fuel","head lamp",".17 bulk ammo","snowshoe","camo net","womens boots","insulated hunting boots","springfield","swivel chair","canvas tent",".380 ammo","knee pads","savage","snow boots","expandable baton","7mm","lead sled","bsa","folding knives","tactical pants","reload","flares","mask","bucket","chest waders","woodland camo","357 ammo","revolver","john deere","czech military","9mm luger ","clip","wool blankets","work gloves","teepee","guille suit","fire ring","gore-tex","gortex","alice","work shoes","hoodies","air rifle scope","windmill","weaver scope rings","blank ammunition","kabar","wwii","8mm","denim jacket","meat","ar15 sling","caps","carhartt boots","army watch","fishing gear","gun belt","camping equipment","ak 74","suspender","flir","weaver scope","vertical grip","blazer","water heater","hogue","double rifle case","safety toe","violin","camo bibs","tree seat","co2",".40 ammo","air compressor","gas masks","rockport","inverter","t-shirt","john deere boots","bushnell rangefinder","polo","chiminea","slip on shoes","base layer","ar sights","tracer","hammer","m65 jacket","shooting vest","tru spec","furniture covers","pentax","mako","snugpak","coyote trap","motorcycle jacket","bushnell scope",".380 ammunition ","black powder ","dog collar","flintlock","patches","electronic calls","ar15 scope","hungarian","8mm ammunition","horse","380 ammunition","night scope","243","duffle bags","scope ring","used","game feeders","stack gun safe","swedish military","camo clothing","multi cam","upland","crossbow target","sling swivel","deep fryer","gas block","22lr ammunition ","bolt carrier","shotgun accessories ","45 auto","dehydrated food","handgun scope","pull on boots","ak74","benjamin","pellet pistol","weapon light","ak mags","thermal","slugs","spot light","archery sights","spypoint","gillie suit","night vision goggles","300 savage","browning hoodie","game camera viewer","womens cowboy boots","leather chaps","led light","tannerite","rifle bullets","snap cap","flannel","camera mount","ar 15 mags","cold weather socks","harley davidson","flight jacket","navy","water bottle","magpul","concealed carry purse","cleaning kits","deer attractant","youth camo","digital scale","sks mag","gas grill","pillows","10mm","357","womens boots ","range bags","snake proof boots","walkie talkie","12 guage","22 cal","candles","lasermax","austrian","military pants","tactical vests","fleece pants","vacuum sealer","tokarev","22 magnum",".243","bow sight","brown bear","deer hoist","shed","357 mag","sausage stuffer","ar15 magazines","water pump","ammo cases","guide gear camping","camo shirts","pellet guns","mat","led lights","t-shirts","kimber","canteens","antler mount","humminbird","redfield scope","fleece lined jeans","ice auger","moose","300 wsm","slot cars","military sweater","rod holders"];!function(n){n(function(){Respond.to({media:"(min-width:961px)",namespace:"fullMenu","default":"if","if":function(){n(".shop").find(".fly-out").html("<h4>Loading...<\/h4>")},"else":function(){getTabletMobileDeptMenu()}});Respond.to({media:"(min-width: 959px)",namespace:"smallDesktop","default":"if","if":function(){($nav=n("#nav")).length&&($nav.mobileNav("unset"),$nav.find(".drop-down, .fly-out").removeClass("content").end().accordion("unset"),$nav.DropIt({triggerSelector:"li.level-top",menuSelector:".drop-down",delay:200}),$nav.find(".shop ul.level0").DropIt({triggerSelector:"> li",menuSelector:".fly-out",delay:200,onHover:function(t){var i=n(t),r=!1;r||i.data("loaded")||n.ajax({url:i.data("menu"),type:"post",dataType:"html",beforeSend:function(){r=!0}}).done(function(n){i.find("> a").after(n).end().data("loaded",!0);$nav.find("ul.level0").DropIt("showMenu",i.find(".fly-out"))}).always(function(){r=!1})}}),n(".customer-nav").DropIt({triggerSelector:".trigger",menuSelector:".drop-down"}));($filters=n("aside.filters")).length&&$filters.mobileNav("unset");($accordion=n("#footer").find(".accordion")).length&&$accordion.accordion("unset");($filterAccordion=n(".filters .accordion")).length&&$filterAccordion.accordion("unset");($leftMenu=n("aside.col-left-menu")).length&&$leftMenu.mobileNav("unset");($tabs=n("#tabs")).length&&$tabs.tabby("respond",!1)},"else":function(){var t;if(($nav=n("#nav")).length&&($nav.DropIt("unset"),$nav.find("ul.level0").DropIt("unset"),n(".customer-nav").DropIt({triggerSelector:".trigger",menuSelector:".drop-down"}),$nav.mobileNav({addBodyClass:!0}),$nav.find(".drop-down").addClass("content").end().accordion({trigger:".parent a.level-top",container:".drop-down",containerInner:"> ul"}),$nav.accordion({trigger:".shop ul.level0 > li.parent > a",container:".fly-out",containerInner:"> .content-inner",onClickCallback:function(t){var i=n(t),r=!1;r||i.parent("li").data("loaded")||n.ajax({url:i.parent("li").data("menu"),type:"post",dataType:"html",beforeSend:function(){r=!0}}).done(function(n){i.parent("li").data("loaded",!0).end().after(n);i.next(".fly-out").addClass("content");$nav.accordion("open",i)}).always(function(){r=!1})}})),($filters=n("aside.filters")).length){t=n(".filters-close");$filters.mobileNav({triggerSelector:"#filter-toggle",onOpenCallback:function(){n(".category-view").addClass("filters-showing")},onCloseCallback:function(){n(".category-view").removeClass("filters-showing")}});t.on("click touch",function(){$filters.mobileNav("close")})}if(($accordion=n("#footer").find(".accordion")).length&&$accordion.accordion({trigger:"h5",container:".content",containerInner:"> ul"}),($filterAccordion=n(".filters .accordion")).length&&$filterAccordion.accordion({trigger:"h5",container:".content",containerInner:"> ul"}),($leftMenu=n("aside.col-left-menu")).length){t=n(".filters-close");$leftMenu.mobileNav({triggerSelector:"#col-left-menu-toggle",onOpenCallback:function(){n("body").addClass("filters-showing")},onCloseCallback:function(){n("body").removeClass("filters-showing")}});$leftMenu.on("click touch",function(){$leftMenu.mobileNav("close")})}($tabs=n("#tabs")).length&&$tabs.tabby("respond",!0)}});Respond.to({media:"(min-width: 731px)",namespace:"phone","default":"else","if":function(){var t=ak(document.getElementById("k"),customarray,"kform");n("body").removeClass("mobileVideo");($sugSlider=n(".suggestion.default-slider")).length&&$sugSlider.bananaPeel("respond",{navigation:!1,buttons:!0,track:"ul",items:"li",itemsToShow:6});($featSlider=n(".featured.default-slider")).length&&$featSlider.bananaPeel("respond",{navigation:!1,buttons:!0,track:"ul",items:"li",itemsToShow:4});($spiffSlider=n(".spiff-container.default-slider")).length&&$spiffSlider.bananaPeel("respond",{navigation:!1,buttons:!0,track:"ul",items:".spiff",itemsToShow:4});($hpSlider=n("#featured-categories")).length&&($hpSlider.data("ismobile",!1),Gorilla.util.initSlider($hpSlider.find(".tab-container.active"),!1))},"else":function(){var t=ak(document.getElementById("searchMobile"),customarray,"mobilekform");n("html").hasClass("ie8")||n("body").addClass("mobileVideo")}});Respond.to({media:"(min-width: 480px) and (max-width: 730px)",namespace:"phone","default":"else","if":function(){n("body").removeClass("mobile");($sugSlider=n(".suggestion.default-slider")).length&&$sugSlider.bananaPeel("respond",{navigation:!0,buttons:!1,track:"ul",items:"li",itemsToShow:4});($featSlider=n(".featured.default-slider")).length&&$featSlider.bananaPeel("respond",{navigation:!0,buttons:!1,track:"ul",items:"li",itemsToShow:2});($spiffSlider=n(".spiff-container.default-slider")).length&&$spiffSlider.bananaPeel("respond",{navigation:!0,buttons:!1,track:"ul",items:".spiff",itemsToShow:2});($hpSlider=n("#featured-categories")).length&&($hpSlider.data("ismobile",!0),$hpSlider.data("count",3),Gorilla.util.initSlider($hpSlider.find(".tab-container.active"),!0,3))},"else":function(){}});Respond.to({media:"(min-width: 300px) and (max-width: 479px)",namespace:"phone","default":"else","if":function(){n("body").addClass("mobile");($sugSlider=n(".suggestion.default-slider")).length&&$sugSlider.bananaPeel("respond",{navigation:!0,buttons:!1,track:"ul",items:"li",itemsToShow:2,margin:5});($featSlider=n(".featured.default-slider")).length&&$featSlider.bananaPeel("respond",{navigation:!0,buttons:!1,track:"ul",items:"li",itemsToShow:1.5,margin:5});($spiffSlider=n(".spiff-container.default-slider")).length&&$spiffSlider.bananaPeel("respond",{navigation:!0,buttons:!1,track:"ul",items:".spiff",itemsToShow:1.25,margin:5});($hpSlider=n("#featured-categories")).length&&($hpSlider.data("ismobile",!0),$hpSlider.data("count",1.5),Gorilla.util.initSlider($hpSlider.find(".tab-container.active"),!0,1.5))},"else":function(){}});Respond.to({media:"(max-width: 680px)",namespace:"phone-cms-account","default":"else","if":function(){n("#main").find(".cms-main [data-respond], .my-account-main [data-respond]").each(function(){var t=n(this);switch(t.data("respond")){case"slider":t.addClass("column-default-slider").bananaPeel({navigation:!0,buttons:!1,track:"ul",items:".spiff",itemsToShow:2,margin:5});t.swipe({click:function(t,i){if(n(this).attr("id")!="alternate-images")switch(n(i).get(0).tagName.toLowerCase()){case"a":document.location.href=i;break;case"img":var r=n(i).parent();r.get(0).tagName.toLowerCase()=="a"&&(document.location.href=r.attr("href"))}},swipe:function(t,i){i=="right"?n(this).bananaPeel("slide","previous"):i=="left"&&n(this).bananaPeel("slide","next")},allowPageScroll:"vertical",excludedElements:"button, input, select, textarea, .noSwipe"});break;case"accordion":t.addClass("accordion").accordion({trigger:".trigger",container:".content",containerInner:"> .inner"})}})},"else":function(){n("#main").find(".cms-main [data-respond], .my-account-main [data-respond]").each(function(){var t=n(this);switch(t.data("respond")){case"slider":t.removeClass("column-default-slider").bananaPeel("unset");break;case"accordion":t.removeClass("accordion").accordion("unset")}})}});var t=n(".products-grid");t.length&&Respond.to({media:"(max-width: 479px)",namespace:"productGrids","default":"else","if":function(){n(window).off("resize.productGrids");t.find(".product-name, .price-box, .stock-note").css({"min-height":""})},"else":function(){Gorilla.util.setHeight(t);n(window).on("resize.productGrids",Gorilla.util.throttle(function(){Gorilla.util.setHeight(t)},150))}});Respond.ready()})}(window.jQuery);EmbroideryTool=function(n){var t=this;this.$progressBar=$("#progress-bar");this.$embroideryForm=$("#embroidery-form");this.$textLeftFields=$("#text-left-fields");this.$textRightFields=$("#text-right-fields");this.$noTextOptionsMessage=$("#no-text-options");this.$layoutStep=$("#layout-steps");this.$layoutBothImage=this.$layoutStep.find("img.layout-both");this.$layoutLogoImage=this.$layoutStep.find("img.layout-logo");this.$layoutLetteringImage=this.$layoutStep.find("img.layout-lettering");this.$logoStep=$("#logo-steps");this.$noLogoImage=this.$logoStep.find("img.no-logo-image");this.$result=$("#embroidery-result");this.$resultLogoContainer=this.$result.find(".logo-container");this.$resultLeftTopText=this.$result.find(".text-left-top");this.$resultLeftBottomText=this.$result.find(".text-left-bottom");this.$resultRightTopText=this.$result.find(".text-right-top");this.$resultRightBottomText=this.$result.find(".text-right-bottom");this.$embroideryTotal=$("#embroidery-total");this.$details=$("#embroidery-details");this.embroideryLogic=n;this.priceData={base:t.embroideryLogic.basePrice};this.errorHtml="<ul class='messages'><li class='negative'>{{message}}<\/li><\/ul>";this.logoOnly=!1;this.textOnly=!1;this.hasRightText=!1;this._prepare();this._reload()};EmbroideryTool.prototype={_reload:function(){$("#hdnIsUpdate").val()=="true"&&($("#hdnDesignId").val()>0?$("#hdnLeftLine1").val()!=""||$("#hdnLeftLine2").val()!=""||$("#hdnRightLine1").val()!=""||$("#hdnRightLine2").val()!=""?(this.$layoutBothImage.click(),$("#hdnLeftLine1").val()!=""&&$("#hdnLeftLine2").val()!=""?$("img.with-logo[data-logickey = 'letteringBoth']").click():$("#hdnLeftLine1").val()!=""?$("img.with-logo[data-logickey = 'letteringAbove']").click():$("#hdnLeftLine2").val()!=""&&$("img.with-logo[data-logickey = 'letteringBelow']").click()):this.$layoutLogoImage.click():(this.$layoutLetteringImage.click(),$("#hdnLeftLine1").val()!=""&&$("#hdnLeftLine2").val()!=""?$("img.no-logo[data-logickey = 'letteringBoth']").click():$("#hdnLeftLine1").val()!=""?$("img.no-logo[data-logickey = 'letteringAbove']").click():$("#hdnLeftLine2").val()!=""&&$("img.no-logo[data-logickey = 'letteringBelow']").click()),$("img[data-logickey = 'thread"+$("#hdnThreadName").val()+"']").click(),($("#hdnRightLine1").val()!=""||$("#hdnRightLine2").val()!="")&&$("#letter-right-side").click(),$("#hdnLeftLine1").val()!=""&&$("#left-top-text").val($("#hdnLeftLine1").val()).keyup(),$("#hdnLeftLine2").val()!=""&&$("#left-bottom-text").val($("#hdnLeftLine2").val()).keyup(),$("#hdnRightLine1").val()!=""?$("#right-top-text").val($("#hdnRightLine1").val()).keyup():($("#result-right-top").hide(),$("#detail-right-top-text").hide(),$("#right-top-text").val("")),$("#hdnRightLine2").val()!=""?$("#right-bottom-text").val($("#hdnRightLine2").val()).keyup():($("#result-right-bottom").hide(),$("#detail-right-bottom-text").hide(),$("#right-bottom-text").val("")),$("#hdnLeftFontId").val()=="1"?$("img[data-logickey = 'textLeftFontBlock']").click():$("#hdnLeftFontId").val()=="2"&&$("img[data-logickey = 'textLeftFontScript']").click(),$("#hdnRightFontId").val()=="1"?$("img[data-logickey = 'textRightFontBlock']").click():$("#hdnRightFontId").val()=="2"&&$("img[data-logickey = 'textRightFontScript']").click(),$("#hdnIsUpdate").val("false"))},_prepare:function(){var n=this;n.$embroideryForm.find("input[type=text]").val("");n.$embroideryForm.find("input[type=checkbox]").removeProp("checked");n.$textLeftFields.add(n.$textRightFields).find("input[type=text]").keyup(function(){n._textInputKeyupHandler($(this))});$(".option-set").find("li.font-style").on("click.embroideryTool","img",function(){n._fontButtonHandler($(this))});$(".option-set").find("li, .field").not(".font-style").on("click.embroideryTool","img, input[type=checkbox]",function(){n._settingClickHandler($(this))});n.$embroideryForm.find(".show-next, .show-previous").click(function(t){var r=$(this).parents(".panel"),i=$(this).hasClass("show-next");t.preventDefault();(!i||n._validateSteps())&&n._switchPanels(r,i)});n.$embroideryForm.validate({rules:{right_top_text:{require_from_group:[1,".right-text-group"]},right_bottom_text:{require_from_group:[1,".right-text-group"]}},submitHandler:function(t){n._updateEmbroideryTotal(!1);$("img[data-logickey = 'textLeftFontBlock']").is(":hidden")&&$("#hdnLeftFontId").val("0");$("img[data-logickey = 'textRightFontBlock']").is(":hidden")&&$("#hdnRightFontId").val("0");$("#hdnLeftLine1").val()==""&&$("#hdnLeftLine2").val()==""&&$("#hdnRightLine1").val()==""&&$("#hdnRightLine2").val()==""&&$("#hdnThreadId").val("0");n._validateSteps()&&($("#hdnLeftLine1").val().replace(/\s+/g,"").toLowerCase()=="yourbusiness"?alert("Please change the default text: "+$("#hdnLeftLine1").val()):$("#hdnLeftLine2").val().replace(/\s+/g,"").toLowerCase()=="namehere"?alert("Please change the default text: "+$("#hdnLeftLine2").val()):$("#hdnRightLine1").val().replace(/\s+/g,"").toLowerCase()=="yourname"?alert("Please change the default text: "+$("#hdnRightLine1").val()):$("#hdnRightLine2").val().replace(/\s+/g,"").toLowerCase()=="yourname"?alert("Please change the default text: "+$("#hdnRightLine2").val()):t.submit())}})},_updateEmbroideryTotal:function(n){return $("#hdnLeftLine1").val($("#left-top-text").is(":hidden")?"":$("#left-top-text").val()),$("#hdnLeftLine2").val($("#left-bottom-text").is(":hidden")?"":$("#left-bottom-text").val()),$("#hdnRightLine1").val($("#right-top-text").is(":hidden")?"":$("#right-top-text").val()),$("#hdnRightLine2").val($("#right-bottom-text").is(":hidden")?"":$("#right-bottom-text").val()),n?AjaxJsonPostWrapper.ajaxRoute("cart","getembroideryquote",{designId:$("#hdnDesignId").val(),leftLine1:$("#hdnLeftLine1").val(),leftLine2:$("#hdnLeftLine2").val(),rightLine1:$("#hdnRightLine1").val(),rightLine2:$("#hdnRightLine2").val()},function(n){_self.$embroideryTotal.text(n)}):void 0},_textInputKeyupHandler:function(n){var i=_self._retrieveLogic(n),t=$(i.toUpdate);t.html(n.val());t.hasClass("circle-type")&&$("html.csstransforms").length&&t.circleType({fitText:!1,radius:50});_self._updateDetailsLabel(null,i,n.val());$("#hdnIsUpdate").val()=="false"&&$("#btnSaveToProduct").is(":visible")&&_self._updateEmbroideryTotal(!0)},_fontButtonHandler:function(n){var i=n.parents("li"),t=_self._retrieveLogic(n),r=$(t.toUpdate);i.find(".selected").removeClass("selected");n.addClass("selected");i.find(".messages").fadeOut();r.prop("class",t.cssClass);_self._updateDetailsLabel(null,t)},_settingClickHandler:function(n){var t=this,e=n.parents(".option-set"),i=t._retrieveLogic(n),r=t._retrieveLogic(e),u,f;e.find(".selected").removeClass("selected");e.find(".messages").fadeOut();n.addClass("selected");i.logoOnly!=undefined&&(t.logoOnly=i.logoOnly,t.logoOnly&&(t.$textLeftFields.hide(),t.$textRightFields.hide()));i.textOnly!=undefined&&(t.textOnly=i.textOnly);i.colorHex!=undefined&&t.$result.css("color",i.colorHex);r!=undefined&&(r.updateImage&&t.$resultLogoContainer.html(n.clone()),r.textOnly!=undefined&&(t.textOnly=r.textOnly));u=i.toShow;typeof u=="function"&&(u=i.toShow(t));$(u).show();f=i.toHide;typeof f=="function"&&(f=i.toHide(t));$(f).hide();t._toggleNoTextOptionsMessage();t._updateDetailsLabel(r,i);t._updateTotalPrice(r,i);t._unifySettings(r.identifier,n)},_unifySettings:function(n,t){var i=this,r,u;switch(n){case"layout":!i.logoOnly&&(i.logoOnly||i.textOnly)?i.textOnly&&(i.$noLogoImage.hasClass("selected")?($("img.no-logo[data-logickey = 'letteringAbove']").hasClass("selected")&&$("img.no-logo[data-logickey = 'letteringAbove']").click(),$("img.no-logo[data-logickey = 'letteringBelow']").hasClass("selected")&&$("img.no-logo[data-logickey = 'letteringBelow']").click(),$("img.no-logo[data-logickey = 'letteringBoth']").hasClass("selected")&&$("img.no-logo[data-logickey = 'letteringBoth']").click()):i.$noLogoImage.click()):$("#hdnIsUpdate").val()=="true"?(r="logo"+$("#hdnDesignName").val().replace(/\s/g,""),$("img[data-logickey = '"+r+"']").click()):(i.$noLogoImage.removeClass("selected"),$("#logo-steps").find("img.selected").length==0&&$("#logo-steps").find("img")[1].click(),$("img.with-logo[data-logickey = 'letteringAbove']").hasClass("selected")&&$("img.with-logo[data-logickey = 'letteringAbove']").click(),$("img.with-logo[data-logickey = 'letteringBelow']").hasClass("selected")&&$("img.with-logo[data-logickey = 'letteringBelow']").click(),$("img.with-logo[data-logickey = 'letteringBoth']").hasClass("selected")&&$("img.with-logo[data-logickey = 'letteringBoth']").click());break;case"lettering-position":t.siblings("img").addClass("selected");break;case"logo":u=i.logoOnly||!i.logoOnly&&!i.textOnly;i.$noLogoImage.hasClass("selected")&&u?i.$layoutLetteringImage.click():i.$layoutLetteringImage.hasClass("selected")&&!i.$noLogoImage.hasClass("selected")&&(i.logoOnly?i.$layoutLogoImage.click():i.logoOnly||i.textOnly||i.$layoutBothImage.click())}},_switchPanels:function(n,t){var i=t?n.next(".panel"):n.prev(".panel");n.fadeTo(350,.01,function(){var r=!1;$("html, body").animate({scrollTop:_self.$progressBar.offset().top},"fast",function(){r||(r=!0,t?_self.$progressBar.find(".active").next("li").addClass("active"):_self.$progressBar.find(".active:last").removeClass("active"),n.hide().css("opacity",1),i.fadeIn(500))})})},_validateSteps:function(){var n=this,t=!0,r=n.$embroideryForm.find(".required:visible"),i=null;return r.each(function(){var f=n._retrieveLogic($(this)),u,r;($(this).hasClass("option-set")||$(this).hasClass("font-style"))&&(u=$(this).find(".selected").length,r=$(this).find(".messages"),u==0?(r.length==0&&(r=$(this).prepend(n.errorHtml.replace("{{message}}",f.errorMessage))),r.show(),t=!1,i==null&&(i=r)):r.hide())}),t||$("html, body").animate({scrollTop:i.offset().top-40},"fast"),t},_updateDetailsLabel:function(n,t,i){var o=this,f=!1,r,e,u,s;if(n!=undefined)switch(n.identifier){case"layout":t.textOnly?($("img[data-logickey = 'textLeftFontBlock']").show(),$("img[data-logickey = 'textLeftFontScript']").show()):t.logoOnly?(this.$layoutStep.find("img.with-logo").removeClass("selected"),this.$layoutStep.find("img.no-logo").removeClass("selected")):($("img[data-logickey = 'textLeftFontScript']").hide(),$("img[data-logickey = 'textLeftFontBlock']").click());break;case"logo":t.id!=undefined&&$("#hdnDesignId").val(t.id);break;case"thread":t.id!=undefined&&$("#hdnThreadId").val(t.id)}if(t!=undefined)switch(t.identifier){case"left-style-text":$("#hdnLeftFontId").val(t.id);break;case"right-style-text":$("#hdnRightFontId").val(t.id)}n!=undefined?(r=$("#detail-"+n.identifier),e=n.label):(r=$("#detail-"+t.identifier),e=t.optionValue,f=!0);u="";t.optionValue==undefined||f?i!=undefined&&(u=i,f=!0):(u=t.optionValue,typeof u=="function"&&(u=t.optionValue()),f=!0);f?(s=e,u.length&&(s+=": <strong>"+u+"<\/strong>"),r.find(".price-label, .label").html(s),t.price&&r.find(".price").text(t.price.toFixed(2)),r.css("display","block"),o.$details.show()):r.hide();o.logoOnly&&($("#detail-lettering-position").hide(),$("#letter-right-side").is(":checked")||$("#detail-thread").hide());o.textOnly&&$("#detail-logo").hide()},_updateTotalPrice:function(n,t){var i=this,f=i.priceData,r=n.identifier,u;if(t.price!=undefined)if(f[r]=t.price,$("#hdnIsUpdate").val()=="true")i.$embroideryTotal.text()==""&&i.$embroideryTotal.text($("#hdnEmbroideryTotal").val());else return r=="layout"&&($("#hdnDesignIdQuote").val(t.textOnly?0:1),i.logoOnly&&($("#hdnLeftLine1Quote").val(""),$("#hdnLeftLine2Quote").val(""),$("#hdnRightLine1Quote").val(""),$("#hdnRightLine2Quote").val(""))),r=="lettering-position"?($("#hdnLeftLine1Quote").val(t.optionValue!="Below Logo"?"Y":null),$("#hdnLeftLine2Quote").val(t.optionValue!="Above Logo"?"Y":null)):r=="right-lettering"&&(u=$("#letter-right-side").is(":checked")?"Y":"",$("#hdnRightLine1Quote").val(u),$("#hdnRightLine2Quote").val(u)),AjaxJsonPostWrapper.ajaxRoute("cart","getembroideryquote",{designId:$("#hdnDesignIdQuote").val(),leftLine1:$("#hdnLeftLine1Quote").val(),leftLine2:$("#hdnLeftLine2Quote").val(),rightLine1:$("#hdnRightLine1Quote").val(),rightLine2:$("#hdnRightLine2Quote").val()},function(n){i.$embroideryTotal.text(n)})},_retrieveLogic:function(n){var t=this,i=n.data("logickey");return t.embroideryLogic[i]},_toggleNoTextOptionsMessage:function(){_self=this;_self.$textLeftFields.css("display")=="none"&&_self.$textRightFields.css("display")=="none"?_self.$noTextOptionsMessage.show():_self.$noTextOptionsMessage.hide()}}