function DisplayAll(){$(".BundleWrapper").css("display","block");$('[id*="collapse"]').css("display","inline");$('[id*="expand"]').css("display","none")}function HideAll(){$(".BundleWrapper").css("display","none");$('[id*="collapse"]').css("display","none");$('[id*="expand"]').css("display","inline")}function removeTargetingCookies(){eraseCookie("wisepops");eraseCookie("wisepops_props");eraseCookie("wisepops_session");eraseCookie("wisepops_visitor");eraseCookie("wisepops_visits");eraseCookie("_fbp");eraseCookie("MR");eraseCookie("_fbp");eraseCookie("_gcl_au");eraseCookie("_rdt_uuid");eraseCookie("ar_debug");eraseCookie("test_cookie");eraseCookie("bcu2");eraseCookie("_cfuvid");eraseCookie("AWSALBCORS");eraseCookie("PHPSESSID");eraseCookie("AWSELBCORS");eraseCookie("ar_debug");eraseCookie("gob_cookie");eraseCookie("iid");eraseCookie("TEST-COOKIE");eraseCookie("a1ashgd");eraseCookie("calltrk_session_id");eraseCookie("_rdt_uuid");eraseCookie("calltrk_session_id");eraseCookie("__cf_bm");eraseCookie("mCookie");eraseCookie("mUserCookie");eraseCookie("SRM_B");eraseCookie("_auid");eraseCookie("_gu");eraseCookie("MUID");eraseCookie("google_push");eraseCookie("tuuid_lu");eraseCookie("test_cookie");eraseCookie("DSID");eraseCookie("IDE");eraseCookie("tuuid");eraseCookie("_gcl_au");eraseCookie("personalization_id");eraseCookie("ANON_ID_old");eraseCookie("ANON_ID");eraseCookie("ttwid");eraseCookie("__cf_bm");eraseCookie("muc_ads");eraseCookie("YSC");eraseCookie("VISITOR_PRIVACY_METADATA");eraseCookie("VISITOR_INFO1_LIVE");eraseCookie("ADS_VISITOR_ID")}function toggleBundle(n){var t=$("#BundleWrapper"+n).css("display");t=="none"&&($("#BundleWrapper"+n).css("display","block"),$("#tab-specs .productHead i#expand"+n).css("display","none"),$("#tab-specs .productHead i#collapse"+n).css("display","inline"));t=="block"&&($("#BundleWrapper"+n).css("display","none"),$("#tab-specs .productHead i#expand"+n).css("display","inline"),$("#tab-specs .productHead i#collapse"+n).css("display","none"))}function isInViewport(n){var t=n.getBoundingClientRect();return $(n).hasClass("slick-slide")?(t=$(n).parent()[0].getBoundingClientRect(),t.top>0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)):t.top>0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}function ImgError(n){var f=n.src,u="/assets/images/noimage.gif",i,r,t;return n.src.length>0&&(i=f.split("/"),i.length==4&&(r=i[3].split("."),r.length==2&&(t=r[0].split("_"),t.length==2&&(isNaN(t[0])||isNaN(t[1])||(u="/assets/images/noimageproduct.gif"))))),n.src=u,n.onerror="",!0}function getParameterByName(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function handleOnKeyDown(){event.key=="Enter"&&(event.preventDefault(),event.target.click())}function validatePhoneNumber(n){return/^\(?(\d{3})\)?[- ]?(\d{3})[- ]?(\d{4})$/.test(n)}function isEmail(n){return/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(n)}function loadLazy(){$(".lazy-img").each(function(){$(this).attr("src")!=$(this).data("full")&&$(this).data("full")!=""&&$(this).attr("src",$(this).data("full"))})}function setServiceButton(){}function getUrlParameter(n,t){var u=n.split("?")[0],r=n.split("?")[1].split("&");for(i=0;i<r.length;i++)if(sParameterName=r[i].split("="),sParameterName[0].toLowerCase()===t.toLowerCase())return typeof sParameterName[1]===undefined?"":decodeURIComponent(sParameterName[1]);return""}function setModalLogin(){return}function resetLoading(){$(".body-loading").css("display","none");$(".body-loading").css("background-color","transparent")}function copyFuncProduct(){var n,t;usingGA4&&gtag("event","Configure Your PC",{event_type:"share",event_action:"copy_url"});usingGA3&&ga("mc.send","event","Configure Your PC","share","copy_url");n=document.getElementById("shareURL");n.select();n.setSelectionRange(0,99999);document.execCommand("copy");t=document.getElementById("myTooltip");t.innerHTML="Copied";$(".desktopShare .dropdown-menu").addClass("show");$(".desktopShare .dropdown").addClass("show");setTimeout(function(){t.innerHTML='<i class="fa fa-copy"><\/i>Copy'},3e3);setTimeout(function(){$(".desktopShare .dropdown-menu").addClass("show");$(".desktopShare .dropdown").addClass("show")},100);$("#Actiontooltip").innerHTML='<i class="fa fa-copy"><\/i>Copy'}function outFuncProduct(){var n=document.getElementById("myTooltip");n.innerHTML!="Copied"&&(n.innerHTML='<i class="fa fa-copy"><\/i>Copy');$("#Actiontooltip").innerHTML='<i class="fa fa-copy"><\/i>Copy'}function bindSubmit(){$(".crtfrm").unbind("submit");$(".crtfrm").submit(function(n){var e,u,h,b,k,c,f,s;currentFormList="";currentFormRecommendationID="";e="instore";thisForm=$(this);var v=!1,y=$(this).find("input[name='ajax']"),p=$(this).find("input[name='cartType']"),l=$(this).find("input[name='na']"),w=l==null||l.val()==""||l.val()=="true";p.length&&(e=p.val());y.length&&y.val()=="true"&&(v=!0,n.preventDefault());var i="",r=0,t="",o;if($(".crtfrm input[name='rf']").val()!=null&&$(this).find("input[name='rf']").val().indexOf(",")<0&&(t=$(this).find("input[name='rf']").val()),t=="Frequently Bought Together")$("#FrequentyPurchasedTogether input[name='productIDsFB']:checked").each(function(){r>0&&(i+=",");i+=$(this).val();r++;var n=$(this).val()}),$(this).find("input[name='productIDs']").val(i);else if(!w){try{$("#bundleAddOnfrm input[name='productIDs']:checked").each(function(){var n,u,f;r>0&&(i+=",");i+=$(this).val();r++;n=$(this).val();u=$("#productRule_"+n).val();u!=null&&(t.length>0&&(t=t+","),t=t+u);f=$("input[name = 'sku']").val();$("#sku_"+n).val()!=null});$("#interstitialfrm input[name='productIDs']:checked").each(function(){var n,u,f;r>0&&(i+=",");i+=$(this).val();r++;n=$(this).val();u=$("#productRule_"+n).val();u!=null&&(t.length>0&&(t=t+","),t=t+u);f=$("input[name = 'sku']").val();$("#sku_"+n).val()!=null});$("#serviceSkufrm input[name='productIDs']:checked").each(function(){var n,u,f;r>0&&(i+=",");i+=$(this).val();r++;n=$(this).val();u=$("#productRule_"+n).val();u!=null&&(t.length>0&&(t=t+","),t=t+u);f=$("input[name = 'sku']").val();$("#sku_"+n).val()!=null});$("#interstitialfrm .productIDsRadio:checked").each(function(){var n,u,f;r>0&&(i+=",");i+=$(this).val();r++;n=$(this).val();u=$("#productRule_"+n).val();u!=null&&(t.length>0&&(t=t+","),t=t+u);f=$("input[name = 'sku']").val();$("#sku_"+n).val()!=null});$("#serviceSkufrm .productIDsRadio:checked").each(function(){var n,u,f;r>0&&(i+=",");i+=$(this).val();r++;n=$(this).val();u=$("#productRule_"+n).val();u!=null&&(t.length>0&&(t=t+","),t=t+u);f=$("input[name = 'sku']").val();$("#sku_"+n).val()!=null});$("#interstitialfrm1 input[name='productIDs']:checked").each(function(){var n,u,f;r>0&&(i+=",");i+=$(this).val();r++;n=$(this).val();u=$("#productRule_"+n).val();u!=null&&(t.length>0&&(t=t+","),t=t+u);f=$("input[name = 'sku']").val();$("#sku_"+n).val()!=null});$(this).find("input[name='productIDs']").val(i);$(this).find("input[name='rf']").val(t)}catch(nt){}try{$("#interstitialfrm1 input[name='productIDs']:checked").each(function(){r>0&&(i+=",");i+=$(this).val();r++});$(this).find("input[name='productIDs']").val(i)}catch(nt){}}try{w||(o=$("#serviceplanfrm input[name='serviceplan']:checked").val(),$(this).find("input[name='serviceplan']").val(o),r>0&&(i+=","),i+=o,r++)}catch(nt){}if(u=$(this).find("input[name='productID']").val(),t=$(this).find("input[name='rf']").val(),h=$(document.activeElement).val(),b=$(this).find("input[name='recommendation_id']").val(),b&&(currentFormRecommendationID=$(this).find("input[name='recommendation_id']").val()),k=$(this).find("input[name='list_id']").val(),k)currentFormList=$(this).find("input[name='list_id']").val();else try{if(u!=null){var d=$(n.originalEvent.submitter),g='[data-id="'+u+'"]',a=d.closest(".product-item");a===null&&(a=d.closest(".detail_wrapper"));c=a.find(g);c!=null&&c.length&&c.data("list")!=null&&(currentFormList=c.data("list"))}}catch(n){}f=$(this).hasClass("miniAjax");v?($("#Aria-Announcements").html("Adding Item To Cart Please Wait"),window.setTimeout(function(){$("#Aria-Announcements").html("")},1e3),$(".body-loading").css("display","block"),f||$(".body-loading").css("background-color","#ffffff"),s=$(this).find(".btn-add"),f||$("#cartModal").html(""),$.ajax({url:"/store/add_productAjax.aspx?ismini="+f,type:"POST",async:!0,data:thisForm.serialize(),success:function(n){if(f){i="";var r=parseInt($(".cartQTY").html())+1;Header.setCartQty(r);$(".body-loading").css("display","none");$(".body-loading").css("background-color","transparent");s.addClass("addedToCart");s.html(s.html().replace("ADD TO CART","ITEM ADDED"));s.html(s.html().replace("Add To List","ITEM ADDED"))}else $("#cartModal").html(n),$("#cartModal").modal("show"),Header.setCartQty($(".cartAjaxQty").html()),bindSubmit(),bindClickItemV2(),bindListClick(),$("#cartModal .modal-interstitial-tabs").productTabs({speed:200}),$(".body-loading").css("display","none"),$(".body-loading").css("background-color","transparent"),$(".crtfrm .big.STBTN").css("display","block");usingBloomreach&&setTimeout(function(){$.when(addBloomreachEvent(u,i,t,h,o,e,"Add On",f)).then(function(){return})},500)},error:function(){$(".body-loading").css("display","none");$(".body-loading").css("background-color","transparent");$(".crtfrm .big.STBTN").css("display","block")}})):usingBloomreach&&$.when(addBloomreachEvent(u,i,t,h,o,e,"Add On",f)).then(function(){return});addToCartClick(u,i,t,h,0,e);usingA1&&$.when(addA1Event(u,i,t,h,o,e)).then(function(){return})});$(".ajaxServicePlan").off("click");$(".ajaxServicePlan").click(function(){var t=$(this).data("spid"),i=$(this).data("productid"),n=$(this).data("serviceproductid"),r=$(this).data("plandescription");typeof $(this).data("spid")!="undefined"&&typeof $(this).data("spid")!="undefined"&&($(".ajaxServicePlan").addClass("off"),$(".ajaxServicePlan").removeClass("on"),$(this).removeClass("off"),$(this).addClass("on"),$(".body-loading").css("display","block"),$.ajax({type:"POST",url:"/store/add_protectionPlanAjax.aspx",data:{spid:t,productid:i,serviceproductid:n,plandescription:r},success:function(t){t.length>2&&($("#servicePlanInfo").html($("#planDetails"+n).html()),bindClickItemV2());$(".body-loading").css("display","none");$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Protection Plan Added<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}}))})}function bindClickItemBR(){$(".productClickItemBR").off("click");$(".productClickItemBR").click(function(){var n,t,i,r;typeof $(this).data("id")!="undefined"&&(productclicked=!0,n="Unknown",typeof $(this).data("list")!="undefined"&&(n=$(this).data("list")),usingGA4&&typeof gtag!="undefined"&&gtag("event","select_item",{item_list_id:String($(this).data("list")||"").replace('\\"'," "),item_list_name:String($(this).data("list")||"").replace('\\"'," "),is_personalized:$(this).data("personalized"),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:[{item_id:$(this).data("id"),item_name:String($(this).data("name")||"").replace('\\"'," "),currency:"USD",index:$(this).data("position"),item_brand:String($(this).data("brand")||"").replace('\\"'," "),item_category:String($(this).data("category")||"").replace('\\"'," "),item_coord:String($(this).data("coord")||"").replace('\\"'," "),item_core:String($(this).data("core")||"").replace('\\"'," "),item_list_id:String($(this).data("list")||"").replace('\\"'," "),item_list_name:String($(this).data("list")||"").replace('\\"'," "),price:$(this).data("price"),quantity:1}]}),usingGA3&&typeof ga!="undefined"&&(ga("mc.ec:addProduct",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:n}),ga("mc.ec:setAction","click",{list:n}),ga("mc.send","event","eCommerce","click",n,{hitCallback:function(){try{!evt.ctrlKey}catch(n){}}})),t=String($(this).data("recommendationid")||"").replace('\\"'," "),usingBloomreach&&(i="Microcenter",t!=""&&(i="Bloomreach"),r=String($(this).data("list")||""),r!="Search Results"&&exponea.track("recommendation",{action:"click",item_id:$(this).data("id"),source:i,recommendation_id:t,list_name:String($(this).data("list")||"").replace('\\"'," "),index:$(this).data("position")})))})}function bindClickItemV2(){bindOptionsContainer();$(".PDPBundleButton").click(function(){$(this).hasClass("BtnOff")?($(this).removeClass("BtnOff").addClass("BtnOn"),$(".PDPBundleButton .addRemove").html('<i class="fa-regular fa-square-minus"><\/i>REMOVE<\/span>'),$(".PDPBundleItem").prop("checked",!0)):($(this).removeClass("BtnOn").addClass("BtnOff"),$(".PDPBundleButton .addRemove").html('<i class="fa-regular fa-square-plus"><\/i>ADD<\/span>'),$(".PDPBundleItem").prop("checked",!1))});$(".productClickItemV2").click(function(){var n,t,i,r;typeof $(this).data("id")!="undefined"&&(productclicked=!0,n="Unknown",typeof $(this).data("list")!="undefined"&&(n=$(this).data("list")),usingGA4&&typeof gtag!="undefined"&&gtag("event","select_item",{item_list_id:String($(this).data("list")||"").replace('\\"'," "),item_list_name:String($(this).data("list")||"").replace('\\"'," "),is_personalized:$(this).data("personalized"),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:[{item_id:$(this).data("id"),item_name:String($(this).data("name")||"").replace('\\"'," "),currency:"USD",index:$(this).data("position"),item_brand:String($(this).data("brand")||"").replace('\\"'," "),item_category:String($(this).data("category")||"").replace('\\"'," "),item_coord:String($(this).data("coord")||"").replace('\\"'," "),item_core:String($(this).data("core")||"").replace('\\"'," "),item_list_id:String($(this).data("list")||"").replace('\\"'," "),item_list_name:String($(this).data("list")||"").replace('\\"'," "),price:$(this).data("price"),quantity:1}]}),usingGA3&&typeof ga!="undefined"&&(ga("mc.ec:addProduct",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:n}),ga("mc.ec:setAction","click",{list:n}),ga("mc.send","event","eCommerce","click",n,{hitCallback:function(){try{!evt.ctrlKey}catch(n){}}})),t=String($(this).data("recommendationid")||"").replace('\\"'," "),usingBloomreach&&(i="Microcenter",t!=""&&(i="Bloomreach"),r=String($(this).data("list")||""),r!="Search Results"&&exponea.track("recommendation",{action:"click",item_id:$(this).data("id"),source:i,recommendation_id:t,list_name:String($(this).data("list")||"").replace('\\"'," "),index:$(this).data("position")})))});$(".ajaxServicePlan").click(function(){var t=$(this).data("spid"),i=$(this).data("productid"),n=$(this).data("serviceproductid"),r=$(this).data("plandescription");typeof $(this).data("spid")!="undefined"&&typeof $(this).data("spid")!="undefined"&&($(".ajaxServicePlan").addClass("off"),$(".ajaxServicePlan").removeClass("on"),$(this).removeClass("off"),$(this).addClass("on"),$(".body-loading").css("display","block"),$.ajax({type:"POST",url:"/store/add_protectionPlanAjax.aspx",data:{spid:t,productid:i,serviceproductid:n,plandescription:r},success:function(t){t.length>2&&($("#servicePlanInfo").html($("#planDetails"+n).html()),bindClickItemV2());$(".body-loading").css("display","none");$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Protection Plan Added<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}}))});$(".eventClick").unbind();$(".eventClick").click(function(){var t=$(this).data("eventcategory"),i=$(this).data("eventaction"),r=$(this).data("eventlabel"),n=$(this).data("eventvalue"),u=$(this).data("eventname");n==null&&(n=1);u!=null&&t!=null&&(usingGA4&&gtag("event",u,{event_category:t,event_action:i,event_label:r,event_value:n}),usingGA3&&$(this).attr("onClick")===undefined&&typeof ga!="undefined"&&ga("mc.send",{hitType:"event",eventCategory:t,eventAction:i,eventLabel:r,eventValue:n}))});$(".promoClickItem").click(function(e){var thislist,list;$(this).data("list")!=null&&(productclicked=!0,thislist="Unknown",$(this).data("list")!=null&&(thislist=$(this).data("list")),usingGA4&&typeof gtag!="undefined"&&(list="[",$(this).data("name")&&$(this).data("brand")&&$(this).data("category")&&(list+="{",list+='item_id: "'+$(this).data("id")+'",',list+='item_name: "'+String($(this).data("name")||"").replace('"','\\"')+'",',list+="index: "+$(this).data("position")+",",list+=' item_brand: "'+String($(this).data("brand")||"").replace('"','\\"')+'",',list+='item_category: "'+String($(this).data("category")||"").replace('"','\\"')+'",',list+='item_coord: "'+String($(this).data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String($(this).data("core")||"").replace('"','\\"')+'",',list+='currency: "USD",',list+="price:"+$(this).data("price")+",",list+=" quantity: 1",list+="}"),list+="]",gtag("event","select_promotion",{promotion_id:String($(this).data("list")||"").replace('\\"'," "),promotion_name:String($(this).data("list")||"").replace('\\"'," "),items:eval(list)})),usingGA3&&typeof ga!="undefined"&&($(this).data("name")&&$(this).data("brand")&&$(this).data("category")&&ga("mc.ec:addProduct",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),currency:"USD",position:$(this).data("position"),list:thislist}),ga("mc.ec:setAction","promoClick",{list:thislist}),ga("mc.send","event","eCommerce","promoClick",thislist,{hitCallback:function(){try{!evt.ctrlKey}catch(n){}}})))})}function bindListClick(){listView("Service Plan Add To Cart Modal");listView("Add Cart Ajax Key Add Ons");$(".listclick").off("click");$(".listclick").click(function(e){var cnt;if(listname=$(this).data("list"),cnt=0,usingGA4&&typeof gtag!="undefined"&&$("#cartModal .productViewItem").length){var list="[",pv=$("#cartModal .productViewItem"),ispersonalized="";$("#cartModal .productViewItem").each(function(){$(this).data("list")==listname&&(cnt>0&&(list+=","),typeof $(this).data("name")!="undefined"&&typeof $(this).data("brand")!="undefined"&&typeof $(this).data("category")!="undefined"&&(list+="{",list+='item_id: "'+$(this).data("id")+'",',list+='item_name: "'+String($(this).data("name")||"").replace('"','\\"')+'",',list+="index: "+$(this).data("position")+",",list+=' item_brand: "'+String($(this).data("brand")||"").replace('"','\\"')+'",',list+='item_category: "'+String($(this).data("category")||"").replace('"','\\"')+'",',list+='item_coord: "'+String($(this).data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String($(this).data("core")||"").replace('"','\\"')+'",',list+='item_list_id: "'+$(this).data("list")+'",',list+='item_list_name: "'+$(this).data("list")+'",',list+="price:"+$(this).data("price")+",",list+='currency: "USD",',list+=" quantity: 1",list+="}",cnt+=1))});list+="]";list!="[]"&&gtag("event","view_item_list",{item_list_id:String(listname||"").replace('"','\\"'),item_list_name:String(listname||"").replace('"','\\"'),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)})}usingGA3&&typeof ga!="undefined"&&($("#cartModal .productViewItem").each(function(){listname==$(this).data("list")&&ga("mc.ec:addImpression",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:listname})}),listname!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listname,{nonInteraction:!0})))});$(".listclick")&&$(".listclick").first().trigger("click")}function serviceBVCheck(){$(".serviceReviews").hide();$(".serviceQA").hide();var n=setInterval(function(){$(".serviceReviews #BVRRDisplayContentBodyID").length&&$(".serviceReviews").show();$(".serviceReviews #BVRRDisplayContentID").length&&clearInterval(n)},1e3),t=setInterval(function(){$(".serviceQA .BVQAQuestions").length&&$(".serviceQA").show();$(".serviceQA #BVQAQuestionAndAnswerCountID").length&&clearInterval(t)},1e3)}function getScrollPercent(){var n=$(window).scrollTop(),t=$(window).height(),i=$(document).height();return n/(i-t)*100}function getLoadTime(){var i=0,n,t,r;return window.performance&&window.performance.getEntriesByType&&(n=window.performance.getEntriesByType("navigation"),n.length>0&&(t=n[0],r=t.loadEventEnd-t.startTime,i=Math.round((r/1e3+Number.EPSILON)*100)/100)),i}function bindOptionsContainer(){$(".optionsContainer").click(function(){var t=$(this).attr("class"),n=$(this).is("button");return $("#cartModal").hide(),$("#cartModal").html(""),n&&($(".optionsContainer").removeClass("Selected"),$(this).addClass("Selected"),$("Button.optionsContainer").attr("aria-pressed","false"),$(this).attr("aria-pressed","true"),t.indexOf("pickupOption")>=0&&n?($(".cartType").val("instore"),$(".pickupOption").addClass("Selected"),$(".crtfrm .big.STBTN").val("Add To Cart"),$(".crtfrm .big.STBTN").html("Add To Cart"),$(".crtfrm .big.BUY-NOW").html("Buy Now"),$(".crtfrm").first().find(".big.BUY-NOW").parent().show(),$(".mm-t007-sticky-bar .crtfrm .big.BUY-NOW").parent().show(),$(".fixed-footer .crtfrm .big.BUY-NOW").parent().show()):t.indexOf("shippingOption")>=0&&n?($(".cartType").val("shipout"),$(".shippingOption").addClass("Selected"),$(".crtfrm .big.STBTN").val("Add To Cart"),$(".crtfrm .big.STBTN").html("Add To Cart"),$(".crtfrm .big.BUY-NOW").html("Buy Now"),$(".crtfrm").first().find(".big.BUY-NOW").parent().show(),$(".mm-t007-sticky-bar .crtfrm .big.BUY-NOW").parent().show(),$(".fixed-footer .crtfrm .big.BUY-NOW").parent().show()):t.indexOf("listOption")>=0&&n&&($(".listOption").addClass("Selected"),$(".cartType").val("list"),$(".crtfrm .big.STBTN").val("Add To List"),$(".crtfrm .big.STBTN").html("Add To List"),$(".crtfrm").first().find(".big.BUY-NOW").parent().hide(),$(".mm-t007-sticky-bar .crtfrm .big.BUY-NOW").parent().hide(),$(".fixed-footer .crtfrm .big.BUY-NOW").parent().hide())),!1})}function setModalLoginFavorite(){$("body").hasClass("isLoggedIn")&&$(".login-modalFav").each(function(){typeof $(this).data("after")!="undefined"&&$(this).attr("href",$(this).data("after"))})}function sendOpenBoxImpression(){if(usingGA4&&typeof OpenBoxLayer!="undefined"&&!sentopenbox&&typeof gtag!="undefined"){var list="[";for(cnt=0;cnt<OpenBoxLayer.length;++cnt)cnt>0&&(list+=","),list+="{",list+="item_id: "+String(OpenBoxLayer[cnt].name||"").replace('\\"'," ")+",",list+="item_name: "+OpenBoxLayer[cnt].id+",",list+="index: "+OpenBoxLayer[cnt].position+",",list+="item_brand: "+String(OpenBoxLayer[cnt].brand||"").replace('\\"'," ")+",",list+="item_category: "+String(OpenBoxLayer[cnt].category||"").replace('\\"'," ")+",",list+="item_coord: "+String(OpenBoxLayer[cnt].coord||"").replace('\\"'," ")+",",list+="item_core: "+String(OpenBoxLayer[cnt].core||"").replace('\\"'," ")+",",list+="item_list_id: "+String(OpenBoxLayer[cnt].list||"").replace('\\"'," ")+",",list+="item_list_name: "+String(OpenBoxLayer[cnt].list||"").replace('\\"'," ")+",",list+="price: "+OpenBoxLayer[cnt].price+",",list+="currency: 'USD',",list+="quantity: 1",list+="}";list+="]";gtag("event","view_item_list",{item_list_id:"Single Product Clearance",item_list_name:"Single Product Clearance",is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)});sentopenbox=!0}if(usingGA3&&typeof OpenBoxLayer!="undefined"&&!sentopenbox&&typeof ga!="undefined"){for(cnt=0;cnt<OpenBoxLayer.length;++cnt)ga("mc.ec:addImpression",OpenBoxLayer[cnt]);sentopenbox=!0;ga("mc.ec:setAction","detail");ga("mc.send","event","eCommerce","Single Product Clearance",{nonInteraction:!0})}}function sendfrequentlyboughtImpression(){var n,t;if(usingGA4&&typeof frequentlyBoughtLayer!="undefined"&&!sentfrequentlybought&&typeof gtag!="undefined"){for(n="[",cnt=0;cnt<frequentlyBoughtLayer.length;++cnt)typeof frequentlyBoughtLayer[cnt].name!="undefined"&&typeof frequentlyBoughtLayer[cnt].brand!="undefined"&&typeof frequentlyBoughtLayer[cnt].list!="undefined"&&(cnt>0&&(n+=","),n+="{",n+="item_id: '"+frequentlyBoughtLayer[cnt].id+"',",n+="item_name: '"+String(frequentlyBoughtLayer[cnt].name||"").replace('\\"'," ")+"',",n+="index: "+frequentlyBoughtLayer[cnt].position+",",n+="item_brand: '"+String(frequentlyBoughtLayer[cnt].brand||"").replace('\\"'," ")+"',",n+="item_category: '"+String(frequentlyBoughtLayer[cnt].category||"").replace('\\"'," ")+"',",n+="item_coord: '"+String(frequentlyBoughtLayer[cnt].coord||"").replace('\\"'," ")+"',",n+="item_core: '"+String(frequentlyBoughtLayer[cnt].core||"").replace('\\"'," ")+"',",n+="item_list_id: '"+String(frequentlyBoughtLayer[cnt].list||"").replace('\\"'," ")+"',",n+="item_list_name: '"+String(frequentlyBoughtLayer[cnt].list||"").replace('\\"'," ")+"',",n+="price: "+frequentlyBoughtLayer[cnt].price+",",n+="currency: 'USD',",n+="quantity: 1,",n+="}");n+="]";sentfrequentlybought=!0}if(usingGA3&&typeof frequentlyBoughtLayer!="undefined"&&!sentfrequentlybought&&typeof ga!="undefined"){for(t="Frequently Bought Together",cnt=0;cnt<frequentlyBoughtLayer.length;++cnt)ga("mc.ec:addImpression",frequentlyBoughtLayer[cnt]),t=frequentlyBoughtLayer[cnt].list;sentfrequentlybought=!0;ga("mc.ec:setAction","detail");ga("mc.send","event","eCommerce",t,{nonInteraction:!0})}}function sendconfiguratorImpression(){if(usingGA4&&typeof configuratorLayer!="undefined"&&!sentconfigurator&&typeof gtag!="undefined"){var list="[";for(cnt=0;cnt<configuratorLayer.length;++cnt)cnt>0&&(list+=","),list+="{",list+="item_id: "+String(configuratorLayer[cnt].name||"").replace('\\"'," ")+",",list+="item_name: "+configuratorLayer[cnt].id+",",list+="index: "+String(configuratorLayer[cnt].position||"").replace('\\"'," ")+",",list+="item_brand: "+String(configuratorLayer[cnt].brand||"").replace('\\"'," ")+",",list+="item_category: "+String(configuratorLayer[cnt].category||"").replace('\\"'," ")+",",list+="item_coord: "+String(configuratorLayer[cnt].coord||"").replace('\\"'," ")+",",list+="item_core: "+String(configuratorLayer[cnt].core||"").replace('\\"'," ")+",",list+="item_list_id: "+String(configuratorLayer[cnt].list||"").replace('\\"'," ")+",",list+="item_list_name: "+String(configuratorLayer[cnt].list||"").replace('\\"'," ")+",",list+="price: "+configuratorLayer[cnt].price+",",list+="currency: 'USD',",list+="quantity: 1,",list+="}";list+="]";gtag("event","view_item_list",{item_list_id:"Recommended Items",item_list_name:"Recommended Items",is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)});sentconfigurator=!0}if(usingGA3&&typeof sentconfigurator!="undefined"&&!sentconfigurator&&typeof ga!="undefined"){for(listName="Recommended Items",cnt=0;cnt<configuratorLayer.length;++cnt)ga("mc.ec:addImpression",configuratorLayer[cnt]),listName=configuratorLayer[cnt].list;sentconfigurator=!0;ga("mc.ec:setAction","detail");ga("mc.send","event","eCommerce",listName,{nonInteraction:!0})}}function sendBundleImpression(){if(usingGA4&&typeof bundleOptionsLayer!="undefined"&&!sentBundles&&typeof gtag!="undefined"){var list="[";for(cnt=0;cnt<bundleOptionsLayer.length;++cnt)cnt>0&&(list+=","),list+="{",list+="item_id: "+String(bundleOptionsLayer[cnt].name||"").replace('\\"'," ")+",",list+="item_name: "+bundleOptionsLayer[cnt].id+",",list+="index: "+bundleOptionsLayer[cnt].position+",",list+="item_brand: "+String(bundleOptionsLayer[cnt].brand||"").replace('\\"'," ")+",",list+="item_category: "+String(bundleOptionsLayer[cnt].category||"").replace('\\"'," ")+",",list+="item_coord: "+String(bundleOptionsLayer[cnt].coord||"").replace('\\"'," ")+",",list+="item_core: "+String(bundleOptionsLayer[cnt].core||"").replace('\\"'," ")+",",list+="item_list_id: "+String(bundleOptionsLayer[cnt].list||"").replace('\\"'," ")+",",list+="item_list_name: "+String(bundleOptionsLayer[cnt].list||"").replace('\\"'," ")+",",list+="price: "+bundleOptionsLayer[cnt].price+",",list+="currency: 'USD',",list+="quantity: 1,",list+="}";list+="]";gtag("event","view_item_list",{item_list_id:"Bundle Product Option",item_list_name:"Bundle Product Option",is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)});sentBundles=!0}if(usingGA3&&typeof bundleOptionsLayer!="undefined"&&!sentBundles&&typeof ga!="undefined"){for(listName="Bundle Product Option",cnt=0;cnt<bundleOptionsLayer.length;++cnt)ga("mc.ec:addImpression",bundleOptionsLayer[cnt]),listName=bundleOptionsLayer[cnt].list;sentBundles=!0;ga("mc.ec:setAction","detail");ga("mc.send","event","eCommerce",listName,{nonInteraction:!0})}}function sendaddOnImpression(){if(usingGA4){if(typeof addOnLayer!="undefined"&&!sentAdOns&&typeof gtag!="undefined"){var list="[";for(cnt=0;cnt<addOnLayer.length;++cnt)cnt>0&&(list+=","),list+="{",list+="item_id: "+String(addOnLayer[cnt].name||"").replace('\\"'," ")+",",list+="item_name: "+addOnLayer[cnt].id+",",list+="index: "+addOnLayer[cnt].position+",",list+="item_brand: "+String(addOnLayer[cnt].brand||"").replace('\\"'," ")+",",list+="item_category: "+String(addOnLayer[cnt].category||"").replace('\\"'," ")+",",list+="item_coord: "+String(addOnLayer[cnt].coord||"").replace('\\"'," ")+",",list+="item_core: "+String(addOnLayer[cnt].core||"").replace('\\"'," ")+",",list+="item_list_id: "+String(addOnLayer[cnt].list||"").replace('\\"'," ")+",",list+="item_list_name: "+String(addOnLayer[cnt].list||"").replace('\\"'," ")+",",list+="price: "+addOnLayer[cnt].price+",",list+="currency: 'USD',",list+="quantity: 1",list+="}";list+="]";gtag("event","view_item_list",{item_list_id:"Bundle Product Option",item_list_name:"Bundle Product Option",is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)});sentAdOns=!0}}else if(typeof addOnLayer!="undefined"&&!sentAdOns&&typeof ga!="undefined"){for(listName="Ad Ons",cnt=0;cnt<addOnLayer.length;++cnt)ga("mc.ec:addImpression",addOnLayer[cnt]),listName=addOnLayer[cnt].list;sentAdOns=!0;ga("mc.ec:setAction","detail");ga("mc.send","event","eCommerce",listName,{nonInteraction:!0})}}function sendproductImpression(){if(usingGA4){if(typeof productsLayer!="undefined"&&!sentProducts&&typeof gtag!="undefined"){var list="[";for(cnt=0;cnt<productsLayer.length;++cnt)productsLayer[cnt].list!=null&&productsLayer[cnt].brand!=null&&productsLayer[cnt].name!=null&&(cnt>0&&(list+=","),list+="{",list+="item_id: "+String(productsLayer[cnt].name||"").replace('\\"'," ")+",",list+="item_name: "+productsLayer[cnt].id+",",list+="index: "+productsLayer[cnt].position+",",list+="item_brand: "+String(productsLayer[cnt].brand||"").replace('\\"'," ")+",",list+="item_category: "+String(productsLayer[cnt].category||"").replace('\\"'," ")+",",list+="item_coord: "+String(productsLayer[cnt].coord||"").replace('\\"'," ")+",",list+="item_core: "+String(productsLayer[cnt].core||"").replace('\\"'," ")+",",list+="item_list_id: "+String(productsLayer[cnt].list||"").replace('\\"'," ")+",",list+="item_list_name: "+String(productsLayer[cnt].list||"").replace('\\"'," ")+",",list+="price: "+addOnLayer[cnt].price+",",list+="currency: 'USD',",list+="quantity: 1",list+="}");list+="]";gtag("event","view_item_list",{item_list_id:"Bundle Product Option",item_list_name:"Bundle Product Option",is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)});sentProducts=!0}}else if(typeof productsLayer!="undefined"&&!sentProducts&&typeof ga!="undefined"){for(cnt=0;cnt<productsLayer.length;++cnt)productsLayer.length==1?ga("mc.ec:addProduct",productsLayer[cnt]):ga("mc.ec:addImpression",productsLayer[cnt]);sentProducts=!0;ga("mc.ec:setAction","detail");productsLayer.length>1&&ga("mc.send","event","eCommerce","Products",{nonInteraction:!0})}}function createCookie(n,t,i){var r,u;i?(u=new Date,u.setTime(u.getTime()+i*864e5),r="; expires="+u.toGMTString()):r="";document.cookie=window.location.hostname=="localhost"?n+"="+t+r+";path=/;domain=localhost;":n+"="+t+r+"; path=/;secure;domain=.microcenter.com;"}function readCookie(n){for(var r=n+"=",u=document.cookie.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return null}function eraseCookie(n){createCookie(n,"",-1)}function setCompareFeatures(){var n=readCookie("compare"),r,t,u,i;if(typeof n!="undefined"&&n!=null&&n!=""?currentCompare=n:n=currentCompare,r="",$("#compare-remove").click(function(n){return currentCompare="",n.preventDefault(),eraseCookie("compare"),$(".inline-compare-text").css("display","inline"),$(".inline-compare-button").css("display","none"),$(".checkbox").prop("checked",!1),$(".inline-compare-text").html("Select 2 to compare"),set_compare_section("",""),!1}),$(".compare2023").click(function(n){n.preventDefault();$("#compareSubmit").submit()}),$(".compare").click(function(n){n.preventDefault();$("#compareSubmit").submit()}),$("#compare-over-alert a").click(function(n){n.preventDefault();$("#compare-over-alert").hide()}),typeof n!="undefined"&&n!=null&&n!=""){t=[];t=n.split("|");set_compare_section("","");t.length>1?$(".inline-compare-text").html("Add to compare"):$(".inline-compare-text").html("Select 2 to compare");for(u in t)r="",r=t[u].split(":")[0],i=t[u].split(":")[1],isNaN(i)||($("#button_productIDcheck"+i).css("display","inline"),window.location.pathname.toLowerCase().indexOf("/product")<0?$("#text_productIDcheck"+i).css("display","none"):$("#text_productIDcheck"+i).html("Compare"),$("#productIDcheck"+i).prop("checked",!0))}else $(".inline-compare-text").html("Select 2 to compare");try{$("div.featuredList").carousel({dispItems:1})}catch(f){}try{$("div.featuredItems").css("display","block")}catch(f){}}function set_compare_section(n,t){var f,e,i=readCookie("compare"),s,r,u,o;if(typeof i!="undefined"&&i!=null&&i!=""?currentCompare=i:i=currentCompare,s=!1,i&&i.search("c26ba48acbfa28c59f170514c27aea07")!=-1){for(i=i.replace(/%7C/,"|"),r=[],r=i.split("|"),u=1;u<5;u++)r.length>u?(s=!0,f=Right("000000"+r[u].split(":")[0],6),e=Right("0000000"+r[u].split(":")[1],7),o='<img src="https://90a1c75758623581b3f8-5c119c3de181c9857fcb2784776b17ef.ssl.cf2.rackcdn.com/'+e+"_"+f+'.jpg" alt="'+t+'">',o=o+'<div><a href="#" onclick="removeCompare(\''+r[u].split(":")[0]+":"+r[u].split(":")[1]+'\');return false;">X<span class="hide-text"> Remove Compare Item - '+t+"<\/span><\/a><\/div>",$("#compare-item"+u).html(o)):$("#compare-item"+u).html("");if(n!=""){f=Right("000000"+n.split(":")[0],6);e=Right("0000000"+n.split(":")[1],7);$(".compare-section").show();var c='<img id="compareAnimationImg" src="https://90a1c75758623581b3f8-5c119c3de181c9857fcb2784776b17ef.ssl.cf2.rackcdn.com/'+e+"_"+Right("0000000"+f,6)+'.jpg">',h=$("#text_productIDcheck"+n.split(":")[1]).parent().parent().parent().parent().position(),l=$("#compare-item"+(r.length-1)).position();$("#compareAnimation").css("top",h.top+30+"px");$("#compareAnimation").css("left",h.left+20+"px");$("#compareAnimation").css("width","120px");$("#compareAnimation").css("height","120px");$("#compareAnimation").html(c);$("#compareAnimation").show();$("#compare-item"+(r.length-1)+" img").hide();$("#compareAnimation").animate({width:"36px",height:"36px",top:"-44px",left:l.left+"px"},1e3);setTimeout(function(){$(".compare-section #compare-item"+(r.length-1)+" img").show();$("#compareAnimation").hide()},1e3);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Compare item added or changed '+t+".  Tab then press enter to load compare page in new window.<\/div>");window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}}else $(".compare-item").html(""),$("#productGridAnnouncement").focus();s?$(".compare-section").show():($(".inline-compare-text").css("display","inline"),$(".inline-compare-button").css("display","none"),$(".checkbox").prop("checked",!1),$(".compare-section").hide())}function removeCompare(n){var t=readCookie("compare"),u,i,r,o,f,e;if(typeof t!="undefined"&&t!=null&&t!=""?currentCompare=t:t=currentCompare,u="c26ba48acbfa28c59f170514c27aea07",t&&t.search("c26ba48acbfa28c59f170514c27aea07")!=-1){for(t=t.replace(/%7C/,"|"),i=[],i=t.split("|"),r=1;r<i.length;r++)i[r]!=n&&(u=u+"|"+i[r]);o=parseInt(n.split(":")[0]);f=n.split(":")[1];$("#button_productIDcheck"+f).css("display","none");$("#text_productIDcheck"+f).css("display","inline");$("#productIDcheck"+f).prop("checked",!1);i.length>2?$(".inline-compare-text").html("Add to compare"):$(".inline-compare-text").html("Select 2 to compare");createCookie("compare",u,7);e="Compare Item Removed";ga("mc.send","event",e,n,"X selected");set_compare_section("","")}}function set_compare_items(n,t,i,r,u){var f,o,s,l,h,a,e,c;if(r==null&&(r=!0),u==null&&(u=!1),$("#compare-over-alert").hide(),f=readCookie("compare"),typeof f!="undefined"&&f!=null&&f!=""?currentCompare=f:f=currentCompare,o=[],f==""&&currentCompare==""&&(s=new Date,l=-1,s.setTime(s.getTime()-1),$.cookie(name,null,{domain:window.location.hostname,expires:s}),$.cookie(name,null,{domain:".microcenter.com",expires:s})),f&&f.search("c26ba48acbfa28c59f170514c27aea07")!=-1&&(f=f.replace(/%7C/,"|"),o=f.split("|"),o.length>4&&n.elements[0].checked)){h=$("#text_productIDcheck"+t.split(":")[1]).parent().parent().parent().parent().position();$("#compare-over-alert").css("top",h.top+30+"px");$("#compare-over-alert").css("left",h.left+30+"px");$("#compare-over-alert").show();n.elements[0].checked=!1;return}a=t.split(":")[0];e=t.split(":")[1];f?(f=f.replace(/%7C/,"|"),f.search("c26ba48acbfa28c59f170514c27aea07")!=-1?n.elements[0].checked?(f.search(t)==-1&&createCookie("compare",f+"|"+t,7),$("#button_productIDcheck"+e).css("display","inline"),u?($("#text_productIDcheck"+e).css("display","inline"),$(".inline-compare-text").html("Compare")):($("#text_productIDcheck"+e).css("display","none"),$(".inline-compare-text").html("Add to compare"))):($("#button_productIDcheck"+e).css("display","none"),$("#text_productIDcheck"+e).css("display","inline"),new_cookie=f.replace("|"+t,""),createCookie("compare",new_cookie,7),o=[],t="",o=new_cookie.split("|"),u&&$(".inline-compare-text").html("Add To Compare"),o.length<2&&(u?$(".inline-compare-text").html("Add To Compare"):$(".inline-compare-text").html("Select 2 to compare"))):(createCookie("compare","c26ba48acbfa28c59f170514c27aea07|"+t,7),$("#button_productIDcheck"+e).css("display","inline"),$("#text_productIDcheck"+e).css("display","none"),$(".inline-compare-text").html("Add to compare"))):(createCookie("compare","c26ba48acbfa28c59f170514c27aea07|"+t,7),$("#button_productIDcheck"+e).css("display","inline"),$("#text_productIDcheck"+e).css("display","none"),$(".inline-compare-text").html("Add to compare"));c="Compare Item Removed";n.elements[0].checked&&(c="Compare Item Added");ga("mc.send","event",c,t,i);r&&set_compare_section(t,i)}function checkCharlotte(){(readCookie("charlotteDistance")==null||readCookie("charlotteDistance")==""||readCookie("charlotteDistance")=="0")&&$.ajax({url:"/assets/ajax/StoreDistanceCheck.aspx",type:"GET",data:{slat:"35.174430",slong:"-80.877650"}}).done(function(n){createCookie("charlotteDistance",n);isNaN(n)||Number(n)<=175&&$("body").addClass("isCharlotte")});readCookie("charlotteDistance")==null||isNaN(readCookie("charlotteDistance"))||Number(readCookie("charlotteDistance"))<=175&&($("body").addClass("isCharlotte"),$(".needsLogin").hide())}function checkMiami(){(readCookie("miamiDistance")==null||readCookie("miamiDistance")==""||readCookie("miamiDistance")=="0")&&$.ajax({url:"/assets/ajax/StoreDistanceCheck.aspx",type:"GET",data:{slat:"25.773740",slong:"-80.322460"}}).done(function(n){createCookie("miamiDistance",n);isNaN(n)||Number(n)<=200&&$("body").addClass("isMiami")});readCookie("miamiDistance")==null||isNaN(readCookie("miamiDistance"))||Number(readCookie("miamiDistance"))<=200&&($("body").addClass("isMiami"),$(".needsLogin").hide())}function checkSantaClara(){(readCookie("santaclaraDistance")==null||readCookie("santaclaraDistance")==""||readCookie("santaclaraDistance")=="0")&&$.ajax({url:"/assets/ajax/StoreDistanceCheck.aspx",type:"GET",data:{slat:"37.354107",slong:"-121.955238"}}).done(function(n){createCookie("santaclaraDistance",n);isNaN(n)||Number(n)<=200&&$("body").addClass("isSantaClara")});readCookie("santaclaraDistance")==null||isNaN(readCookie("santaclaraDistance"))||Number(readCookie("santaclaraDistance"))<=200&&($("body").addClass("isSantaClara"),$(".needsLogin").hide())}function SelectServicePlan(n,t){var i=parseFloat($('input[name="servicePlanValue"]').val()),r=parseFloat($('input[name="servicePlanId"]').val());$("#summaryserviceplans .summaryserviceplans").hide();$("#summaryserviceplans #plan"+n).show();serviceplantotal=t;serviceplantotal>0?($("#interstitialSummary #serviceplanprice").html('<a href="#" onclick="SummaryToggle(\'summaryserviceplans\'); return false;">+ Protection Plan:<\/a> $'+t),$("#interstitialSummary #serviceplanprice").show()):$("#interstitialSummary #serviceplanprice").hide();$(".spHolder").each(function(){var i=$(this).val(),f=0,u,r;i>0&&(f=$('input[name="spPrice_'+i+'"]').val(),u="",r=parseFloat(parseFloat(f)-parseFloat(t)).toFixed(2),u=r>=0?"(+$"+r+")":"(-$"+Math.abs(r).toFixed(2)+")",$("#servicePlanCalculatedPrice_"+i).html(u),t>0?($("#servicePlanCalculatedPrice_"+i).show(),$("#servicePlanPrice_"+i).hide()):($("#servicePlanCalculatedPrice_"+i).hide(),$("#servicePlanPrice_"+i).show()),i==n&&($("#servicePlanCalculatedPrice_"+i).hide(),$("#servicePlanPrice_"+i).hide()))});$('input[name="servicePlanValue"]').val(t);$('input[name="servicePlanId"]').val(n);setsummarytotal()}function popBargainBinWindow(n){newwindow=window.open(n,"name","height=300,width=300,left=100,top=100,resizable=yes,scrollbars=yes");window.focus&&newwindow.focus()}function printFancybox(){$("#fancybox-frame").get(0).contentWindow.print()}function SelectProduct(n,t,i,r){r=typeof r!="undefined"?r:!1;i?r?(servicestotal+=t,servicestotal=Math.round(servicestotal*100)/100,$("#interstitialSummary #serviceprice").html('<a href="#" onclick="SummaryToggle(\'serviceprice\'); return false;">+ Services:<\/a> $'+servicestotal),$("#interstitialSummary #serviceprice").show(),$("#servicepricing #product"+n).first().show()):(addonstotal+=t,addonstotal=Math.round(addonstotal*100)/100,$("#interstitialSummary #addonsprice").html('<a href="#" onclick="SummaryToggle(\'summarypricing\'); return false;">+ Add Ons:<\/a> $'+addonstotal),$("#interstitialSummary #addonsprice").show(),$("#summarypricing #product"+n).first().show()):r?($("#servicepricing #product"+n).first().hide(),servicestotal=servicestotal-t,servicestotal=Math.round(servicestotal*100)/100,servicestotal>0?($("#interstitialSummary #serviceprice").html('<a href="#" onclick="SummaryToggle(\'serviceprice\'); return false;">+ Services:<\/a> $'+servicestotal),$("#interstitialSummary #serviceprice").show()):$("#interstitialSummary #serviceprice").hide()):($("#summarypricing #product"+n).first().hide(),addonstotal=addonstotal-t,addonstotal=Math.round(addonstotal*100)/100,addonstotal>0?($("#interstitialSummary #addonsprice").html('<a href="#" onclick="SummaryToggle(\'summarypricing\'); return false;">+ Add Ons:<\/a> $'+addonstotal),$("#interstitialSummary #addonsprice").show()):$("#interstitialSummary #addonsprice").hide());setsummarytotal()}function SelectProductRadio(n,t,i,r,u){var o=!1,f,e;$("#interstitialSummary .price strong").length?thisprice=$("#interstitialSummary .price strong").html():(o=!0,thisprice="$"+$("#summaryprice").data("buildprice"));u=typeof u!="undefined"?u:!1;f=0;e=0;parseFloat($("#radioGroup_"+r+"_CP").val())>0&&(f=parseFloat($("#radioGroup_"+r+"_CP").val()));parseFloat($("#radioGroup_"+r+"_CPID").val())>0&&(e=parseFloat($("#radioGroup_"+r+"_CPID").val()));o&&($("#checkID_"+n).hasClass("isselectedItem")?($("#checkID_"+n).removeClass("isselectedItem"),$("#checkID_"+n).prop("checked",!1),$("#radioGroup_"+r+"_CP").val(0),$("#radioGroup_"+r+"_CPID").val(0)):($("input[type='radio'][name='productIDs_R"+r+"']").removeClass("isselectedItem"),$("#checkID_"+n).addClass("isselectedItem"),$("#radioGroup_"+r+"_CP").val(t),$("#radioGroup_"+r+"_CPID").val(n)));u?servicestotal=servicestotal-f:addonstotal=addonstotal-f;u?$("#servicepricing #product"+e).first().hide():$("#summarypricing #product"+e).first().hide();u?(servicestotal=servicestotal+t,servicestotal=servicestotal.toFixed(2),$("#interstitialSummary #serviceprice").html('<a href="#" onclick="SummaryToggle(\'serviceprice\'); return false;">+ Services:<\/a> $'+servicestotal),$("#interstitialSummary #serviceprice").show()):(addonstotal=addonstotal+t,addonstotal=addonstotal.toFixed(2),$("#interstitialSummary #addonsprice").html('<a href="#" onclick="SummaryToggle(\'summarypricing\'); return false;">+ Add Ons:<\/a> $'+addonstotal),$("#interstitialSummary #addonsprice").show());u?$("#servicepricing #product"+n).first().show():$("#summarypricing #product"+n).first().show();$("#radioGroup_"+r+"_CPID").val(n);$("#radioGroup_"+r+"_CP").val(t);$('input[name="productIDs_R'+r+'"]').each(function(){var i=$(this).val(),f=0,u,r;i>0&&(f=$('input[name="productPrice_'+i+'"]').val(),u="",r=(f-t).toFixed(2),u=r>=0?"(+$"+r+")":"(-$"+Math.abs(r).toFixed(2)+")",$("#CalculatedPrice_"+i).html(u),t>0?($("#CalculatedPrice_"+i).show(),$("#Price_"+i).hide()):($("#CalculatedPrice_"+i).hide(),$("#Price_"+i).show()),i==n&&($("#CalculatedPrice_"+i).hide(),$("#Price_"+i).hide()))});o||(t>0?$("#noItem_R"+r).show():$("#noItem_R"+r).hide());setsummarytotal()}function SummaryToggle(n){n=="summarypricing"&&($("#summaryserviceplans").hide(),$("#servicepricing").hide(),$("#summarypricing").is(":visible")?$("#summarypricing").hide():$("#summarypricing").show());n=="serviceprice"&&($("#summaryserviceplans").hide(),$("#summarypricing").hide(),$("#servicepricing").is(":visible")?$("#servicepricing").hide():$("#servicepricing").show());n=="summaryserviceplans"&&($("#summarypricing").hide(),$("#servicepricing").hide(),$("#summaryserviceplans").is(":visible")?$("#summaryserviceplans").hide():$("#summaryserviceplans").show());$(".closeItem").show()}function SummaryClose(){$("#summaryserviceplans").hide();$("#summarypricing").hide();$("#servicepricing").hide()}function setsummarytotal(){var t,n,i,r;try{t="";n=!1;$("#interstitialSummary .price strong").length?t=$("#interstitialSummary .price strong").html():(n=!0,t="$"+$("#summaryprice").data("buildprice"));t.indexOf("$")>=0&&(itemprice=parseFloat(t.replace("$","").replace(",","")).toFixed(2));i=0;r=0;servicestotal=0;addonstotal=0;$(".productIDsRadio").each(function(){$(this).is(":checked")?(n&&$(this).parent().parent().parent().addClass("isSelected"),r+=1,$(this).data("service")=="yes"?servicestotal=servicestotal+parseFloat($('input[name="productPrice_'+$(this).val()+'"]').first().val()):addonstotal=addonstotal+parseFloat($('input[name="productPrice_'+$(this).val()+'"]').first().val())):n&&$(this).parent().parent().parent().removeClass("isSelected")});$("input[name=productIDs]:checked").each(function(){n&&$(this).parent().parent().parent().addClass("isSelected");r+=1;$(this).data("service")=="yes"?servicestotal=servicestotal+parseFloat($("#ProductPrice_"+$(this).val()).first().val().replace("$","").replace(",","")):addonstotal=addonstotal+parseFloat($("#ProductPrice_"+$(this).val()).first().val().replace("$","").replace(",",""))});n&&$("input[name=productIDs]:not(:checked)").each(function(){$(this).parent().parent().parent().removeClass("isSelected")});addonstotal=addonstotal.toFixed(2);servicestotal=servicestotal.toFixed(2);$("#totalSelected").html(r);$("#interstitialSummary #addonsprice").html('<a href="#" onclick="SummaryToggle(\'summarypricing\'); return false;">+ Add Ons:<\/a> $'+addonstotal);addonstotal>0?$("#interstitialSummary #addonsprice").show():$("#interstitialSummary #addonsprice").hide();$("#interstitialSummary #serviceprice").html('<a href="#" onclick="SummaryToggle(\'serviceprice\'); return false;">+ Services:<\/a> $'+servicestotal);servicestotal>0?$("#interstitialSummary #serviceprice").show():$("#interstitialSummary #serviceprice").hide();i=parseFloat(parseFloat(itemprice)+parseFloat(addonstotal)+parseFloat(servicestotal)+parseFloat(serviceplantotal)).toFixed(2);i>=parseFloat(itemprice)&&parseFloat(itemprice)>0?n?($("#summaryprice").html("$"+i),$("#summaryprice").show()):($("#summaryprice").html("Total With Add Ons: $"+i),$("#summaryprice").show()):n||$("#summaryprice").hide();parseFloat(addonstotal)<=0&&$("#addonsprice").hide()}catch(u){}}function Right(n,t){if(t<=0)return"";if(t>String(n).length)return n;var i=String(n).length;return String(n).substring(i,i-t)}function addSliderEvent(n){function e(n){return n.toFixed(2)*1}function s(){return e(n.width()/n.find(".mm14-products-viewed").width()*100/r)}function u(u){var f=s(),o;t+=f*u;t>=i?t=i:t<0&&(t=0);n.parent().find(".mm14-carousel-next").show();n.parent().find(".mm14-carousel-prev").show();t+f>=i?n.parent().find(".mm14-carousel-next").addClass("disable"):n.parent().find(".mm14-carousel-next").removeClass("disable");t-f<0?n.parent().find(".mm14-carousel-prev").addClass("disable"):n.parent().find(".mm14-carousel-prev").removeClass("disable");f>=i&&(n.parent().find(".mm14-carousel-prev").hide(),n.parent().find(".mm14-carousel-next").hide());u===1?t+f>i&&(t=i-f):u===-1&&t-f<0&&(t=0);o=e(r*t);n.find(".mm14-products-viewed").css("transform","translateX("+-o+"%)")}function o(){t=0;var e=Math.floor(n.width()/n.find(".recent-item").first().width());r=100/e;f=n.find(".mm14-products-viewed");i=n.find(".recent-item").length;f.css("transform","translateX(0%)");n.parent().find(".mm14-carousel-next").show();n.parent().find(".mm14-carousel-prev").show();u(0)}var t,r,f,i;o();n.parent().find(".mm14-carousel-prev").click(function(){u(-1)});n.parent().find(".mm14-carousel-next").click(function(){u(1)});$(window).resize(function(){o()})}function categoryRender(){$(".recentlyViewed").length===0&&$(".DesktopFramework #ads").prepend(getTemplate("category",{products:campaign.scope.productsViewed}))}function setGridView(){var n,t;$(".grView").click(function(){$(".grView").addClass("on");$(".lsView").removeClass("on");$("#productGrid").removeClass("col1");$("#productGrid").addClass("col3");eraseCookie("viewtype");createCookie("viewtype","grid",1)});$(".lsView").click(function(){$(".lsView").addClass("on");$(".grView").removeClass("on");$("#productGrid").removeClass("col3");$("#productGrid").addClass("col1");eraseCookie("viewtype");createCookie("viewtype","list",1)});try{n=readCookie("viewtype");n==null&&(t=readCookie("isMobile"),t!=null&&t=="true"||$("body").hasClass("MobileFramework")?(n="list",createCookie("viewtype","list",1)):(n="grid",createCookie("viewtype","grid",1)));n=="list"?($("#productGrid").removeClass("col3"),$("#productGrid").addClass("col1"),$(".lsView").addClass("on"),$(".grView").removeClass("on")):($("#productGrid").removeClass("col1"),$("#productGrid").addClass("col3"),$(".lsView").removeClass("on"),$(".grView").addClass("on"));$("#productGrid.eset").removeClass("col1");$("#productGrid.eset").addClass("col3")}catch(i){}}function productClick(n){if($(n).data("id")!=null&&!productclicked){productclicked=!0;var t="Search Results";if($(n).data("list")!=null&&(t=$(n).data("list")),usingGA4){typeof gtag!="undefined"&&gtag("event","view_item",{currency:"USD",value:$(n).data("price"),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:[{item_id:$(n).data("id"),item_name:$(n).data("name"),index:$(n).data("position"),item_brand:$(n).data("brand"),item_category:$(n).data("category"),item_list_id:t,item_list_name:t,price:$(n).data("price"),currency:"USD",quantity:1}]});try{$(n).attr("href")!=null?document.location=$(n).attr("href"):$(n).data("href")!=null&&(document.location=$(n).data("href"))}catch(i){}}usingGA3&&typeof ga!="undefined"&&(ga("mc.ec:addProduct",{id:$(n).data("id"),name:$(n).data("name"),category:$(n).data("category"),brand:$(n).data("brand"),price:$(n).data("price"),position:$(n).data("position"),list:t}),ga("mc.ec:setAction","click",{list:t}),ga("mc.send","event","eCommerce","click",t,{hitCallback:function(){try{$(n).attr("href")!=null?document.location=$(n).attr("href"):$(n).data("href")!=null&&(document.location=$(n).data("href"))}catch(t){}}}))}}function listView(list_id){var eventlist=[],ispersonalized;if(usingGA4&&typeof gtag!="undefined"&&$(".productViewItem").length){var list="[",pv=$(".productViewItem"),cnt=0;listname=list_id;ispersonalized="";$(".productViewItem").each(function(){$(this).data("list")==list_id&&(cnt>0&&(list+=","),typeof $(this).data("name")!="undefined"&&typeof $(this).data("brand")!="undefined"&&typeof $(this).data("category")!="undefined"&&(list+="{",list+='item_id: "'+$(this).data("id")+'",',list+='item_name: "'+String($(this).data("name")||"").replace('"','\\"')+'",',list+="index: "+$(this).data("position")+",",list+=' item_brand: "'+String($(this).data("brand")||"").replace('"','\\"')+'",',list+='item_category: "'+String($(this).data("category")||"").replace('"','\\"')+'",',list+='item_coord: "'+String($(this).data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String($(this).data("core")||"").replace('"','\\"')+'",',list+='item_list_id: "'+$(this).data("list")+'",',list+='item_list_name: "'+$(this).data("list")+'",',list+="price:"+$(this).data("price")+",",list+='currency: "USD",',list+=" quantity: 1",list+="}",cnt+=1))});list+="]";list!="[]"&&gtag("event","view_item_list",{item_list_id:String(listname||"").replace('"','\\"'),item_list_name:String(listname||"").replace('"','\\"'),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)})}if(usingGA3&&typeof ga!="undefined"&&(listName="",$(".productViewItem").each(function(){listName!=$(this).data("list")&&listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listName,{nonInteraction:!0}));ga("mc.ec:addImpression",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:$(this).data("list")});listName=$(this).data("list")}),listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listName,{nonInteraction:!0}))),usingGA4&&typeof gtag!="undefined"&&$(".promoViewItem").length&&(list="[",pv=$(".promoViewItem"),cnt=0,listname="",$(".promoViewItem").each(function(){try{listname!=$(this).data("list")&&listname!=""&&(list_id==""||list_id==listname)&&(list+="]",gtag("event","view_promotion",{promotion_name:String(listname||"").replace('"','\\"'),promotion_id:String(listname||"").replace('"','\\"'),items:eval(list)}),cnt=0,list="[");listname=$(this).data("list");cnt>0&&(list+=",");$(this).data("name")&&$(this).data("brand")&&$(this).data("category")&&(list+="{",list+='item_id: "'+$(this).data("id")+'",',list+='item_name: "'+String($(this).data("name")||"").replace('"','\\"')+'",',list+="index: "+$(this).data("position")+",",list+=' item_brand: "'+String($(this).data("brand")||"").replace('"','\\"')+'",',list+='item_category: "'+String($(this).data("category")||"").replace('"','\\"')+'",',list+='item_coord: "'+String($(this).data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String($(this).data("core")||"").replace('"','\\"')+'",',list+="price:"+$(this).data("price")+",",list+='currency: "USD",',list+=" quantity: 1",list+="}",cnt+=1)}catch(e){}}),list+="]",list!="[]"&&(list_id==""||list_id==listname)))try{gtag("event","view_promotion",{promotion_name:String(listname||"").replace('"','\\"'),promotion_id:String(listname||"").replace('"','\\"'),items:eval(list)})}catch(e){}usingGA3&&typeof ga!="undefined"&&(listName="",$(".promoViewItem").each(function(){listName!=$(this).data("list")&&listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","PromoView",listName,{nonInteraction:!0}));$(this).data("name")&&$(this).data("brand")&&$(this).data("category")&&ga("mc.ec:addImpression",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:$(this).data("list")});listName=$(this).data("list")}),listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listName,{nonInteraction:!0})))}function sendGA4ViewList(){var ispersonalized,visiblelists;if(usingGA4&&typeof gtag!="undefined"&&$(".productViewItem").length){var list="[",pv=$(".productViewItem"),cnt=0;listname="";ispersonalized="";visiblelists=[];$(".productViewItem").each(function(){isInViewport(this)&&visiblelists.indexOf($(this).data("list"))<0&&processedlists.indexOf($(this).data("list"))<0&&visiblelists.push($(this).data("list"))});$(".productViewItem").each(function(){visiblelists.indexOf($(this).data("list"))>=0&&(processedlists.push($(this).data("list")),listname!=$(this).data("list")&&listname!=""&&($(this).data("processed","true"),list+="]",gtag("event","view_item_list",{item_list_id:listname,item_list_name:listname,is_personalized:$(this).data("personalized"),items:eval(list)}),cnt=0,list="["),listname=$(this).data("list"),cnt>0&&(list+=","),typeof $(this).data("name")!="undefined"&&typeof $(this).data("brand")!="undefined"&&typeof $(this).data("category")!="undefined"&&(list+="{",list+='item_id: "'+$(this).data("id")+'",',list+='item_name: "'+String($(this).data("name")||"").replace('"','\\"')+'",',list+="index: "+$(this).data("position")+",",list+=' item_brand: "'+String($(this).data("brand")||"").replace('"','\\"')+'",',list+='item_category: "'+String($(this).data("category")||"").replace('"','\\"')+'",',list+='item_coord: "'+String($(this).data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String($(this).data("core")||"").replace('"','\\"')+'",',list+='item_list_id: "'+$(this).data("list")+'",',list+='item_list_name: "'+$(this).data("list")+'",',list+="price:"+$(this).data("price")+",",list+='currency: "USD",',list+=" quantity: 1",list+="}",cnt+=1))});list+="]";list!="[]"&&gtag("event","view_item_list",{item_list_id:String(listname||"").replace('"','\\"'),item_list_name:String(listname||"").replace('"','\\"'),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval(list)})}if(usingBloomreach&&$(".productViewItem").length){var list=[],pv=$(".productViewItem"),cnt=0;listname="";var recommendationID="",ispersonalized="",source="Microcenter",visiblelists=[];$(".productViewItem").each(function(){isInViewport(this)&&visiblelists.indexOf($(this).data("list"))<0&&processedbloomreachlists.indexOf($(this).data("list"))<0&&visiblelists.push($(this).data("list"))});$(".productViewItem").each(function(){visiblelists.indexOf($(this).data("list"))>=0&&(processedbloomreachlists.push($(this).data("list")),listname!=$(this).data("list")&&listname!=""&&($(this).data("processed","true"),exponea.track("recommendation",{action:"show",source:source,item_ids:list,list_name:listname,recommendation_id:recommendationID}),cnt=0,list=[]),listname=$(this).data("list"),recommendationID=String($(this).data("recommendationid")||""),source=recommendationID!=""?"Bloomreach":"Microcenter",typeof $(this).data("name")!="undefined"&&typeof $(this).data("brand")!="undefined"&&typeof $(this).data("category")!="undefined"&&(list.push($(this).data("id")),cnt+=1))});list.length>0&&exponea.track("recommendation",{action:"show",source:source,item_ids:list,list_name:listname,recommendation_id:recommendationID})}}function sendGA4PromoViewList(){var visiblepromos;if(usingGA4&&typeof gtag!="undefined"&&$(".promoViewItem").length){var list="[",pv=$(".promoViewItem"),cnt=0;listname="";visiblepromos=[];$(".promoViewItem").each(function(){isInViewport(this)&&visiblepromos.indexOf($(this).data("list"))<0&&processedPromolists.indexOf($(this).data("list"))<0&&visiblepromos.push($(this).data("list"))});$(".promoViewItem").each(function(){visiblepromos.indexOf($(this).data("list"))>=0&&(processedPromolists.push($(this).data("list")),listname!=$(this).data("list")&&listname!=""&&(list+="]",gtag("event","view_promotion",{promotion_name:String(listname||"").replace('"','\\"'),promotion_id:String(listname||"").replace('"','\\"'),items:eval(list)}),cnt=0,list="["),listname=$(this).data("list"),cnt>0&&(list+=","),$(this).data("name")&&$(this).data("brand")&&$(this).data("category")&&(list+="{",$(this).data("id")&&(list+='item_id: "'+$(this).data("id")+'",'),$(this).data("name")&&(list+='item_name: "'+String($(this).data("name")||"").replace('"','\\"')+'",'),$(this).data("position")&&(list+="index: "+$(this).data("position")+","),$(this).data("brand")&&(list+=' item_brand: "'+String($(this).data("brand")||"").replace('"','\\"')+'",'),$(this).data("category")&&(list+='item_category: "'+String($(this).data("category")||"").replace('"','\\"')+'",'),list+='item_coord: "'+String($(this).data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String($(this).data("core")||"").replace('"','\\"')+'",',$(this).data("price")&&(list+="price:"+(""+(String($(this).data("price"))||"")).replace("$","")+",",list+='currency: "USD",'),list+=" quantity: 1",list+="}",cnt+=1))});list+="]";try{list!="[]"&&gtag("event","view_promotion",{promotion_name:String(listname||"").replace('"','\\"'),promotion_id:String(listname||"").replace('"','\\"'),items:eval(list)})}catch(ex){}}}function productView(){sendGA4ViewList();sendGA4PromoViewList();$(window).on("resize scroll",function(){sendGA4ViewList();sendGA4PromoViewList()});usingGA3&&typeof ga!="undefined"&&(listName="",$(".productViewItem").each(function(){listName!=$(this).data("list")&&listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listName,{nonInteraction:!0}));ga("mc.ec:addImpression",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:$(this).data("list")});listName=$(this).data("list")}),listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listName,{nonInteraction:!0})));usingGA3&&typeof ga!="undefined"&&(listName="",$(".promoViewItem").each(function(){listName!=$(this).data("list")&&listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","PromoView",listName,{nonInteraction:!0}));$(this).data("name")&&$(this).data("brand")&&$(this).data("category")&&ga("mc.ec:addImpression",{id:$(this).data("id"),name:$(this).data("name"),category:$(this).data("category"),brand:$(this).data("brand"),price:$(this).data("price"),position:$(this).data("position"),list:$(this).data("list")});listName=$(this).data("list")}),listName!=""&&(ga("mc.ec:setAction","detail"),ga("mc.send","event","eCommerce",listName,{nonInteraction:!0})))}function addOnClick(productObj,evt){$(productObj).data("id")==null||productclicked||(productclicked=!0,usingGA4&&typeof gtag!="undefined"&&gtag("event","select_item",{item_list_id:$(productObj).data("list"),item_list_name:$(productObj).data("list"),is_logged_in:String(bloomreach_is_logged_in||"").replace('"','\\"'),is_prioritycare:String(bloomreach_isPriorityCare||"").replace('"','\\"'),items:eval([{item_id:$(productObj).data("id"),item_name:$(productObj).data("name"),index:$(productObj).data("position"),item_brand:$(productObj).data("brand"),item_category:$(productObj).data("category"),item_list_id:$(productObj).data("list"),item_list_name:$(productObj).data("list"),price:$(productObj).data("price"),currency:"USD",quantity:1}])}),usingGA3&&dataLayer.push({event:"productClick",ecommerce:{click:{actionField:{list:$(productObj).data("list")},products:[{name:$(productObj).data("name"),id:$(productObj).data("id"),price:$(productObj).data("price"),brand:$(productObj).data("brand"),category:$(productObj).data("category"),position:$(productObj).data("position")}]}},eventCallback:function(){evt.ctrlKey||($(productObj).attr("href")!=null?document.location=$(productObj).attr("href"):$(productObj).data("href")!=null&&(document.location=$(productObj).data("href")))}}))}function promoClick(n,t){usingGA4&&typeof gtag!="undefined"&&gtag("event","select_promotion",{creative_name:$(n).data("creative"),creative_slot:$(n).data("position"),promotion_id:$(n).data("id"),promotion_name:$(n).data("name")});usingGA3&&(ga("mc.ec:addPromo",[{id:$(n).data("id"),name:$(n).data("name"),creative:$(n).data("creative"),position:$(n).data("position")}]),ga("mc.ec:setAction","promo_click"),ga("mc.send","event","Internal Promotions","click",$(n).data("name"),{hitCallback:function(){t.ctrlKey||(document.location=$(n).attr("href"))}}))}function addA1Event(n,t,i,r,u,f){var e,o;return f==null&&(f="instore"),e="cartUpdated",f=="list"&&(e="listUpdated"),f=="favorite"&&(e="favoriteUpdated"),o=$.Deferred(),setTimeout(function(){usingA1&&typeof $A1!="undefined"&&(typeof r=="undefined"||r.toLowerCase().indexOf("pickup")<=0?$.ajax({type:"Get",url:"/store/getcartproducts.aspx?carttype="+f,async:!1,success:function(r){var s,f,h,c;existingCartIDs=r;s=[];f=0;n!=null&&i.indexOf("Interstitial Add Ons")<0&&(s[f]=$A1.Target({SourceProductNumber:String(n)}),f+=1);u!=null&&(h=u.split(":"),h.length==2&&(s[f]=$A1.Target({SourceProductNumber:String(h[1])}),f+=1));t!=null&&(c=t.split(","),c.forEach(function(t){t!=""&&t!=n&&(s[f]=$A1.Target({SourceProductNumber:String(t)}),f+=1)}));existingCartIDs!=null&&existingCartIDs.forEach(function(n){s[f]=$A1.Target({SourceProductNumber:String(n)});f+=1});s[f]=$A1.Target({subType:"",c_clientId:a1clientId});ga(function(){myEvent=$A1.Event({type:e,customer:currentVisitor,targets:s}).send()});o.resolve()}}):o.resolve())}),o.promise()}function addBloomreachEvent(n,t,i,r,u,f,e,o){var s="cart",a,h,c,l;return f==null&&(f="instore"),a="cartUpdated",f=="list"&&(a="listUpdated",s="list"),f=="favorite"&&(a="favoriteUpdated",s="favorite"),e=="Configurator"&&(s="configurator"),o&&(s=s+"_interstitial"),h="",currentFormList!=""?h=currentFormList:(c=$("[data-id="+n+"]").first(),n!=null&&c!=null&&c.data("list")!=null&&(h=c.data("list"))),l=$.Deferred(),setTimeout(function(){var c,o,a;if(usingBloomreach){if(r===null||typeof r=="undefined"||typeof r!="string"||r.toLowerCase().indexOf("pickup")<=0){if(n!=null&&i.indexOf("Interstitial Add Ons")<0){var o={type:s,action:"add",page_type:"website",action_type:"Product",list_id:h,recommendation_id:currentFormRecommendationID,product_id:n},v={product_list:bloomreachcartItems,product_ids:bloomreachcartIds,total_quantity:bloomreachcartTotalItems,total_price:bloomreachcartTotal,cart_type:f},y={product_list:bloomreachlistItems,product_ids:bloomreachlistIds,total_quantity:bloomreachlistTotalItems,total_price:bloomreachlistTotal,cart_type:f};$.ajax({url:"/assets/ajax/getProductAttributes.aspx",type:"POST",data:o,cache:!1,dataType:"json",success:function(t){var i=Object.assign({},t,bloomreachData);(s=="cart"||s=="cart_interstitial")&&(i=Object.assign({},i,v));(s=="list"||s=="list_interstitial")&&(i=Object.assign({},i,y));console.log(t);exponea.track("update",i);typeof usingBloomreachDiscoveryPixel!="undefined"&&BrTrk.getTracker().logEvent("cart","click-add",{prod_id:n,sku:t.short_sku})},error:function(){}})}u!=null&&(c=u.split(":"),c.length==2&&(o={action:"add",page_type:"website",action_type:"Service Plan",type:s,product_id:c[1]},$.ajax({url:"/assets/ajax/getProductAttributes.aspx",type:"POST",cache:!1,data:o,dataType:"json",success:function(n){var t=Object.assign({},n,bloomreachData);exponea.track("update",t)}})));t!=null&&(a=t.split(","),a.forEach(function(t){if(typeof t!="undefined"&&t.trim()!==""&&t!=n&&!isNaN(t)){var i={action:"add",page_type:"website",action_type:e,type:s,product_id:t};$.ajax({url:"/assets/ajax/getProductAttributes.aspx",type:"POST",cache:!1,data:i,dataType:"json",success:function(n){var t=Object.assign({},n,bloomreachData);exponea.track("update",t)}})}}));l.resolve()}}else l.resolve()}),l.promise()}function addToCartClick(n,t,i,r,u,f){var e,o=!1;setTimeout(function(){var listAction,itemDetail,list,indx,thisList,productcount,thislist,classkey;f==null&&(f="instore");var ct="add to cart",ga4Action="add_to_cart",islist=!1;if(f=="list"&&(ct="add to list",islist=!0),u===undefined&&(u=0),doPush=!1,listAction=i,listAction==""&&(listAction="Add To Cart Click"),r.toLowerCase().indexOf("pickup")>0,itemDetail=$(".ProductLink_"+n),itemDetail!=null&&itemDetail.data("id")!=null||(itemDetail=$(".productViewItem[data-id='"+n+"']").first()),usingGA4&&(itemDetail=$("[data-id="+n+"]").first()),(n!=null||t!=null)&&(t!=null||itemDetail!=null&&itemDetail.data("id")!=null&&(typeof ga!="undefined"||usingGA4||usingGA3))){if(doPush=!0,usingGA4){if(list="",n!=null&&itemDetail!=null&&(currentFormList!=""?listAction=currentFormList:itemDetail.data("list")!=null&&(listAction=itemDetail.data("list")),indx=0,itemDetail.data("position")!=null&&(indx=itemDetail.data("position")),list+="{",list+='item_id: "'+itemDetail.data("id")+'",',list+='item_name: "'+String(itemDetail.data("name")||"").replace('"','\\"')+'",',list+="index: "+itemDetail.data("position")+",",list+=' item_brand: "'+String(itemDetail.data("brand")||"").replace('"','\\"')+'",',list+='item_category: "'+String(itemDetail.data("category")||"").replace('"','\\"')+'",',list+='item_coord: "'+String(itemDetail.data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String(itemDetail.data("core")||"").replace('"','\\"')+'",',list+='item_list_id: "'+itemDetail.data("list")+'",',list+='item_list_name: "'+itemDetail.data("list")+'",',islist&&(list+='is_list: "'+islist+'",'),list+="price:"+itemDetail.data("price")+",",list+=" quantity: 1",list+="}"),t!=null&&t!="")for(SplitIds=t.split(","),cnt=0;cnt<SplitIds.length;++cnt)classkey=SplitIds[cnt],classkey==""||isNaN(classkey)||(classkey.indexOf(":")>0&&(classkey=classkey.split(":")[1]),itemDetail=$("[data-id="+classkey+"]").first(),itemDetail!=null&&itemDetail.data("id")!=null&&(list!=""&&(list+=","),list+="{",list+='item_id: "'+itemDetail.data("id")+'",',list+='item_name: "'+String(itemDetail.data("name")||"").replace('"','\\"')+'",',list+="index: "+itemDetail.data("position")+",",itemDetail.data("brand")&&(list+=' item_brand: "'+String(itemDetail.data("brand")||"").replace('"','\\"')+'",'),itemDetail.data("category")&&(list+='item_category: "'+String(itemDetail.data("category")||"").replace('"','\\"')+'",'),list+='item_coord: "'+String(itemDetail.data("coord")||"").replace('"','\\"')+'",',list+='item_core: "'+String(itemDetail.data("core")||"").replace('"','\\"')+'",',list+='item_list_id: "'+itemDetail.data("list")+'",',list+='item_list_name: "'+itemDetail.data("list")+'",',islist&&(list+='is_list: "'+islist+'",'),list+="price:"+itemDetail.data("price")+",",list+='currency: "USD",',list+=" quantity: 1",list+="}"));gtag("event",ga4Action,{currency:"USD",items:eval("["+list+"]")})}usingGA3&&($(".ProductLink_"+n)?ga("mc.ec:addProduct",{id:itemDetail.data("id"),name:itemDetail.data("name"),category:itemDetail.data("category"),brand:itemDetail.data("brand"),price:itemDetail.data("price"),list:itemDetail.data("list"),quantity:1}):$(".ProductViewItem").filter("[data-id='"+n+"']")&&ga("mc.ec:addProduct",{id:$(".ProductViewItem").filter("[data-id='"+n+"']").data("id"),name:$(".ProductViewItem").filter("[data-id='"+n+"']").data("name"),category:$(".ProductViewItem").filter("[data-id='"+n+"']").data("category"),brand:$(".ProductViewItem").filter("[data-id='"+n+"']").data("brand"),price:$(".ProductViewItem").filter("[data-id='"+n+"']").data("price"),quantity:1,list:$(".ProductViewItem").filter("[data-id='"+n+"']").data("list")}),i!=""&&(e=i.split(">")[0],listAction=e.split(",")[0],listAction=="Product Page"||listAction=="Frequently Bought Together"||listAction=="Add Ons"?(ga("mc.ec:setAction","add"),listAction="Product Page"):(thisList=i.split(",",1)[0],r.toLowerCase().indexOf("pickup")>0&&(thisList="quick pickup form",listAction="quick pickup form"),ga("mc.ec:setAction","add",{list:thisList}))),ga("mc.send","event","eCommerce",listAction,ct))}if(productcount=1,e=i.split(">")[0],listAction=e.split(",")[0],listAction==""&&(listAction="Add To Cart Click"),listAction=="Product Page"&&(listAction="Add Ons"),t!=null&&t!=""){for(SplitIds=t.split(","),productcount=productcount+SplitIds.length,usingGA3&&(i.split(",",1)[0]=="Interstitial Add Ons"?ga("mc.ec:setAction","add",{list:"Interstitial Add Ons"}):ga("mc.ec:setAction","add",{list:listAction})),thislist=listAction,listAction.indexOf("Configurator")>=0&&(thislist=listAction,o=!0),cnt=0;cnt<SplitIds.length;++cnt)classkey=SplitIds[cnt],classkey.indexOf(":")>0&&(classkey=classkey.split(":")[1]),itemDetail=$(".ProductLink_"+classkey),usingGA4&&(itemDetail=$("[data-id="+classkey+"]").first()),itemDetail!=null&&itemDetail.data("id")!=null&&(typeof ga!="undefined"||usingGA4)&&(doPush=!0,usingGA4&&!1&&gtag("event",ga4Action,{currency:"USD",value:$(".ProductLink_"+classkey).data("price"),items:[{item_id:itemDetail.data("id"),item_name:String(itemDetail.data("name")||"").replace('\\"'," "),item_list_id:thislist,item_list_name:thislist,index:0,item_brand:String(itemDetail.data("brand")||"").replace('\\"'," "),item_category:String(itemDetail.data("category")||"").replace('\\"'," "),item_coord:String(itemDetail.data("coord")||"").replace('\\"'," "),item_core:String(itemDetail.data("core")||"").replace('\\"'," "),price:itemDetail.data("price"),currency:"USD",quantity:1}]}),usingGA3&&ga("mc.ec:addProduct",{id:$(".ProductLink_"+classkey).data("id"),name:$(".ProductLink_"+classkey).data("name"),category:$(".ProductLink_"+classkey).data("category"),brand:$(".ProductLink_"+classkey).data("brand"),price:$(".ProductLink_"+classkey).data("price"),position:$(".ProductLink_"+classkey).data("position"),quantity:1,list:thislist}));doPush&&typeof ga!="undefined"&&usingGA3&&productcount>1&&(i.split(",",1)[0]=="Interstitial Add Ons"?ga("mc.ec:setAction","add",{list:"Interstitial Add Ons"}):ga("mc.ec:setAction","add",{list:listAction}),thislist=listAction,listAction.indexOf("Configurator")>=0&&(thislist=listAction),u>0?ga("mc.send","event","eCommerce",thislist,ct,u):ga("mc.send","event","eCommerce",thislist,ct))}})}function setHTMLDropdowns(){$(".selectorHref").unbind("click");$(".selectorHref").click(function(){var n=$(this).parent().parent().find(".dropdown-menu");keyisdown||($(n).css("display")=="block"||$(n).css("display")=="flex"?(n.hide(),n.data("closeSelector",!1)):($(".boosted .dropdown-menu").hide(),n.show(),n.data("closeSelector",!0),n.focus()))});$(".boosted .selectorHref").keydown(function(){$(this).data("keyisdown",!0)});$(document).bind("mouseup touchend",function(){needhide=!1;$(".dropdown-menu").each(function(){$(this).data("closeSelector")&&(needhide=!0)});needhide&&!hasTouch&&document.activeElement.className.indexOf("hasTouch")<0&&document.activeElement.className.indexOf("modal")<0&&document.activeElement.className.indexOf("ui-page")<0&&document.activeElement.className.indexOf("dropdown-menu")<0&&document.activeElement.className.indexOf("dropdown-item")<0&&document.activeElement.className.indexOf("dropdown-itemLI")<0&&document.activeElement.className.indexOf("selectorHref")<0&&document.activeElement.className.indexOf("dropdown")<0&&document.activeElement.className.indexOf("sortByText")<0&&($(".boosted .dropdown-menu").hide(),$(".dropdown-menu").data("closeSelector",!1))});$(".boosted .selectorHref").keyup(function(n){$(this).data("keyisdown",!1);n.preventDefault();var t=$(this).parent().parent().find(".dropdown-menu");$(".boosted .dropdown-menu").hide();$(".boosted .dropdown-menu").data("closeSelector",!1);(n.which===13||n.which===40)&&(t.is(":visible")&&n.which!=13?(t.hide(),t.data("closeSelector",!1)):(t.show(),t.data("closeSelector",!0),t.find("a").first().focus()))});$(".boosted .dropdown-menu li a").keyup(function(n){n.preventDefault();var u=$(document.activeElement),i=u.parent(),t=i.parent();if(n.which===27&&($(".boosted .dropdown-menu").hide(),$(".boosted .dropdown-menu").data("closeSelector",!1),t.parent().find(".dropdown .selectorHref").focus()),n.which!=13&&n.which!=27){var r=i.find("a").first().attr("href"),f=t.find("li").last().find("a").first().attr("href"),e=t.find("li").first().find("a").first().attr("href");n.which===40&&r!=f&&i.next().find("a").first().focus();n.which===38&&(r!=e?i.prev().find("a").first().focus():(t.hide(),t.data("closeSelector",!1),t.parent().find(".dropdown .selectorHref").focus()))}})}function bindMore(){setHTMLDropdowns();$(".guided").each(function(n){var i=$(this).data("dimname"),n=10,r=$(this).find("li").length,t;r>n&&(t=n-1,$(this).find("li:gt("+t+")").hide(),$(this).append('<li class="more"><a href="#"> + MORE<span class="hide-text"> '+i+"<\/span><\/a><\/li>"),$(this).append('<li class="less"><a href="#"> - LESS<span class="hide-text"> '+i+"<\/span><\/a><\/li>"),$(this).find("li.less").hide(),$(this).find("li.more:eq(0)").click(function(){var n=9,t;return $(this).parent().find("li:gt("+n+")").show(),$(this).parent().find("li.less").show(),$(this).parent().find("li:eq("+(n+1)+")").find("a").first().focus(),t=$(this).parent().find("li:eq("+(n+1)+")").find("a").html(),$("#Aria-Announcements").html(t),$(this).hide(),!1}),$(this).find("li.less:eq(0)").click(function(){return $(this).parent().find("li:gt("+t+")").hide(),$(this).parent().find("li.more").show(),$(this).hide(),!1}))})}function closeDropdowns(){$("#storeInfo").hide();$("#accountOptions").hide();$("body").is("#home")&&$("section").css("width")!="720px"||$(this).find("#mainNavLvl").css("left","-9999px");$(".generalNav ul").css("left","-9999px");$(".brandNav ul").css("left","-9999px")}function ADAUpdates(){const n=new MutationObserver(function(){try{$(".usabilla_live_button_container").length&&$(".usabilla_live_button_container").removeAttr("role");$("a:not([href])").each(function(){$(this).attr("href","#")});$("[onmouseover]").each(function(){var n=$(this).attr("onfocus");typeof n!="undefined"&&n!==!1||$(this).attr("onfocus",$(this).attr("onmouseover").replace("onMouseOver","onFocus"))});$("[onmouseout]").each(function(){var n=$(this).attr("onblur");typeof n!="undefined"&&n!==!1||$(this).attr("onblur",$(this).attr("onmouseout").replace("onMouseOut","onBlur"))});$("iframe").each(function(){var n=$(this).attr("title");(typeof n=="undefined"||n==!1)&&$(this).attr("title","external ad content")});$("#guided").length&&!$("#pnlGuidedNavigation").length&&$("#guided").removeAttr("aria-labelledby")}catch(n){}});n.observe(document.querySelector("body"),{subtree:!1,childList:!0});$(".usabilla_live_button_container").length&&$(".usabilla_live_button_container").removeAttr("role");$("a:not([href])").each(function(){$(this).attr("href","#")});$("img").each(function(){$(this).attr("src")=="https://microcenter.ugc.bazaarvoice.com/static/3520-en_us/profileSnapshotLoading.gif"&&$(this).attr("src","/assets/images/blank.gif");$(this).attr("alt")==""&&$(this).attr("alt","")});$("img:not([alt])").each(function(){$(this).attr("alt","")});$("[onmouseover]").each(function(){var n=$(this).attr("onfocus");typeof n!="undefined"&&n!==!1||$(this).attr("onfocus",$(this).attr("onmouseover").replace("onMouseOver","onFocus"))});$("[onmouseout]").each(function(){var n=$(this).attr("onblur");typeof n!="undefined"&&n!==!1||$(this).attr("onblur",$(this).attr("onmouseout").replace("onMouseOut","onBlur"))});$("iframe").each(function(){var n=$(this).attr("title");(typeof n=="undefined"||n==!1)&&$(this).attr("title","external ad content")});$("img:not([alt])").each(function(){$(this).attr("alt","")});$("#guided").length&&!$("#pnlGuidedNavigation").length&&$("#guided").removeAttr("aria-labelledby")}function RenderRecommendations(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){var w=$.cookie("__exponea_etc__"),b="";c&&w&&(b=w);const k={recommendheadline:r,productids:u,productid:i,recommendation_id:t,recommendation_list:f,keybrandname:e,shareurl:o,v:h,c:b,ct:l,ac:a,mc:v,pc:y,carttype:p};$.ajax({url:"/assets/ajax/recommendationList.aspx",type:"POST",data:k,success:function(t){if(t.html!=""){var i=$("<div/>").html(t.html).text();$("#"+n).html(i);s!=""&&$(s).remove();bindSubmit();bindClickItemBR();bindListClick();setfavorites();h==4&&$("#BRBoughtWithInterstitial").show();h==2&&($(".shuffle").off("click"),$(".shuffle").click(function(){var t=$(this).data("elements"),i,n;$("."+t).shuffle();i=Number($(this).data("max"));n=0;$("."+t+" hr").removeClass("hide-text");$("."+t).addClass("border-md-right");$("."+t).each(function(){n+=1;n==1&&$(this).find("hr").addClass("hide-text");n>=i&&$(this).removeClass("border-md-right");n>i&&$(this).find("hr").addClass("hide-text");n<=i?$(this).show():$(this).hide()})}))}else h==4?($("#BRBoughtWithInterstitial").hide(),$(".brTab").hide(),$(".nav .accTab").length>1&&$(".nav .accTab").eq(1).find("a").trigger("click")):($("#"+n).remove(),s!=""&&$(s).show())},error:function(){$("#"+n).remove();s!=""&&$(s).show()}})}function BuildRecommendations(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y){var p={recommendationId:t,size:30,callback:function(o){var p="";o&&o.length>0&&(p=o.map(function(n){return n.item_id}).join(","));RenderRecommendations(n,t,i,r,p,u,f,e,h,c,l,a,!0,v,s,y)},fillWithRandom:!1,catalogAttributesWhitelist:["item_id","url","title"]};typeof o!="undefined"&&o!=""&&(p.catalogFilter=o);i!=""&&(p.items=[i]);!s;exponea.getRecommendation(p)}var currentCompare="",timeoutTopMenuSub,itemprice=0,adVehicleImpressions=[],addOnLayer,frequentlyBoughtLayer,bundleOptionsLayer,productsLayer,configuratorLayer,openboxLayer,sentProducts=!1,sentAdOns=!1,sentBundles=!1,sentfrequentlybought=!1,sentconfigurator=!1,sentopenbox=!1,geotargetcomplete=!1,productclicked=!1,hideIT="",returnToIT="",sentopenbox=!1,closeStoreSelector=!1,keyisdown=!1,usingGA4=!1,usingGA3=!1,usingBloomreach=!1,usingA1=!1,processedlists=[],processedbloomreachlists=[],processedPromolists=[],hasTouch=!0,currentCategory="",PDPCat="",currentCats="",listname,bloomreachloadTime,bloomreachscrollpercent,bloomreach_identified,bloomreach2,bloomreachTitle,bloomreachDescription,bloomreachimage,bloomreachh1,bloomreachh2,bloomreachcartItems,boomreachcartIds,bloomreachcartTotal,bloomreachcartTotalItems,bloomreachlistItems,bloomreachlistIds,bloomreachlistTotal,bloomreachlistTotalItems,list,pv,cnt=0,isLogin=""+localStorage.getItem("login"),pvc,currentFormList,currentFormRecommendationID,newwindow,Header;if(localStorage.setItem("login",""),pvc=1,$(".lazy-item").hide(),""+localStorage.getItem("pvc")==""||isNaN(""+localStorage.getItem("pvc")))localStorage.setItem("pvc",pvc),localStorage.setItem("pvcDate",new Date);else{if(pvc=parseInt(""+localStorage.getItem("pvc")),pvc+=1,""+localStorage.getItem("pvcDate")!=""){var pvcDate=new Date(localStorage.getItem("pvcDate")),diff=(new Date).valueOf()-pvcDate.valueOf(),diffInHours=diff/36e5;diffInHours>24&&(pvc=1)}localStorage.setItem("pvc",pvc)}currentFormList="";currentFormRecommendationID="";"ontouchstart"in document.documentElement||(hasTouch=!1);"ontouchstart"in document.documentElement||(hasTouch=!1);$(document).ready(function(){function w(){var n=function(n){for(var u=window.location.search.substring(1),r=u.split("&"),t,i=0;i<r.length;i++)if(t=r[i].split("="),t[0]===n)return typeof t[1]===undefined?!0:decodeURIComponent(t[1]);return!1},t=n("vkw")}function d(){var t=$("#search-query").attr("name"),n;t.toLowerCase()=="ntt"&&(p.length>=2?(n=$("#search-nValue").val(),$("#search-query").addClass("loading"),$.ajax({type:"POST",url:"/assets/ajax/autosuggest.aspx",data:"term="+p+"&N="+n,success:function(n){n.length>=6&&n.indexOf("0 suggestions found, 0 categories found, 0 brands found.")<=0?($(".typeAheadAjax").html("<div class='typeAheadArrow'><\/div>"+n),$(".typeAheadAjax").show(),$("#Aria-Announcements").html('<div aria-live="polite" role="alert">'+$("#typeaheadanouncement").html()+" Press down arrow to access suggestions.<\/div>"),window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3),returnToIT="#search-query",hideIT=".typeAheadAjax",$("#search-query").removeClass("loading"),$("#TA-articles .TA-more").click(function(){$("#TA-articles li").removeClass("TA-hide");$(this).addClass("TA-hide")}),$("#TA-suggestions .TA-more").click(function(){$("#TA-suggestions li").removeClass("TA-hide");$(this).addClass("TA-hide")}),$("#TA-categories .TA-more").click(function(){$("#TA-categories li").removeClass("TA-hide");$(this).addClass("TA-hide")}),$("#TA-brands .TA-more").click(function(){$("#TA-brands li").removeClass("TA-hide");$(this).addClass("TA-hide")}),$(".TA-Scroll").mCustomScrollbar({mouseWheel:!0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!0,updateOnBrowserResize:!1,contentTouchScroll:!0}}),window.setTimeout(function(){$(".TA-Scroll").mCustomScrollbar("update")},1500),$(".typeAheadAjax a").click(function(){var t=$(this).attr("href"),n;t&&(n=new URLSearchParams(t.split("?")[1]),n.has("Ntt")&&typeof usingBloomreachDiscoveryPixel!="undefined"&&BrTrk.getTracker().logEvent("suggest","click",{aq:$("#search-query").val(),q:n.get("Ntt")}),n.has("q")&&typeof usingBloomreachDiscoveryPixel!="undefined"&&BrTrk.getTracker().logEvent("suggest","click",{aq:$("#search-query").val(),q:n.get("q")}))})):$("#search-query").removeClass("loading")}})):$(".typeAheadAjax").hide())}var s,h,c,i,l,r,a,u,v,f,y,e,k,p,o,t,n,b;bindOptionsContainer();s=$("h1").first();s.length&&(bloomreachh1=s.text());h=$("h2").first();h.length&&(bloomreachh2=h.text());bloomreachTitle=document.title;bloomreachDescription=$('meta[name="description"]').attr("content");bloomreachimage=$('meta[property="og:image"]').attr("content");$(".lazy-item").show();$(".showAllAuthors").click(function(){$(".authorList .hide").show();$(".showAllAuthors").hide()});$(".seeAllCategories").click(function(){$(".allCategories").show();$(".seeAllCategories").hide()});$("#blogsearchbutton").click(function(){$("#blogsearchform").submit()});$(".singleEventClick").click(function(){var t=$(this).data("eventcategory"),i=$(this).data("eventaction"),r=$(this).data("eventlabel"),n=$(this).data("eventvalue"),u=$(this).data("eventname");n==null&&(n=1);u!=null&&t!=null&&(usingGA4&&gtag("event",u,{event_category:t,event_action:i,event_label:r,event_value:n}),usingGA3&&$(this).attr("onClick")===undefined&&typeof ga!="undefined"&&ga("mc.send",{hitType:"event",eventCategory:t,eventAction:i,eventLabel:r,eventValue:n}))});$(".bvinine_rating").click(function(){$("html, body").animate({scrollTop:$("#tab-reviews-bm").offset().top},100)});setTimeout(function(){checkCharlotte();checkMiami();checkSantaClara()},100);loadLazy();$(".needsValidation").length&&(c=!1,i=readCookie("Mvalidation"),typeof i!="undefined"&&i!=null&&i!=""&&$(".needsValidation").hide(),$(".needsValidation").hover(function(){c=!0}),$(".closevalidation").click(function(){$(".needsValidation").hide();createCookie("Mvalidation","closed",1)}),setTimeout(function(){c||$(".needsValidation").hide()},15e3));$(".needsLogin").length?(l=!1,r=readCookie("Mlogin"),pvc<3?$(".needsLogin").hide():typeof r!="undefined"&&r!=null&&r!=""&&pvc>=3?$(".needsLogin").hide():$(".needsCharlotte")!=null&&$(".needsCharlotte").is(":visible")||$(".needsSantaClara")!=null&&$(".needsSantaClara").is(":visible")||$(".needsSantaClara")!=null&&$(".needsSantaClara").is(":visible")||($(".needsLogin").show(),$(".closeloginrequest").focus(),createCookie("Mlogin","closed",1),$(window).scroll(function(){var n=$(".MobileFramework .needsLogin"),t=$(window).scrollTop(),i=$(".MobileFramework .hdrRow4").offset().top;t>=i?n.addClass("stickySignIn"):n.removeClass("stickySignIn")})),$(".needsLogin").hover(function(){l=!0}),$(".closeloginrequest").click(function(){$(".needsLogin").hide();createCookie("Mlogin","closed",1)}),setTimeout(function(){!l&&$(".needsLogin").is(":visible")&&($(".needsLogin").hide(),createCookie("Mlogin","closed",1))},3e4)):createCookie("Mlogin","closed",1);$(".needsCharlotte").length&&pvc>=2&&($("#storeInfo").removeClass("forceopen"),a=!1,u=readCookie("Mcharlotte"),typeof u!="undefined"&&u!=null&&u!=""?$(".needsCharlotte").hide():($(".needsCharlotte").show(),$(".closecharlotterequest").focus()),$(".needsCharlotte").hover(function(){a=!0}),$(".closecharlotterequest").click(function(){$(".needsCharlotte").hide();createCookie("Mcharlotte","closed",365)}),$(".needsCharlotte .learnMoreButton").click(function(){$(".needsCharlotte").hide();createCookie("Mcharlotte","closed",365)}),setTimeout(function(){a||($(".needsCharlotte").hide(),createCookie("Mcharlotte","closed",365))},3e4));$(".needsMiami").length&&pvc>=2&&($("#storeInfo").removeClass("forceopen"),v=!1,f=readCookie("Mmiami"),typeof f!="undefined"&&f!=null&&f!=""?$(".needsMiami").hide():($(".needsMiami").show(),$(".closemiamirequest").focus()),$(".needsMiami").hover(function(){v=!0}),$(".closemiamirequest").click(function(){$(".needsMiami").hide();createCookie("Mmiami","closed",365)}),$(".needsMiami .learnMoreButton").click(function(){$(".needsMiami").hide();createCookie("Mmiami","closed",365)}),setTimeout(function(){v||($(".needsMiami").hide(),createCookie("Mmiami","closed",365))},3e4));$(".needsSantaClara").length&&pvc>=2&&($("#storeInfo").removeClass("forceopen"),y=!1,e=readCookie("Msantaclara"),typeof e!="undefined"&&e!=null&&e!=""?$(".needsSantaClara").hide():($(".needsSantaClara").show(),$(".closesataclararequest").focus()),$(".needsSantaClara").hover(function(){y=!0}),$(".closesantaclararequest").click(function(){$(".needsSantaClara").hide();createCookie("Msantaclara","closed",365)}),$(".needsSantaClara .learnMoreButton").click(function(){$(".needsSantaClara").hide();createCookie("Msantaclara","closed",365)}),setTimeout(function(){y||($(".needsSantaClara").hide(),createCookie("Msantaclara","closed",365))},3e4));productView();$(".shuffle").click(function(){var t=$(this).data("elements"),i,n;$("."+t).shuffle();i=Number($(this).data("max"));n=0;$("."+t+" hr").removeClass("hide-text");$("."+t).addClass("border-md-right");$("."+t).each(function(){n+=1;n==1&&$(this).find("hr").addClass("hide-text");n>=i&&$(this).removeClass("border-md-right");n>i&&$(this).find("hr").addClass("hide-text");n<=i?$(this).show():$(this).hide()})});$(".seemore").click(function(){var t=$(this).data("elements"),i=0,n=0,r;$("."+t).each(function(){!$(this).is(":visible")&&n<3&&($(this).show(),$(this).find("hr").is(":visible")||$(this).addClass("pt-50"),n+=1,i+=1);n==0&&(i+=1)});r=Number($(this).data("max"));i>=$("."+t).length&&$(".seemore-"+t).hide();n=0;$("."+t+" hr").removeClass("hide-text");$("."+t).addClass("border-md-right");$("."+t).each(function(){n+=1;n==1&&$(this).find("hr").addClass("hide-text");n%3==0&&$(this).removeClass("border-md-right");n%3==0})});usingGA4&&$("a").click(function(){$(this).data("eventname")!=null&&$(this).data("eventaction")!=null&&$(this).data("eventcategory")!=null&&typeof gtag!="undefined"&&gtag("event",$(this).data("eventname"),{event_category:$(this).data("eventcategory"),event_action:$(this).data("eventaction"),event_label:$(this).data("eventlabel"),event_value:$(this).data("eventvalue")})});navigator.share&&$("body").hasClass("MobileFramework")?($(".mobileShare").show(),$(".desktopShare").hide(),$(".mobileShareButton").click(function(){navigator.share({title:$(document).attr("title"),url:$(location).attr("href")})})):($(".mobileShare").hide(),$(".desktopShare").show());$(".clearAsus").click(function(){return $(".asusCheckbox").prop("checked",!1),$(".productIDsRadio").removeClass("isselectedItem"),$(".productIDsRadio").prop("checked",!1),setsummarytotal(),!1});setTimeout(function(){$(".slick-dots").append("<li role='presentation' class='play'><a href='#' class='slick-play'><img src='https://60a99bedadae98078522-a9b6cded92292ef3bace063619038eb1.ssl.cf2.rackcdn.com/play-16.png' alt='play'><span class='hide-text'>Next<\/span><\/a><\/li><li role='presentation' class='pause'><a href='#' class='slick-pause' ><img src='https://60a99bedadae98078522-a9b6cded92292ef3bace063619038eb1.ssl.cf2.rackcdn.com/pause-16.png' alt='pause'><span class='hide-text'>pause<\/span><\/a><\/li>");$(".slick-play").click(function(){return $(".slick-slider").slick("slickPlay"),$(this).hide(),$(".slick-pause").show(),!1});$(".slick-pause").click(function(){return $(".slick-slider").slick("slickPause"),$(this).hide(),$(".slick-play").show(),!1})},500);$(".asyncStyle").each(function(){$(this).attr("media","all")});$(".serviceReviews").length&&serviceBVCheck();isLogin==="true"&&resetLoading();$(".siteSearchForm").submit(function(){if($("#search-query").val())typeof usingBloomreachDiscoveryPixel!="undefined"&&BrTrk.getTracker().logEvent("suggest","submit",{q:$("#search-query").val()});else return $("#search-query").focus(),!1});$(".productSearch").click(function(){var n=w();usingGA4&&gtag("event","searchChoices",{event_type:"ProductsSearch",event_action:n});usingGA3&&ga("mc.send","event","searchChoices","ProductsSearch",n)});$(".contentSearch").click(function(){var n=w();usingGA4&&gtag("event","searchChoices",{event_type:"ContentSearch",event_action:n});usingGA3&&ga("mc.send","event","searchChoices","ContentSearch",n)});$(".st-ui-result.__swiftype_result").click(function(){var n=$(this).find(".resultType").text()+" - "+$(this).find(".st-ui-type-heading").text();usingGA4&&gtag("event","contentResults",{event_type:"contentResultsLink",event_action:n});usingGA3&&ga("mc.send","event","contentResults","contentResultsLink",n)});$("#hotdeals .hotdealItem .clickable.fade a").click(function(){var n=$(this).text(),i=n.indexOf(" ",n.indexOf(" ")+1),t=n.substr(i+1);usingGA4&&gtag("event","hmpg",{event_type:"categories",event_action:t});usingGA3&&ga("mc.send","event","hmpg","categories",t)});$(".SearchDropdown .dropdown-item").click(function(n){n.preventDefault();var r=$(this).data("n"),t=$(this).data("fieldname"),u=$(this).data("target"),f=$(this).data("cat"),e=$(this).attr("href"),i=$(this).html();t=="keyword"?($("#swiftypeSearch").css("display","flex"),$("#standardSearch").hide(),$("#site-search-query").focus()):($("#swiftypeSearch").css("display","none"),$("#standardSearch").show(),$("#search-query").focus());$(".siteSearchForm").attr("target",u);$(".siteSearchForm").attr("action",e);$(".siteSearchForm #search-nValue").val(r);$(".siteSearchForm #search-cat").val(f);$(".siteSearchForm #search-query").attr("name",t);$(".SearchDropdown #searchTitle").html(i);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Search changed to:'+i+" Begin typing to start search.<\/div>");window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3);$(".SearchDropdown .dropdown-menu").hide()});$("#storeselectorHref").click(function(){keyisdown||($("#boosted .dropdown-menu").is(":visible")?($("#boosted .dropdown-menu").hide(),closeStoreSelector=!1):($("#boosted .dropdown-menu").show(),closeStoreSelector=!0,$("#boosted .dropdown-menu").focus()))});$("#boosted #storeselectorHref").keydown(function(){keyisdown=!0});$("#boosted #storeselectorHref").keyup(function(n){keyisdown=!1;n.preventDefault();(n.which===13||n.which===40)&&($("#boosted .dropdown-menu").is(":visible")?($("#boosted .dropdown-menu").hide(),closeStoreSelector=!1):($("#boosted .dropdown-menu").show(),closeStoreSelector=!0,$("#boosted .dropdown-menu").find("a").first().focus()))});$("#boosted .dropdown-menu li a").keyup(function(n){n.preventDefault();var i=$(document.activeElement),t=i.parent();n.which===40&&t!=$("#boosted .dropdown-menu").find("li").last()&&t.next().find("a").first().focus();n.which===38&&(t!=$("#boosted .dropdown-menu").find("li").first()?t.prev().find("a").first().focus():($("#boosted .dropdown-menu").hide(),closeStoreSelector=!1,$("#storeselectorHref").focus()))});window.onclick=function(n){try{n.target.matches("#boosted")||n.target.matches("#storeselectorHref")||($("#boosted .dropdown-menu").hide(),closeStoreSelector=!1)}catch(t){}};$("#storeselector").change(function(){$("#storeselector option:selected").index()>0?$("#getstoreselectorButton").show():$("#getstoreselectorButton").hide()});$("#storeselector option:selected").index()>0&&$("#getstoreselectorButton").show();$(".mm14-products-viewed-wrapper").each(function(){try{addSliderEvent($(this))}catch(n){}});$("#skip-main-content").click(function(){var n=$(this).attr("href");if($(n+" h1").first().length)return $(n+" h1").first().attr("id","main-content-h1"),$(n+" h1").first().attr("tabindex","0"),$(n+" h1").first().focus(),!1});k=jQuery.browser.mobile==!0;t=!0;$(".productClickItem").click(function(n){n.preventDefault();productClick(this)});$(".inBundle-title a").click(function(n){n.preventDefault();productClick(this,n)});$(".inBundle-image img").click(function(n){n.preventDefault();productClick(this,n)});$(".products .image").click(function(n){n.preventDefault();productClick(this,n)});$(".avProductClick").click(function(n){n.preventDefault();productClick(this,n)});$(".addOnProductClick").click(function(n){addOnClick(this,n)});$(".pDescription h2 a").click(function(n){n.preventDefault();productClick(this,n)});$(".SearchBannerProduct").click(function(n){n.preventDefault();productClick(this,n)});$(".RightBannerProduct").click(function(n){n.preventDefault();productClick(this,n)});$(".featureProduct").click(function(n){n.preventDefault();productClick(this,n)});$(".SearchTower").click(function(n){promoClick(this,n)});$(".SearchBanner").click(function(n){promoClick(this,n)});$("#tabClearance").click(function(){sendOpenBoxImpression()});$("#tabInterstitial").click(function(){sendaddOnImpression()});$("#frequentlyBoughtLabel").click(function(){sendfrequentlyboughtImpression()});$("#ConfiguratorLabel").click(function(){sendconfiguratorImpression()});$("#BundleLabel").click(function(){sendBundleImpression()});$("#byProd2").click(function(){$("#mainMenu").hasClass("ui-panel-open")||window.setTimeout(function(){$("#byProd").focus()},500)});$(".typeAheadAjax").hover(function(){t=!1},function(){t=!0});$(document).on("keydown",function(n){n.keyCode==40&&$(".typeAheadAjax").is(":visible")&&(n.preventDefault(),$(".typeAheadResults li").first().find("a").first().focus())});$(".typeAheadAjax").on("touchstart",function(){t=!1});$(".typeAheadAjax").on("touchmove",function(){t=!1});$(".typeAheadAjax").on("touchend",function(){window.setTimeout(function(){t=!0},1e3)});$(".typeAheadAjax").on("touchleave",function(){window.setTimeout(function(){t=!0},1e3)});$("#search-query").keyup(function(n){n.keyCode!=40&&(window.clearTimeout(o),$(".typeAheadAjax").hide(),p=this.value,$("#search-query").removeClass("loading"),o=window.setTimeout(function(){d()},50))});$(document).mousedown(function(){t&&(window.clearTimeout(o),$(".typeAheadAjax").hide(),$("#search-query").removeClass("loading"))});$(document).on("touchstart",function(){t&&window.setTimeout(function(){window.clearTimeout(o);$(".typeAheadAjax").hide();$("#search-query").removeClass("loading")},1e3)});setCompareFeatures();setGridView();bindMore();try{$("#configuratorTabs.tabs").productTabs({speed:200});$(".configurator .nav-link").click(function(){$(".configurator .nav-link").removeClass("active");$("."+$(this).attr("class").replace(" ",".")).not("#"+$(this).attr("id")).addClass("active");$(this).parent().parent().attr("id")=="configuratorTabs2"&&($(".ActionButtons").addClass("cnfSticky"),$(".ActionButtonsContainer").addClass("cnfSticky"),$("html,body").animate({scrollTop:$("#configuratorWrapper").offset().top},"fast"),$(".ActionButtons").removeClass("cnfSticky"),$(".ActionButtonsContainer").removeClass("cnfSticky"))});$("#product.DesktopFramework .tabs").productTabs({speed:200});location.hash!=null&&location.hash.indexOf("tab")>=0&&(n="",location.hash=="#tab-specs"&&(n="#tabSpecs"),location.hash=="#tab-protectionplans"&&(n="#tabProtectionplans"),location.hash=="#tab-interstitial"&&(n="#tabInterstitial"),location.hash=="#tab-reviews"&&(n="#tabReviews"),location.hash=="#tab-qa"&&(n="#tabQa"),location.hash=="#tab-info"&&(n="#tabInfo"),location.hash=="#tab-support"&&(n="#tabSupport"),location.hash=="#tab-clearance"&&(n="#tabClearance"),location.hash=="#tab-rebate"&&(n="#tabRebate"),n!=""&&($("#product.DesktopFramework #product-details .accTab a").removeClass("current"),$("#product.DesktopFramework #product-details .accTab a").attr("aria-selected","false"),$("#product.DesktopFramework "+n).addClass("current"),$("#product.DesktopFramework "+n).attr("aria-selected","true"),$("#product.DesktopFramework #product-details article").css("display","none"),$("#product.DesktopFramework #product-details article").attr("aria-hidden","true"),$(location.hash).css("display","block"),$(location.hash).attr("aria-hidden","false")))}catch(g){}try{$("#quickview-content .tabs").productTabs({speed:200})}catch(g){}try{b=$("#product.productStation.MobileFramework .tabs");b.length<=0?$("#product.MobileFramework .tabs").accordion({header:".tabLink",active:!1,collapsible:!0,heightStyle:"content",change:function(){$("#product.MobileFramework .tabs").show()[0].scrollIntoView(!0)}}):$("#product.MobileFramework .tabs").productTabs({speed:200})}catch(g){}try{$(".DesktopFramework.techcenter .tabs").productTabs({speed:200})}catch(g){}try{$(".MobileFramework.techcenter  .tabs").accordion({header:".tabLink",active:!1,collapsible:!0,heightStyle:"content",change:function(){$(".techcenter .tabs").show()[0].scrollIntoView(!0)}})}catch(g){}try{$("#careproduct .tabs").organicTabs({speed:200})}catch(g){}$("article.tabs section div").hide();$("article.tabs section:first article").show();$("article.tabs section:first").addClass("active");$("#intersticialTabs #isserviceplans").click(function(){activateServicePlans()});$("#intersticialTabs #zone1tab").click(function(){activateZone1()});$("#intersticialTabs #zone2tab").click(function(){activateZone2()});$("#intersticialContent input").each(function(){$(this).attr("checked",!1)});$(".RWO-RESERVE").click(function(){$(".crtfrm input[name='IsQuick']").val("True")});$(".crtQty").change(function(){isNaN($(this).val())&&$(this).val(1);$(this).val()>$(this).data("max")&&$(this).val($(this).data("max"));$(this).val()<0&&$(this).val(1);$(".crtQty").val($(this).val())});$(".btn-add").click(function(){$(".crtfrm input[name='rf']").val()!="Interstitial Add Ons"});$("#intersticialBtn").click(function(){return $(".crtfrm input[name='rf']").val("Add Ons"),$(".crtfrm").first().submit(),!1});$("#FrequentyPurchasedTogetherButton").click(function(){$("#cartModal").html("");$(".crtfrm input[name='rf']").val("Frequently Bought Together");$(".crtfrm").first().submit()});$(".crtfrm .big.STBTN").click(function(){$(".body-loading").each(function(){$(this).attr("style","display:block !important; background-color:rgb(255,255,255); opacity:.8;")});$(".crtfrm .big.STBTN").css("display","none");$(".RWOQuantity").val("");$("#cartModal").html("");var n=$(".crtfrm.ajaxForm").first().find("input[name='ajax']");n.length&&(n.val("true"),$(".crtfrm.ajaxForm").first().find("input[name='buyItNow']").val("false"));n=$(".crtfrm.ajaxForm").last().find("input[name='ajax']");n.length&&(n.val("true"),$(".crtfrm.ajaxForm").last().find("input[name='buyItNow']").val("false"))});$(".crtfrm .big.BUY-NOW").click(function(){$("#cartModal").html("");var n=$(".crtfrm.ajaxForm").first().find("input[name='ajax']");n.length&&(n.val("false"),$(".crtfrm.ajaxForm").first().find("input[name='buyItNow']").val("true"));n=$(".crtfrm.ajaxForm").last().find("input[name='ajax']");n.length&&(n.val("false"),$(".crtfrm.ajaxForm").last().find("input[name='buyItNow']").val("true"));$(".crtfrm.ajaxForm").first().submit()});$(".ChangeCartType").click(function(){$(this).parent().parent().parent().find(".cartType").val($(this).data("carttype"))});$("#opAddToCart").click(function(){$("#cart-options.BuyingOptions input.btn-add").removeClass("opDisabled");$("#cart-options.BuyingOptions input.btn-add.grey.big.opPickupAtStore").addClass("opDisabled")});$("#opPickupRadio").click(function(){$("#cart-options.BuyingOptions input.btn-add").addClass("opDisabled");$("#cart-options.BuyingOptions input.btn-add.opPickupAtStore").removeClass("opDisabled")});$(".opDeliveryTypeRadio").click(function(){var n=29;$(this).data("storeid")!=null&&(n=parseInt($(this).data("storeid")));$(".crtfrm input[name='store_id']").val(n);$(".crtfrm").first().attr("action","/store/add_product.aspx?storeid="+n);n!=29?($("#opPickupAtStore").removeClass("opDisabled"),$("#opPickupAtStore").addClass("opEnabled"),$("#opPickupAtStore").unbind(),$("#opPickupAtStore").click(function(){$(".crtfrm").first().submit()})):($("#opPickupAtStore").addClass("opDisabled"),$("#opPickupAtStore").removeClass("opEnabled"),$("#opPickupAtStore").unbind(),$("#opPickupAtStore").click(function(){return}))});$("#topserviceplan input").attr("checked",!1);$("#serviceplanfrm input").attr("checked",!1);$("#topserviceplan input[name='topserviceplan']").click(function(){$("#serviceplanfrm input[name='serviceplan'][value='"+this.value+"']").attr("checked","checked")});$("#moreprotectionplans").click(function(){$("#topserviceplan li").removeClass("hideitem");$("#moreprotectionplans").addClass("hideitem")});$("#serviceplanfrm input[name='serviceplan']").click(function(){$("#topserviceplan input").attr("checked",!1);$("#topserviceplan input[name='topserviceplan'][value='"+this.value+"']").attr("checked","checked")});$(".productIDsRadio").click(function(){var t=$(this).attr("name"),n=$("input[name = '"+t+"'][value = '']");n!=null&&n.parent()!=null&&n.parent().show();$(this).val()==""&&$(this).parent().hide()});$(".startBuild").click(function(){var t=$(this).data("buildid"),i=$(this).data("buildname"),n=$(this).data("storeselected");usingGA4&&gtag("event","start_build",{event_type:"start_build",event_action:"store:"+n,build_id:""+t});usingGA3&&ga("mc.send","event","start_build","start_build",n);$(".sku").each(function(){var n=$(this).html().replace("SKU: ","");(n=="583526"||n=="583559"||n=="583575"||n=="583609"||n=="583617"||n=="583757"||n=="583864"||n=="583872"||n=="583922"||n=="583955"||n=="584094"||n=="584110"||n=="584250"||n=="584318")&&$(this).parent().find(".stock").html("Special Order")})});$(".openboxfrm").submit(function(){var t=$(this).parent().parent().data("price"),n=$(this).find("input[name='productID']").val();usingGA4&&gtag("event","add_to_cart",{currency:"USD",value:t,items:[{item_id:$(".ProductLink_"+n).data("id"),item_name:String($(".ProductLink_"+n).data("name")||"").replace('\\"'," "),index:0,item_brand:String($(".ProductLink_"+n).data("brand")||"").replace('\\"'," "),item_category:String($(".ProductLink_"+n).data("category")||"").replace('\\"'," "),item_coord:String($(".ProductLink_"+n).data("coord")||"").replace('\\"'," "),item_core:String($(".ProductLink_"+n).data("core")||"").replace('\\"'," "),item_list_id:"Add To Cart Click - Single Product Clearance",item_list_name:"Add To Cart Click - Single Product Clearance",is_personalized:$(".ProductLink_"+n).data("personalized"),price:t,currency:"USD",quantity:1}]});usingGA3&&(ga("mc.ec:addProduct",{id:$(".ProductLink_"+n).data("id"),name:$(".ProductLink_"+n).data("name"),category:$(".ProductLink_"+n).data("category"),brand:$(".ProductLink_"+n).data("brand"),price:t,quantity:1,list:"Add To Cart Click - Single Product Clearance"}),ga("mc.ec:setAction","add",{list:"Add To Cart Click - Single Product Clearance"}))});bindSubmit();bindClickItemV2();$(".proceedtocart").click(function(){$(".crtfrm").submit()});$(".proceedAjaxModal").click(function(){$("#crtfrmAjaxItems").submit()});$(".fbBundleProductCheckbox").click(function(){var n=0,t;$("#FrequentyPurchasedTogether input[name='ProductID']").each(function(){n=parseFloat($(this).data("price"))});$("#FrequentyPurchasedTogether input[name='productIDsFB']:checked").each(function(){n=n+parseFloat($(this).data("price"))});t=n.toFixed(2).toString();$(".BundledPrice").html("$"+t);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Bundled Price Updated to $'+t+"<\/div>");window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3);$(this).is(":checked")?$(".recentImageItem"+$(this).data("id")).css("opacity","1"):$(".recentImageItem"+$(this).data("id")).css("opacity",".6")});$(".opClose").click(function(){$(".opClose").hide();$("#open_box_modal").hide();$("#openBox").show();$(".fbSmallButton").css("opacity","1");$("input.btn-add.grey.big.STBTN").css("opacity","1");$("input.btn-add.grey.big.RWO-ON").css("opacity","1");$("#opReduceAttention").removeClass("btn-add grey big STBTN opReduceAttention").addClass("btn-add grey big STBTN");$("#opReduceAttention").removeClass("btn-add grey big opReduceAttention").addClass("btn-add grey big")});$(".opChoose").click(function(){$(".RWO-RESERVE").prop("type","button");$("#open_box_modal_container .btn-add").css("display","none");$(this).parent().parent().find(".btn-add").css("display","block");$(".opBuyNowArea").text("BUY NOW")});$("#openBox").click(function(){return $("#product-details article").removeClass("active"),$("#openBox").hide(),$(".opClose").show(),$("#product-details article").hide(),$("#tab-clearance").fadeIn("fast"),$("#product-details ul.nav li a").removeClass("current"),$("#tabClearance").addClass("current"),$(".fbSmallButton").css("opacity",".4"),$("input.btn-add.grey.big.STBTN").css("opacity",".4"),$("input.btn-add.grey.big.BUY-NOW").css("opacity",".4"),$("input.btn-add.grey.big.RWO-ON").css("opacity",".4"),$("#open_box_modal").is(":visible")?$("#open_box_modal").hide():($("#open_box_modal").show(),$("#opReduceAttention").removeClass("btn-add grey big STBTN").addClass("btn-add grey big STBTN opReduceAttention"),$("#opReduceAttention").removeClass("btn-add grey big").addClass("btn-add grey big opReduceAttention")),sendOpenBoxImpression()});$("#open_box_modal").not(":visible")&&window.location.href.indexOf("ob=1")==-1&&$("#open_box_modal").mCustomScrollbar({mouseWheel:!0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!0,updateOnBrowserResize:!1,contentTouchScroll:!0}});$("#afterRebate").click(function(){return $("#product-details article").removeClass("active"),$("#product-details article").hide(),$("#tab-rebate").fadeIn("fast"),$("#product-details ul.nav li a").removeClass("current"),$("#tabRebate").addClass("current"),!1});try{$("article.tabs section h1").click(function(){return $("article.tabs section").removeClass("active"),$(this).parent("section").addClass("active"),$("article.tabs section:not('.active') article").hide(),$("section.active article").fadeIn("fast"),!1})}catch(nt){}$("div.summary .slides-container").slick({slidesToShow:1,slidesToScroll:1,dots:!1,arrows:!1,infinite:!1,autoplay:!1,fade:!0});$("div.summary #thumbnails .image-slide:first-child").addClass("current");$("div.summary .slides-container").on("beforeChange",function(n,t,i,r){$("div.summary #thumbnails .image-slide").removeClass("current");$('div.summary #thumbnails .image-slide[data-slide-index="'+r+'"]').addClass("current")});$("div.summary #thumbnails .image-slide").click(function(){var n=$(this).data("slide-index");$("div.summary .slides-container").slick("slickGoTo",n)});$("#findStoreZip").change(function(n){n.preventDefault();var t=$("#findStoreZip").val();t.length>=3?$.ajax({type:"POST",url:"/assets/ajax/storeZipCode.aspx",data:{zip:t,url:window.location.href},success:function(n){n.length>60&&createCookie("searchZip",t,30);$("#storeList").html(n);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Located store lists opened<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}}):eraseCookie("searchZip")});$("#findStoreButton").click(function(n){n.preventDefault();var t=$("#findStoreZip").val();t.length>=3&&$.ajax({type:"POST",url:"/assets/ajax/storeZipCode.aspx",data:{zip:t,url:window.location.href},success:function(n){n.length>60&&createCookie("searchZip",t,30);$("#storeList").html(n);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Located store lists opened<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}})});$(".zipCodeLookup form").submit(function(n){n.preventDefault();var t=$("#findStoreZip").val();t.length>=3&&$.ajax({type:"POST",url:"/assets/ajax/storeZipCode.aspx",data:{zip:t,url:window.location.href},success:function(n){n.length>60&&createCookie("searchZip",t,30);$("#storeList").html(n);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Located store lists opened<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}})});$("#My-Store").click(function(n){n.preventDefault();$("#storeInfo").show();$("#storeInfo .dropdown-menu ").hide();escapeTarget=$("#My-Store");$("#Aria-Announcements").html('<div aria-live="polite" role="alert">My store info dialog opening.<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3);$("#storeInfo .closeModal").focus()});$("#storeInfo .closeModal").click(function(){return $("#storeInfo").removeClass("show"),$("#storeInfo").removeClass("forceopen"),$("#storeInfo").hide(),$("#storeInfo .dropdown-menu ").hide(),$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Store info closed.<\/div>'),window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3),!1});$("#hypSignInWrapper").click(function(n){$("#storeInfo").hide();$("#storeInfo").removeClass("show");$("#storeInfo").removeClass("forceopen");n.preventDefault();$("#accountOptions").show();escapeTarget=$(document.activeElement);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">My account info dialog opening.<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3);$("#accountOptions .closeModal").focus()});$("#hypMyAccount").click(function(n){n.preventDefault();$("#accountOptions").show();escapeTarget=$(document.activeElement);$("#Aria-Announcements").html('<div aria-live="polite" role="alert">My account info dialog opening.<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3);$("#accountOptions .closeModal").focus()});$("#accountOptions .closeModal").click(function(){return $("#accountOptions").hide(),$("#Aria-Announcements").html('<div aria-live="polite" role="alert">My account info dialog closed.<\/div>'),window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3),!1});hasTouch||window.navigator.msPointerEnabled||($("#product div.slides-container a .productImageZoom").hover(function(){$(this).parent().append($("<p class='icons zoom replace'>Zoom<\/p>"))},function(){$(this).parent().find("p.zoom").remove()}),$(".hypMyAccountModal").hoverIntent({over:function(){$("#storeInfo").hide();$("#storeInfo").removeClass("show");$("#storeInfo").removeClass("forceopen");$("#accountOptions").show()},out:function(){$("#accountOptions").hide()},timeout:300}),$(".myStore").hoverIntent({over:function(){$("#storeInfo").show()},out:function(){$("#storeInfo").hide();$("#storeInfo .dropdown-menu ").hide()},timeout:300}));try{$("#careproduct div.summary").slides({preload:!0,preloadImage:"/assets/images/loading.gif",effect:"fade",crossfade:!0,slideSpeed:350,fadeSpeed:300,generateNextPrev:!1,generatePagination:!1})}catch(nt){}$("#careproduct div.slides-container a").hover(function(){$(this).append($("<p class='icons zoom replace'>Zoom<\/p>"))},function(){$(this).find("p.zoom").remove()});$("#fader").fadeIn("fast");try{$("#fader").orbit({animation:"fade",animationSpeed:1e3,timer:!0,advanceSpeed:5e3,pauseOnHover:!0,startClockOnMouseOut:!0,startClockOnMouseOutAfter:100,directionalNav:!1,captions:!1,captionAnimation:"fade",captionAnimationSpeed:800,bullets:!1,bulletThumbs:!1,bulletThumbLocation:"",afterSlideChange:function(){}})}catch(nt){}try{$(".specialOptions").fancybox({baseClass:"fancyOptions",width:800,height:640,idleTime:!1,transitionIn:"elastic",transitionOut:"fade",type:"iframe",buttons:["close"],afterShow:function(){$(".fancybox-button--close").focus()}})}catch(nt){}try{$(".fancyPhotos").fancybox({opacity:!0,overlayShow:!1,hideOnContentClick:!1,transitionIn:"fade",transitionOut:"fade",scrolling:"no",padding:20,width:500,"min-width":320,height:500,"min-height":320,overlayColor:"#F0F0F0",titleShow:!1,type:"iframe",idleTime:!1,iframe:{scrolling:"no",preload:!1},aspectRatio:!0,afterLoad:function(n,t){$(".fancybox-button--close").focus();t.src.indexOf("youtube.com")>0&&t.$slide.addClass("fancybox-slide--video")}})}catch(nt){}try{$(".fancyVideo").fancybox({opacity:!0,overlayShow:!1,hideOnContentClick:!1,transitionIn:"fade",transitionOut:"fade",scrolling:"no",padding:20,width:1e3,"min-width":320,height:1e3,"min-height":320,arrows:!1,infobar:!1,overlayColor:"#F0F0F0",titleShow:!1,idleTime:!1,aspectRatio:!0,afterShow:function(){$(".fancybox-button--close").focus()}})}catch(nt){}try{$(".fancyPhotosMobile").fancybox({opacity:!0,overlayShow:!1,hideOnContentClick:!1,transitionIn:"fade",transitionOut:"fade",scrolling:"no",padding:20,width:500,"min-width":320,height:500,"min-height":320,overlayColor:"#F0F0F0",titleShow:!1,idleTime:!1,aspectRatio:!0,afterLoad:function(n,t){$(".fancybox-button--close").focus();t.src.indexOf("youtube.com")>0&&t.$slide.addClass("fancybox-slide--video")}})}catch(nt){}$(".productImageZoom").click(function(){$(".zm-viewer.followViewerConfig").css("display","none")});$("#tech a").attr("target","_blank");try{$(".bio-modal").fancybox({width:830,height:"95%",autoScale:!1,transitionIn:"elastic",transitionOut:"fade",type:"iframe",idleTime:!1,baseClass:"fbModalBio",afterShow:function(){$(".fancybox-button--close").focus()}})}catch(nt){}setModalLogin();setServiceButton();try{$(".pop-modal").fancybox({width:830,height:"95%",autoScale:!1,transitionIn:"elastic",transitionOut:"fade",type:"iframe",idleTime:!1,afterShow:function(){$(".fancybox-button--close").focus()}})}catch(nt){}try{$(".pop-modal16x9").fancybox({width:"95%",fitToView:!0,height:"53%",autoScale:!1,transitionIn:"elastic",transitionOut:"fade",type:"iframe",idleTime:!1,baseClass:"modal16X9",caption:'<a href="/site/customer-support/terms-conditions-site.aspx#tours" class="virtualDisclaimer">Product prices shown on the virtual tour are subject to change and may not be the current product price. <\/a>',afterShow:function(){$(".fancybox-button--close").focus()}})}catch(nt){}try{$(".sms-modal").fancybox({maxWidth:440,maxHeight:560,fitToView:!1,width:"88%",height:560,autoSize:!1,closeClick:!1,openEffect:"none",closeEffect:"none",controls:0,showinfo:0,autoDimensions:!1,scrolling:"no",padding:0,type:"iframe",arrows:!1,infobar:!1,buttons:["close"],idleTime:!1,iframe:{scrolling:"no",preload:!0},afterShow:function(){$(".fancybox-button--close").focus()}})}catch(nt){}try{$("a.PlanDetailsLink").fancybox({width:"620px",height:"95%",autoScale:!1,titleShow:!1,transitionIn:"elastic",transitionOut:"fade",idleTime:!1,afterShow:function(){$(".fancybox-button--close").focus();$("#Aria-Announcements").html('<div aria-live="polite" role="alert">Protection Plan Information Opened<\/div>');window.setTimeout(function(){$("#Aria-Announcements").html("")},5e3)}})}catch(nt){}try{function tt(n,t){$.fancybox({autoDimensions:!1,width:1e3,height:"95%",autoScale:!1,transitionIn:"elastic",transitionOut:"fade",type:"iframe",idleTime:!1,href:"/endeca/compare.aspx?skuIDs="+t,afterShow:function(){$(".fancybox-button--close").focus()}})}}catch(nt){}ADAUpdates()});var serviceplantotal=0,addonstotal=0,servicestotal=0;setTimeout(function(){$("#home").length!=0?($("#pnlMainAds h2#tcb002").prependTo("#hotdeals"),$(".mm14-products-viewed-wrapper").each(function(){addSliderEvent($(this))})):$("#product").length!=0&&$(".recently-viewed-title").html("You recently viewed")},1e3);Header={setCartQty:function(n){$(".header2022 .cartQTY").html(n)}},function(n){function i(t){var i=t||window.event,e=[].slice.call(arguments,1),r=0,f=0,u=0;return t=n.event.fix(i),t.type="mousewheel",i.wheelDelta&&(r=i.wheelDelta/120),i.detail&&(r=-i.detail/3),u=r,i.axis!==undefined&&i.axis===i.HORIZONTAL_AXIS&&(u=0,f=-1*r),i.wheelDeltaY!==undefined&&(u=i.wheelDeltaY/120),i.wheelDeltaX!==undefined&&(f=i.wheelDeltaX/-120),e.unshift(t,r,f,u),(n.event.dispatch||n.event.handle).apply(this,e)}var t=["DOMMouseScroll","mousewheel"],r;if(n.event.fixHooks)for(r=t.length;r;)n.event.fixHooks[t[--r]]=n.event.mouseHooks;n.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var n=t.length;n;)this.addEventListener(t[--n],i,!1);else this.onmousewheel=i},teardown:function(){if(this.removeEventListener)for(var n=t.length;n;)this.removeEventListener(t[--n],i,!1);else this.onmousewheel=null}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})}(jQuery),function(n){var i={init:function(t){var i={set_width:!1,set_height:!1,horizontalScroll:!1,scrollInertia:950,mouseWheel:!0,mouseWheelPixels:"auto",autoDraggerLength:!0,autoHideScrollbar:!1,scrollButtons:{enable:!1,scrollType:"continuous",scrollSpeed:"auto",scrollAmount:40},advanced:{updateOnBrowserResize:!0,updateOnContentResize:!1,autoExpandHorizontalScroll:!1,autoScrollOnFocus:!0,normalizeMouseWheelDelta:!1},contentTouchScroll:!0,callbacks:{onScrollStart:function(){},onScroll:function(){},onTotalScroll:function(){},onTotalScrollBack:function(){},onTotalScrollOffset:0,onTotalScrollBackOffset:0,whileScrolling:function(){}},theme:"light"},t=n.extend(!0,i,t);return this.each(function(){var i=n(this),y,r,h,u,f,o,l,a,v,w,s;t.set_width&&i.css("width",t.set_width);t.set_height&&i.css("height",t.set_height);n(document).data("mCustomScrollbar-index")?(y=parseInt(n(document).data("mCustomScrollbar-index")),n(document).data("mCustomScrollbar-index",y+1)):n(document).data("mCustomScrollbar-index","1");i.wrapInner("<div class='mCustomScrollBox mCS-"+t.theme+"' id='mCSB_"+n(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+n(document).data("mCustomScrollbar-index"));r=i.children(".mCustomScrollBox");t.horizontalScroll?(r.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />"),h=r.children(".mCSB_h_wrapper"),h.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({width:h.children().outerWidth(),position:"relative"}).unwrap()):r.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />");u=r.children(".mCSB_container");n.support.touch&&u.addClass("mCS_touch");u.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'><\/div><\/div><div class='mCSB_draggerRail'><\/div><\/div><\/div>");var c=r.children(".mCSB_scrollTools"),p=c.children(".mCSB_draggerContainer"),e=p.children(".mCSB_dragger");t.horizontalScroll?e.data("minDraggerWidth",e.width()):e.data("minDraggerHeight",e.height());t.scrollButtons.enable&&(t.horizontalScroll?c.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'><\/a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'><\/a>"):c.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'><\/a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'><\/a>"));r.bind("scroll",function(){i.is(".mCS_disabled")||r.scrollTop(0).scrollLeft(0)});i.data({mCS_Init:!0,mCustomScrollbarIndex:n(document).data("mCustomScrollbar-index"),horizontalScroll:t.horizontalScroll,scrollInertia:t.scrollInertia,scrollEasing:"mcsEaseOut",mouseWheel:t.mouseWheel,mouseWheelPixels:t.mouseWheelPixels,autoDraggerLength:t.autoDraggerLength,autoHideScrollbar:t.autoHideScrollbar,scrollButtons_enable:t.scrollButtons.enable,scrollButtons_scrollType:t.scrollButtons.scrollType,scrollButtons_scrollSpeed:t.scrollButtons.scrollSpeed,scrollButtons_scrollAmount:t.scrollButtons.scrollAmount,autoExpandHorizontalScroll:t.advanced.autoExpandHorizontalScroll,autoScrollOnFocus:t.advanced.autoScrollOnFocus,normalizeMouseWheelDelta:t.advanced.normalizeMouseWheelDelta,contentTouchScroll:t.contentTouchScroll,onScrollStart_Callback:t.callbacks.onScrollStart,onScroll_Callback:t.callbacks.onScroll,onTotalScroll_Callback:t.callbacks.onTotalScroll,onTotalScrollBack_Callback:t.callbacks.onTotalScrollBack,onTotalScroll_Offset:t.callbacks.onTotalScrollOffset,onTotalScrollBack_Offset:t.callbacks.onTotalScrollBackOffset,whileScrolling_Callback:t.callbacks.whileScrolling,bindEvent_scrollbar_drag:!1,bindEvent_content_touch:!1,bindEvent_scrollbar_click:!1,bindEvent_mousewheel:!1,bindEvent_buttonsContinuous_y:!1,bindEvent_buttonsContinuous_x:!1,bindEvent_buttonsPixels_y:!1,bindEvent_buttonsPixels_x:!1,bindEvent_focusin:!1,bindEvent_autoHideScrollbar:!1,mCSB_buttonScrollRight:!1,mCSB_buttonScrollLeft:!1,mCSB_buttonScrollDown:!1,mCSB_buttonScrollUp:!1});t.horizontalScroll?i.css("max-width")!=="none"&&(t.advanced.updateOnContentResize||(t.advanced.updateOnContentResize=!0)):i.css("max-height")!=="none"&&(f=!1,o=parseInt(i.css("max-height")),i.css("max-height").indexOf("%")>=0&&(f=o,o=i.parent().height()*f/100),i.css("overflow","hidden"),r.css("max-height",o));i.mCustomScrollbar("update");t.advanced.updateOnBrowserResize&&(a=n(window).width(),v=n(window).height(),n(window).bind("resize."+i.data("mCustomScrollbarIndex"),function(){l&&clearTimeout(l);l=setTimeout(function(){if(!i.is(".mCS_disabled")&&!i.is(".mCS_destroyed")){var t=n(window).width(),u=n(window).height();(a!==t||v!==u)&&(i.css("max-height")!=="none"&&f&&r.css("max-height",i.parent().height()*f/100),i.mCustomScrollbar("update"),a=t,v=u)}},150)}));t.advanced.updateOnContentResize&&(s=t.horizontalScroll?u.outerWidth():u.outerHeight(),w=setInterval(function(){var n;t.horizontalScroll?(t.advanced.autoExpandHorizontalScroll&&u.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:u.outerWidth(),position:"relative"}).unwrap(),n=u.outerWidth()):n=u.outerHeight();n!=s&&(i.mCustomScrollbar("update"),s=n)},300))})},update:function(){var i=n(this),u=i.children(".mCustomScrollBox"),r=u.children(".mCSB_container"),l,o,a,b,it,rt,c,v,k,ut,ft,s,h;r.removeClass("mCS_no_scrollbar");i.removeClass("mCS_disabled mCS_destroyed");u.scrollTop(0).scrollLeft(0);var f=u.children(".mCSB_scrollTools"),e=f.children(".mCSB_draggerContainer"),t=e.children(".mCSB_dragger");if(i.data("horizontalScroll")){var d=f.children(".mCSB_buttonLeft"),g=f.children(".mCSB_buttonRight"),y=u.width();i.data("autoExpandHorizontalScroll")&&r.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:r.outerWidth(),position:"relative"}).unwrap();l=r.outerWidth()}else var nt=f.children(".mCSB_buttonUp"),tt=f.children(".mCSB_buttonDown"),p=u.height(),w=r.outerHeight();w>p&&!i.data("horizontalScroll")?(f.css("display","block"),o=e.height(),i.data("autoDraggerLength")&&(a=Math.round(p/w*o),b=t.data("minDraggerHeight"),a<=b?t.css({height:b}):a>=o-10?(it=o-10,t.css({height:it})):t.css({height:a}),t.children(".mCSB_dragger_bar").css({"line-height":t.height()+"px"})),rt=t.height(),s=(w-p)/(o-rt),i.data("scrollAmount",s).mCustomScrollbar("scrolling",u,r,e,t,nt,tt,d,g),h=Math.abs(r.position().top),i.mCustomScrollbar("scrollTo",h,{scrollInertia:0,trigger:"internal"})):l>y&&i.data("horizontalScroll")?(f.css("display","block"),c=e.width(),i.data("autoDraggerLength")&&(v=Math.round(y/l*c),k=t.data("minDraggerWidth"),v<=k?t.css({width:k}):v>=c-10?(ut=c-10,t.css({width:ut})):t.css({width:v})),ft=t.width(),s=(l-y)/(c-ft),i.data("scrollAmount",s).mCustomScrollbar("scrolling",u,r,e,t,nt,tt,d,g),h=Math.abs(r.position().left),i.mCustomScrollbar("scrollTo",h,{scrollInertia:0,trigger:"internal"})):(u.unbind("mousewheel focusin"),i.data("horizontalScroll")?t.add(r).css("left",0):t.add(r).css("top",0),f.css("display","none"),r.addClass("mCS_no_scrollbar"),i.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1}))},scrolling:function(i,r,u,f,e,o,s,h){function tt(n,t,i,r){c.data("horizontalScroll")?c.mCustomScrollbar("scrollTo",f.position().left-t+r,{moveDragger:!0,trigger:"internal"}):c.mCustomScrollbar("scrollTo",f.position().top-n+i,{moveDragger:!0,trigger:"internal"})}var c=n(this),v,y,l,p,a,w,b,it,rt,d,g,ut,ft;if(c.data("bindEvent_scrollbar_drag")||(n.support.msPointer?(f.bind("MSPointerDown",function(t){t.preventDefault();c.data({on_drag:!0});f.addClass("mCSB_dragger_onDrag");var i=n(this),e=i.offset(),r=t.originalEvent.pageX-e.left,u=t.originalEvent.pageY-e.top;r<i.width()&&r>0&&u<i.height()&&u>0&&(v=u,y=r)}),n(document).bind("MSPointerMove."+c.data("mCustomScrollbarIndex"),function(n){if(n.preventDefault(),c.data("on_drag")){var i=f,t=i.offset(),r=n.originalEvent.pageX-t.left,u=n.originalEvent.pageY-t.top;tt(v,y,u,r)}}).bind("MSPointerUp."+c.data("mCustomScrollbarIndex"),function(){c.data({on_drag:!1});f.removeClass("mCSB_dragger_onDrag")})):(f.bind("mousedown touchstart",function(t){var e,i,r,u,o;t.preventDefault();t.stopImmediatePropagation();e=n(this);i=e.offset();t.type==="touchstart"?(o=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=o.pageX-i.left,u=o.pageY-i.top):(c.data({on_drag:!0}),f.addClass("mCSB_dragger_onDrag"),r=t.pageX-i.left,u=t.pageY-i.top);r<e.width()&&r>0&&u<e.height()&&u>0&&(v=u,y=r)}).bind("touchmove",function(t){t.preventDefault();t.stopImmediatePropagation();var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],u=n(this),r=u.offset(),f=i.pageX-r.left,e=i.pageY-r.top;tt(v,y,e,f)}),n(document).bind("mousemove."+c.data("mCustomScrollbarIndex"),function(n){if(c.data("on_drag")){var i=f,t=i.offset(),r=n.pageX-t.left,u=n.pageY-t.top;tt(v,y,u,r)}}).bind("mouseup."+c.data("mCustomScrollbarIndex"),function(){c.data({on_drag:!1});f.removeClass("mCSB_dragger_onDrag")})),c.data({bindEvent_scrollbar_drag:!0})),n.support.touch&&c.data("contentTouchScroll")&&(c.data("bindEvent_content_touch")||(r.bind("touchstart",function(t){t.stopImmediatePropagation();l=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];p=n(this);a=p.offset();b=l.pageX-a.left;w=l.pageY-a.top;it=w;rt=b}),r.bind("touchmove",function(t){t.preventDefault();t.stopImmediatePropagation();l=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];p=n(this).parent();a=p.offset();b=l.pageX-a.left;w=l.pageY-a.top;c.data("horizontalScroll")?c.mCustomScrollbar("scrollTo",rt-b,{trigger:"internal"}):c.mCustomScrollbar("scrollTo",it-w,{trigger:"internal"})}))),c.data("bindEvent_scrollbar_click")||(u.bind("click",function(t){var i=(t.pageY-u.offset().top)*c.data("scrollAmount"),r=n(t.target);c.data("horizontalScroll")&&(i=(t.pageX-u.offset().left)*c.data("scrollAmount"));(r.hasClass("mCSB_draggerContainer")||r.hasClass("mCSB_draggerRail"))&&c.mCustomScrollbar("scrollTo",i,{trigger:"internal",scrollEasing:"draggerRailEase"})}),c.data({bindEvent_scrollbar_click:!0})),c.data("mouseWheel")&&(c.data("bindEvent_mousewheel")||(i.bind("mousewheel",function(n,t){var o,i=c.data("mouseWheelPixels"),s=Math.abs(r.position().top),e=f.position().top,h=u.height()-f.height();c.data("normalizeMouseWheelDelta")&&(t=t<0?-1:1);i==="auto"&&(i=100+Math.round(c.data("scrollAmount")/2));c.data("horizontalScroll")&&(e=f.position().left,h=u.width()-f.width(),s=Math.abs(r.position().left));(t>0&&e!==0||t<0&&e!==h)&&(n.preventDefault(),n.stopImmediatePropagation());o=s-t*i;c.mCustomScrollbar("scrollTo",o,{trigger:"internal"})}),c.data({bindEvent_mousewheel:!0}))),c.data("scrollButtons_enable"))if(c.data("scrollButtons_scrollType")==="pixels"){c.data("horizontalScroll")?(h.add(s).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",d,g),c.data({bindEvent_buttonsContinuous_x:!1}),c.data("bindEvent_buttonsPixels_x")||(h.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().left)+c.data("scrollButtons_scrollAmount"))}),s.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().left)-c.data("scrollButtons_scrollAmount"))}),c.data({bindEvent_buttonsPixels_x:!0}))):(o.add(e).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",d,g),c.data({bindEvent_buttonsContinuous_y:!1}),c.data("bindEvent_buttonsPixels_y")||(o.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().top)+c.data("scrollButtons_scrollAmount"))}),e.bind("click",function(n){n.preventDefault();k(Math.abs(r.position().top)-c.data("scrollButtons_scrollAmount"))}),c.data({bindEvent_buttonsPixels_y:!0})));function k(n){f.data("preventAction")||(f.data("preventAction",!0),c.mCustomScrollbar("scrollTo",n,{trigger:"internal"}))}}else{c.data("horizontalScroll")?(h.add(s).unbind("click"),c.data({bindEvent_buttonsPixels_x:!1}),c.data("bindEvent_buttonsContinuous_x")||(h.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=nt();c.data({mCSB_buttonScrollRight:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().left)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})}),d=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollRight"))},h.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",d),s.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=nt();c.data({mCSB_buttonScrollLeft:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().left)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})}),g=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollLeft"))},s.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",g),c.data({bindEvent_buttonsContinuous_x:!0}))):(o.add(e).unbind("click"),c.data({bindEvent_buttonsPixels_y:!1}),c.data("bindEvent_buttonsContinuous_y")||(o.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=nt();c.data({mCSB_buttonScrollDown:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().top)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})}),ut=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollDown"))},o.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",ut),e.bind("mousedown touchstart MSPointerDown",function(n){n.preventDefault();var t=nt();c.data({mCSB_buttonScrollUp:setInterval(function(){c.mCustomScrollbar("scrollTo",Math.abs(r.position().top)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})}),ft=function(n){n.preventDefault();clearInterval(c.data("mCSB_buttonScrollUp"))},e.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",ft),c.data({bindEvent_buttonsContinuous_y:!0})));function nt(){var n=c.data("scrollButtons_scrollSpeed");return c.data("scrollButtons_scrollSpeed")==="auto"&&(n=Math.round((c.data("scrollInertia")+100)/40)),n}}c.data("autoScrollOnFocus")&&(c.data("bindEvent_focusin")||(i.bind("focusin",function(){var t;if(i.scrollTop(0).scrollLeft(0),t=n(document.activeElement),t.is("input,textarea,select,button,a[tabindex],area,object")){var f=r.position().top,u=t.position().top,e=i.height()-t.outerHeight();c.data("horizontalScroll")&&(f=r.position().left,u=t.position().left,e=i.width()-t.outerWidth());(f+u<0||f+u>e)&&c.mCustomScrollbar("scrollTo",u,{trigger:"internal"})}}),c.data({bindEvent_focusin:!0})));c.data("autoHideScrollbar")&&(c.data("bindEvent_autoHideScrollbar")||(i.bind("mouseenter",function(){i.addClass("mCS-mouse-over");t.showScrollbar.call(i.children(".mCSB_scrollTools"))}).bind("mouseleave touchend",function(n){i.removeClass("mCS-mouse-over");n.type==="mouseleave"&&t.hideScrollbar.call(i.children(".mCSB_scrollTools"))}),c.data({bindEvent_autoHideScrollbar:!0})))},scrollTo:function(i,r){function h(n){this.mcs={top:f.position().top,left:f.position().left,draggerTop:s.position().top,draggerLeft:s.position().left,topPct:Math.round(100*Math.abs(f.position().top)/Math.abs(f.outerHeight()-o.height())),leftPct:Math.round(100*Math.abs(f.position().left)/Math.abs(f.outerWidth()-o.width()))};switch(n){case"onScrollStart":u.data("mCS_tweenRunning",!0).data("onScrollStart_Callback").call(u,this.mcs);break;case"whileScrolling":u.data("whileScrolling_Callback").call(u,this.mcs);break;case"onScroll":u.data("onScroll_Callback").call(u,this.mcs);break;case"onTotalScrollBack":u.data("onTotalScrollBack_Callback").call(u,this.mcs);break;case"onTotalScroll":u.data("onTotalScroll_Callback").call(u,this.mcs)}}var u=n(this),k={moveDragger:!1,trigger:"external",callbacks:!0,scrollInertia:u.data("scrollInertia"),scrollEasing:u.data("scrollEasing")},r=n.extend(k,r),e,o=u.children(".mCustomScrollBox"),f=o.children(".mCSB_container"),a=o.children(".mCSB_scrollTools"),v=a.children(".mCSB_draggerContainer"),s=v.children(".mCSB_dragger"),b=draggerSpeed=r.scrollInertia,p,c,w,l,y;f.hasClass("mCS_no_scrollbar")||(u.data({mCS_trigger:r.trigger}),u.data("mCS_Init")&&(r.callbacks=!1),(i||i===0)&&(typeof i=="number"?r.moveDragger?(e=i,i=u.data("horizontalScroll")?s.position().left*u.data("scrollAmount"):s.position().top*u.data("scrollAmount"),draggerSpeed=0):e=i/u.data("scrollAmount"):typeof i=="string"&&(y=i==="top"?0:i!=="bottom"||u.data("horizontalScroll")?i==="left"?0:i==="right"&&u.data("horizontalScroll")?f.outerWidth()-o.width():i==="first"?u.find(".mCSB_container").find(":first"):i==="last"?u.find(".mCSB_container").find(":last"):u.find(i):f.outerHeight()-o.height(),y.length===1?(i=u.data("horizontalScroll")?y.position().left:y.position().top,e=i/u.data("scrollAmount")):e=i=y),u.data("horizontalScroll")?(u.data("onTotalScrollBack_Offset")&&(c=-u.data("onTotalScrollBack_Offset")),u.data("onTotalScroll_Offset")&&(l=o.width()-f.outerWidth()+u.data("onTotalScroll_Offset")),e<0?(e=i=0,clearInterval(u.data("mCSB_buttonScrollLeft")),c||(p=!0)):e>=v.width()-s.width()?(e=v.width()-s.width(),i=o.width()-f.outerWidth(),clearInterval(u.data("mCSB_buttonScrollRight")),l||(w=!0)):i=-i,t.mTweenAxis.call(this,s[0],"left",Math.round(e),draggerSpeed,r.scrollEasing),t.mTweenAxis.call(this,f[0],"left",Math.round(i),b,r.scrollEasing,{onStart:function(){r.callbacks&&!u.data("mCS_tweenRunning")&&h("onScrollStart");u.data("autoHideScrollbar")&&t.showScrollbar.call(a)},onUpdate:function(){r.callbacks&&h("whileScrolling")},onComplete:function(){r.callbacks&&(h("onScroll"),(p||c&&f.position().left>=c)&&h("onTotalScrollBack"),(w||l&&f.position().left<=l)&&h("onTotalScroll"));s.data("preventAction",!1);u.data("mCS_tweenRunning",!1);u.data("autoHideScrollbar")&&(o.hasClass("mCS-mouse-over")||t.hideScrollbar.call(a))}})):(u.data("onTotalScrollBack_Offset")&&(c=-u.data("onTotalScrollBack_Offset")),u.data("onTotalScroll_Offset")&&(l=o.height()-f.outerHeight()+u.data("onTotalScroll_Offset")),e<0?(e=i=0,clearInterval(u.data("mCSB_buttonScrollUp")),c||(p=!0)):e>=v.height()-s.height()?(e=v.height()-s.height(),i=o.height()-f.outerHeight(),clearInterval(u.data("mCSB_buttonScrollDown")),l||(w=!0)):i=-i,t.mTweenAxis.call(this,s[0],"top",Math.round(e),draggerSpeed,r.scrollEasing),t.mTweenAxis.call(this,f[0],"top",Math.round(i),b,r.scrollEasing,{onStart:function(){r.callbacks&&!u.data("mCS_tweenRunning")&&h("onScrollStart");u.data("autoHideScrollbar")&&t.showScrollbar.call(a)},onUpdate:function(){r.callbacks&&h("whileScrolling")},onComplete:function(){r.callbacks&&(h("onScroll"),(p||c&&f.position().top>=c)&&h("onTotalScrollBack"),(w||l&&f.position().top<=l)&&h("onTotalScroll"));s.data("preventAction",!1);u.data("mCS_tweenRunning",!1);u.data("autoHideScrollbar")&&(o.hasClass("mCS-mouse-over")||t.hideScrollbar.call(a))}})),u.data("mCS_Init")&&u.data({mCS_Init:!1})))},stop:function(){var i=n(this),r=i.children().children(".mCSB_container"),u=i.children().children().children().children(".mCSB_dragger");t.mTweenAxisStop.call(this,r[0]);t.mTweenAxisStop.call(this,u[0])},disable:function(t){var r=n(this),u=r.children(".mCustomScrollBox"),i=u.children(".mCSB_container"),f=u.children(".mCSB_scrollTools"),e=f.children().children(".mCSB_dragger");u.unbind("mousewheel focusin mouseenter mouseleave touchend");i.unbind("touchstart touchmove");t&&(r.data("horizontalScroll")?e.add(i).css("left",0):e.add(i).css("top",0));f.css("display","none");i.addClass("mCS_no_scrollbar");r.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1,bindEvent_content_touch:!1,bindEvent_autoHideScrollbar:!1}).addClass("mCS_disabled")},destroy:function(){var t=n(this);t.removeClass("mCustomScrollbar _mCS_"+t.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove();n(document).unbind("mousemove."+t.data("mCustomScrollbarIndex")+" mouseup."+t.data("mCustomScrollbarIndex")+" MSPointerMove."+t.data("mCustomScrollbarIndex")+" MSPointerUp."+t.data("mCustomScrollbarIndex"));n(window).unbind("resize."+t.data("mCustomScrollbarIndex"))}},t={showScrollbar:function(){this.stop().animate({opacity:1},"fast")},hideScrollbar:function(){this.stop().animate({opacity:0},"fast")},mTweenAxis:function(n,t,i,r,u,f){function l(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()}function a(){e||y.call();e=l()-b;v();e>=n._time&&(n._time=e>n._time?e+o-(e-n._time):e+o-1,n._time<e+1&&(n._time=e+1));n._time<r?n._id=_request(a):w.call()}function v(){r>0?(n.currVal=g(n._time,s,c,r,u),h[t]=Math.round(n.currVal)+"px"):h[t]=i+"px";p.call()}function k(){o=1e3/60;n._time=e+o;_request=window.requestAnimationFrame?window.requestAnimationFrame:function(n){return v(),setTimeout(n,.01)};n._id=_request(a)}function d(){n._id!=null&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._id):clearTimeout(n._id),n._id=null)}function g(n,t,i,r,u){switch(u){case"linear":return i*n/r+t;case"easeOutQuad":return n/=r,-i*n*(n-2)+t;case"easeInOutQuad":return(n/=r/2,n<1)?i/2*n*n+t:(n--,-i/2*(n*(n-2)-1)+t);case"easeOutCubic":return n/=r,n--,i*(n*n*n+1)+t;case"easeOutQuart":return n/=r,n--,-i*(n*n*n*n-1)+t;case"easeOutQuint":return n/=r,n--,i*(n*n*n*n*n+1)+t;case"easeOutCirc":return n/=r,n--,i*Math.sqrt(1-n*n)+t;case"easeOutSine":return i*Math.sin(n/r*(Math.PI/2))+t;case"easeOutExpo":return i*(-Math.pow(2,-10*n/r)+1)+t;case"mcsEaseOut":var f=(n/=r)*n,e=f*n;return t+i*(.499999999999997*e*f+-2.5*f*f+5.5*e+-6.5*f+4*n);case"draggerRailEase":return(n/=r/2,n<1)?i/2*n*n*n+t:(n-=2,i/2*(n*n*n+2)+t)}}var f=f||{},y=f.onStart||function(){},p=f.onUpdate||function(){},w=f.onComplete||function(){},b=l(),o,e=0,s=n.offsetTop,h=n.style,c;t==="left"&&(s=n.offsetLeft);c=i-s;d();k()},mTweenAxisStop:function(n){n._id!=null&&(window.requestAnimationFrame?window.cancelAnimationFrame(n._id):clearTimeout(n._id),n._id=null)},rafPolyfill:function(){for(var n=["ms","moz","webkit","o"],t=n.length;--t>-1&&!window.requestAnimationFrame;)window.requestAnimationFrame=window[n[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[t]+"CancelAnimationFrame"]||window[n[t]+"CancelRequestAnimationFrame"]}},r;t.rafPolyfill.call();n.support.touch=!!("ontouchstart"in window);n.support.msPointer=window.navigator.msPointerEnabled;r="https:"==document.location.protocol?"https:":"http:";n.event.special.mousewheel||document.write('<script src="'+r+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>');n.fn.mCustomScrollbar=function(t){if(i[t])return i[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t!="object"&&t)n.error("Method "+t+" does not exist");else return i.init.apply(this,arguments)}}(jQuery),function(n){n.fn.shuffle=function(){var t=this.get(),r=function(n){return Math.floor(Math.random()*n)},i=n.map(t,function(){var i=r(t.length),u=n(t[i]).clone(!0)[0];return t.splice(i,1),u});return this.each(function(t){n(this).replaceWith(n(i[t]))}),n(i)}}(jQuery)