window.initQueue.push(function(a){var b=!1,d=!1,c=navigator.userAgent;0<=c.indexOf("Android")&&2.3>=parseFloat(c.slice(c.indexOf("Android")+8))&&(b=!0);/iP(hone|od|ad)/.test(navigator.platform)&&(c=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),4>=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||0,10)][0]&&(d=!0));var e={init:function(){function c(){var c;return{type:"ajax",alignTop:!0,overflowY:"scroll",mainClass:"my-mfp-zoom-in",removalDelay:160,fixedContentPos:e,callbacks:{open:function(){a("body").css("overflow",
"hidden")},close:function(){a("body").css("overflow","");c&&c.destroy()},parseAjax:function(a){a.data="\x3cdiv class\x3d'modal-content'\x3e"+a.data+"\x3c/div\x3e"},ajaxContentAdded:function(){var b=a(this.content).find(".accordion");b.length&&(c=new Foundation.Accordion(b));return this.content}}}}var e=!0;if(b||d)e=!1;a(".js-ajax-modal").magnificPopup(c());var f=c();f.callbacks.ajaxContentAdded=function(){a(this.content).find("a").attr("target","_blank");return this.content};a(".js-help-modal").magnificPopup(f);
f=a.extend({},f);f.mainClass+=" warranty-help";a(".js-warranty-modal").magnificPopup(f);a(".js-inline-modal").magnificPopup({type:"inline",midClick:!0,removalDelay:160,fixedContentPos:e,mainClass:"my-mfp-zoom-in",callbacks:{open:function(){a("body").css("overflow","hidden")},close:function(){a("body").css("overflow","")}}});a(".js-iframe-modal").magnificPopup({type:"iframe",disableOn:700,removalDelay:160,fixedContentPos:e,preloader:!1,mainClass:"my-mfp-zoom-in",callbacks:{open:function(){a("body").css("overflow",
"hidden")},close:function(){a("body").css("overflow","")}}})}};var g={affix:function(){a("body").scrollspy({target:".js-affixed"});a(".js-affixed").affix({offset:{top:function(){return a("[data-affix]:first").offset().top-60}}}).on("affixed.bs.affix",function(){var c=a(this),b=c.outerHeight(!0);c.next().css("margin-top",b)}).on("affixed-top.bs.affix",function(){a(this).next().css("margin-top",0)})},categoryView:function(){function c(c){c.hasClass("is-active")||(c.addClass("is-active"),c.siblings(".js-grid-view").removeClass("is-active"),
a(".product-list").removeClass("grid").addClass("list"))}function b(c){c.hasClass("is-active")||(c.addClass("is-active"),c.siblings(".js-list-view").removeClass("is-active"),a(".product-list").removeClass("list").addClass("grid"))}if(!a(document.body).hasClass("search-page")){var d={path:"/",expires:365,domain:window.location.hostname.replace(/^(www|products)/,"")};a(".js-grid-view").on("click",function(c){c.preventDefault();b(a(this));a.cookie("gridMode","1",d)});a(".js-list-view").on("click",function(b){b.preventDefault();
c(a(this));a.cookie("gridMode","0",d)});a(window).on("changed.zf.mediaquery",function(d,e,f){"small"==e?c(a(".js-list-view")):"1"===a.cookie("gridMode")&&b(a(".js-grid-view"))})}}};var f={enable:function(){var c=a(".js-accordion-block"),b=a(".js-accordion-trigger a");a(".js-accordion").addClass("product-information-accordion");c.not(".is-open").hide();b.on("click",function(d){d.preventDefault();d=a(this);var e=a(this).parent().next();d.parent().hasClass("is-open")?(b.parent().removeClass("is-open"),
c.removeClass("is-open").slideUp(300)):(b.parent().removeClass("is-open"),d.parent().addClass("is-open"),c.parent().find(".js-accordion-block.is-open").removeClass("is-open").slideUp(300),e.addClass("is-open").slideDown(300,function(){a("body, html").animate({scrollTop:a(this).offset().top-60},300)}))})},disable:function(){a(".js-accordion").removeClass("product-information-accordion");a(".js-accordion-block").show();a(".js-accordion-trigger a").off("click")},small:function(){return!Foundation.MediaQuery.atLeast("medium")},
enabled:function(){return a(".js-accordion").hasClass("product-information-accordion")},init:function(){f.small()&&f.enable();a(window).on("resize",Foundation.util.throttle(function(a){f.small()?f.enabled()||f.enable():f.enabled()&&f.disable()}))}};a(document).on("reload.nlg",function(){e.init()});a(document).ready(function(){e.init();f.init();g.affix();g.categoryView()})});window.initQueue.push(function(a){a(document).on("click","a.thawte",function(a){var b=window.open(this.href,"THAWTE_Splash","location,status,resizable,scrollbars,width\x3d516,height\x3d500");b&&(a.preventDefault(),b.focus())});a(document).on("click","a[data-expand-target]",function(b){var d=a(this),c=d.data("expand-target"),e=a(c);b.preventDefault();e.hasClass("js-loaded")?e.toggle():e.html("\x3cp\x3eLoading...\x3c/p\x3e").show().load(d.data("expand-href"),function(a,c){"error"===c?e.hide():e.addClass("js-loaded")})});
a(document).on("click","a[data-scroll-target]",function(b){var d=a(this).data("scroll-target");d=a(d);var c=d.data("expand-target");c=a(c);b.preventDefault();c.hasClass("js-loaded")||d.click();a("body, html").animate({scrollTop:d.offset().top},300)});a(document).on("click","#js-add-to-cart__dropdown-close",function(b){a("#js-add-to-cart-dropdown").foundation("close")});a(document).on("click",".js-close-add-notification",function(b){a("#js-add-to-cart-dropdown").foundation("close")});a.fn.truncated=
function(b){b=a.extend({max_length:10,margin:3,more:"More...",less:"Less...",button:""},b);return this.each(function(){var d=a(this),c=d.find("li");c.length>=b.max_length+b.margin&&(c.each(function(c){var d=a(this);c>=b.max_length&&d.addClass("is-hidden was-hidden")}),d.append('\x3cli\x3e\x3ca href\x3d"#"  data-less\x3d"'+b.less+'" data-more\x3d"'+b.more+'" data-action\x3d"show" class\x3d"js-truncated-show-more '+b.button+'"\x3e'+b.more+"\x3c/a\x3e\x3c/li\x3e"))})};a(document.body).on("click touch",
".js-print-page-btn",function(a){a.preventDefault();print()})});
window.initQueue.push(function(a){a.nlg.nextPageActions={reqCookieName:"nlg-next-page-requests",updateCookie:function(b){try{a.cookie.json=!0;var d=a.cookie(this.reqCookieName);void 0!==d&&a.cookie.set(d.push(b));a.cookie(this.reqCookieName,[b],{path:"/"})}catch(c){console.error(c)}finally{a.cookie.json=!1}},makeRequests:function(){try{a.cookie.json=!0;var b=a.cookie(this.reqCookieName);void 0!==b&&(a.each(b,function(d,c){"post"===c.method?a.post(c.url,c.data||null,c.callback||null):"get"===c.method?
a.get(c.url,c.data||null,c.callback||null):console.debug("Invalid method: "+c.method,c,b)}),a.removeCookie(this.reqCookieName,{path:"/"}))}catch(d){console.error(d)}finally{a.cookie.json=!1}},init:function(){this.makeRequests()}};a.nlg.nextPageActions.init()});
window.readyQueue.push(function(a){var b=new Image;a(".js-truncated").on("click",".js-truncated-show-more",function(b){b.preventDefault();b=a(this);var c=b.parents("ul").find("li.was-hidden");"show"==b.data("action")?(c.removeClass("is-hidden"),b.text(b.data("less")),b.data("action","hide")):(c.addClass("is-hidden"),b.text(b.data("more")),b.data("action","show"))});setTimeout(function(){window.ga&&window.ga.loaded||(b.src="/empty.gif")},5E3);(function(){var b=a("#reveal-mobile-menu"),c=b.find(".is-drilldown").first();
b.on("change",".mobile-menu-collapsing \x3e .toggle",function(a){a=b.find("ul.is-active").last().height();c.css("height",a)});b.on("open.zf.drilldown hide.zf.drilldown",function(a){setTimeout(function(){b.find(".is-active.is-closing").removeClass("is-active").removeClass("is-closing");b.scrollTop(0);var a=b.find("ul.is-active").last().height(),d=b.find(".vertical.menu").find(".is-active");c.css("height",a);0<d.length?d.first().parent().siblings('[role\x3d"menuitem"]').hide():(c.find('[role\x3d"menuitem"]').show(),
c.css("height","auto"))},0)})})()});window.initQueue.push(function(a){a.nlg.Page=function(){};a.nlg.Page.prototype={parseCookie:function(){var b=null;a.cookie.raw=!0;var d=a.cookie("cart2");a.cookie.raw=!1;d&&(b={n:"0",m:"$0.00"},a.each(d.split("\x26"),function(a,d){a=d.split("\x3d");b[a[0]]=decodeURIComponent(a[1]||"")}),d.u&&!d.f&&(d.f=d.replace(/ .*/,"")));return b},displayError:function(b){a.magnificPopup.open({items:{src:b,type:"inline",mainClass:"my-mfp-zoom-in"},closeBtnInside:!0})},isJson:function(a){var b=a.responseText;a=
a.getResponseHeader?a.getResponseHeader("Content-Type"):b&&"{"===b[0]?"application/json":"text/html";return/\bjson\b/i.test(a)},updateCartHeader:function(){var b=this.parseCookie();b&&b.f?(a(".header__username-text").text("Hi, "+b.f),a(".js-mynl-sign-out").removeClass("hide"),a(".js-myNL-target").addClass("disabled"),a(".js-mynl-signed-in").removeClass("hide"),a(".js-mynl-sign-in").addClass("hide")):(a(".mynl__placeholder").addClass("hide"),a(".header__username-text").text("account"),document.getElementsByClassName&&
a(".js-myNL-target").removeClass("disabled"),a(".js-mynl-signed-in").addClass("hide"),a(".js-mynl-sign-in").removeClass("hide"));if(b&&b.n){var d=Number(b.n);a("span.items").text(d);d&&a("span.cart-count").removeClass("hide-for-medium-down").text(d)}var c=a("header").hasClass("xmas-header")?"Xmas wishlist":"Your wishlist";b&&b.w&&(d=Number(b.w))&&(c="Wishlist ("+d+")");a(".js-wishlist-header").text(c)},subscribeToNewsletter:function(b,d){var c=b.find("input:visible"),e=b.find("button");e.prop("disabled",
!0).addClass("-disabled");b.find("small.error").remove();c.parent().removeClass("error");null==a.cookie("hasSubscribed")&&a.cookie("hasSubscribed","1",{path:"/"});a.ajax({url:"/shop/ajax-newsletter.ep",data:b.serialize(),method:"POST",dataType:"json"}).done(function(g){"OK"===g.status?(b.addClass("-successful"),dataLayer.push({event:"Newsletter Subscription",eventValue:d})):(e.prop("disabled",!1).removeClass("-disabled"),c.parent().addClass("error"),a("\x3csmall class\x3derror/\x3e").text(g.error||
"Sorry, an error occurred.").insertAfter(c))})}};a.nlg.page=new a.nlg.Page;a.nlg.ready("page").fire(a.nlg.page);a.elementReady(".header").done(function(b){a.nlg.page.updateCartHeader();a(".js-myNL-target").on("click",function(b){var c=a(b.currentTarget);c.hasClass("disabled")&&(b.stopPropagation(),location.href=c.data("href"))})})});window.initQueue.push(function(a){var b=window.log.getLogger("ga"),d=function(){};d.prototype.addGiftCard=function(a){this.addToCart("Gift Card Page","Add Gift Card",[{id:a,name:"Gift Card",price:a.match(/\d+/)[0],quantity:"1"}])};d.prototype.addEssentialExtra=function(a,b){this.addToCart("Product Page","Essential Extras",this.googleAnalyticsTrackingList(a))};d.prototype.addMainProduct=function(a){this.addToCart("Product Page","Add Hero Product",this.googleAnalyticsTracking(a))};d.prototype.addDynamicBundleProduct=
function(a){this.addToCart("Product Page","Add Dynamic Bundle Product",this.googleAnalyticsTracking(a))};d.prototype.addFromStockLevelPopup=function(a){this.addToCart("Product Page","Store Availability",this.googleAnalyticsTracking(a))};d.prototype.addAddons=function(a,b){this.addToCart("Product Page",b,[{id:a.skuCode,name:a.name,price:a.price,quantity:"1"}])};d.prototype.addFromCategoryPage=function(c,b){var d="Category Page";c=c.hasClass("is-in-modal")?"Category List Quick View":c.hasClass("category__products-apple")?
"Apple Category List":"Category List";a(document.body).hasClass("search-page")&&(c="Search List",d="Search Page");this.addToCart(d,c,this.googleAnalyticsTrackingList(b))};d.prototype.addFromSearchCategoryPage=function(a){this.addToCart("Search Page","Search List",[{id:a.skuCode,name:a.name,price:a.price,category:a.category,brand:a.brand,position:a.position,quantity:"1"}])};d.prototype.addFromLandingPage=function(a,b){location.pathname.replace("/","").indexOf("shop");this.addToCart("Landing Page",
b?"Product Slider":"Masonry Tiles",[{id:a.skuCode,name:a.productName,price:a.price,position:a.position,category:a.category,brand:a.brand,quantity:"1"}])};d.prototype.addFromWishlist=function(a,b){this.addToCart("Wishlist",b?"Shared-Wishlist":"Wishlist",this.googleAnalyticsTrackingList(a))};d.prototype.wishlistFromCategoryPage=function(a){dataLayer.push({event:"add-to-wishlist-categoryPage",eventLabel:a})};d.prototype.addToCart=function(a,d,g){b.debug("ec:",a,"/",d,":",g);a={event:"addToCart",eventCategory:a,
eventAction:d,productSku:g[0].id,ecommerce:{currencyCode:"NZD",add:{products:g}}};/^Add/.test(d)||(a.eventAction="Add From "+d,a.ecommerce.add.actionField={list:d});dataLayer.push(a)};d.prototype.googleAnalyticsTracking=function(a){var b=[];b.push({id:a.skuCode,name:a.productName,brand:a.productBrand,category:a.productCategory,price:a.price,quantity:"1"});return b};d.prototype.googleAnalyticsTrackingList=function(a){return[{id:a.skuCode,name:a.productName,brand:a.productBrand,category:a.productCategory,
price:a.price,position:a.position,quantity:"1"}]};d.prototype.productListImpression=function(b,d){var c=1,f=[];a(b).each(function(){var b=a(this).data("product-info");f.push({id:b.skuCode,name:b.name,category:b.category,brand:b.brand,price:b.price,list:d,position:c});c+=1});dataLayer.push({ecommerce:{impressions:f}})};d.prototype.productListImpressionKlevu=function(b,d,g){var c=[];dataLayer.push({"search-results-total":d});b.length&&(a.each(b,function(a,b){c.push({id:b.sku,name:b.name,category:VueUtils.getFirstCategory(b.category),
brand:b.brand,price:b.price,list:g,position:a})}),dataLayer.push({ecommerce:{impressions:c}}))};d.prototype.productListClick=function(a,b,d){this.gaProductListClickAction(b,d,{id:a.skuCode,name:a.name,category:a.category,brand:a.brand,price:a.price,position:a.position})};d.prototype.masonryListClick=function(a,b,d){this.gaProductListClickAction(b,d,{id:a.skuCode,name:a.name,category:a.category,brand:a.brand,price:a.price,position:a.position})};d.prototype.gaNotLoaded=function(a){ga.loaded||(document.location=
a)};d.prototype.gaProductListClickAction=function(a,b,d){a={event:"productClick",ecommerce:{click:{actionField:{list:a}}}};d&&(a.ecommerce.click.products=[d]);this.gaClickAction(a,b)};d.prototype.gaClickAction=function(a,b){var c=function(){document.location=b};a.eventCallback=c;dataLayer.push(a);window.google_tag_manager?setTimeout(c,2E3):c()};a.nlg.ga=new d});window.initQueue.push(function(a){a.nlg.Cart=function(){this.init()};a.nlg.Cart.prototype={init:function(){this.cartTargetMobile="#the-cart-target-mobile";this.cartTarget="#the-cart-target";this.productImageFallback="/images/logo-mobile.svg";this.$loadingSpinner=a("div.spinner");this.$loadingMobileSpinner=a("div.spinner-mobile");this.hasError=!1;this.controllers={viewCart:"/shop/view-cart-resp.ep",viewCartJson:"/shop/view-cart-resp.ep?cartAction\x3dviewCart\x26cartViewMode\x3djson",productConfig:"/shop/ajax-shopping-item-config.ep",
productView:"/shop/product-view.ep",addToCart:"/shop/ajax-add-to-cart.ep",removeCartItem:"/shop/ajax-remove-cart-item-resp.ep",addDependentToCart:"/shop/ajax-add-dependent-to-cart.ep",moveToCart:"/shop/ajax-move-to-cart.ep",addToWishlist:"/shop/ajax-add-to-wishlist.ep"};this.bindUI();this.renderUI()},bindUI:function(){a(this.cartTarget+", "+this.cartTargetMobile).on("click",this.viewCart);a(window).on("pageshow",function(){a("#cart").is(".cart-loading.is-open")&&(a("#cart").removeClass("is-open"),
a("body").removeClass("js-no-scroll"))})},renderUI:function(){var b=this;a.elementReady("#bd").done(function(){b.cacheProductImages()})},getProductImage:function(b){return a(b).data("product-img")?a(b).data("product-img"):this.productImageFallback},cacheProductImages:function(){a("body").find("[data-product-img]").each(function(){var b=a(this).data("product-img");(new Image).src=b})},getTarget:function(){return a(".cart-target:visible")},getSkuForButton:function(a){return a.parents("form").find("input[name\x3d'skuCode'],select[name\x3d'skuCode']").val()},
wiggleCart:function(){var b=this.getTarget();a(b).transition({scale:1.1},150,"ease").transition({scale:.9},200,"ease").transition({scale:1,duration:250,easing:"ease",complete:function(){a(b).removeAttr("style")}})},populateProductAddedNotification:function(b,d,c){-1!=b.indexOf("image-not-available")?a(".add-to-cart__image").hide():(a(".add-to-cart__image").show(),a(".js-product-added__image").attr("src",b));a(".js-product-added__name").text(d);a(".js-product-added__price").text(c)},productAddedNotification:function(){a.nlg.cart.hasError||
a(".add-to-cart-notification-btn").trigger("click")},viewCart:function(b){var d=b.currentTarget.href;b.preventDefault();a("#cart").addClass("is-open");a("body").addClass("js-no-scroll");a("body").addClass("cart-loading-active");setTimeout(function(){location.href=d},500)},goToCart:function(){var b=this;a("#cart").addClass("is-open");a("body").addClass("js-no-scroll");a("body").addClass("cart-loading-active");setTimeout(function(){location.href=b.controllers.viewCart},500)},showError:function(b){a(".js-cart-error-msg").html(b);
a.nlg.page.displayError("#cart_error")},showGenericError:function(){a.nlg.page.displayError("#generic_error")},showAjaxError:function(a,d,c){0!==a.status?this.showError(a.status+" "+c+"."):"timeout"===d?this.showError("Request cancelled."):this.showGenericError()},beginConfigure:function(b,d){var c=this;return a.ajax({url:this.controllers.viewCartJson,data:{pID:d},headers:{Accept:"application/json"},cache:!0,type:"GET",dataType:"json",beforeSend:function(a,d){c.cartLoading(b)},error:function(a,d,
f){c.cartLoaded(b);c.showAjaxError(a,d,f)}})},submit:function(b,d,c){var e=this;c=jQuery.extend({},c);var g=this.getProductImage(b);e.populateProductAddedNotification(g,c.productName,c.price);delete c.productName;delete c.productCategory;delete c.productBrand;delete c.price;d=a.ajax({url:d,data:c,headers:{Accept:"application/json"},cache:!0,type:"POST",success:function(c,d,g){a.nlg.page.isJson(g)&&"ok"!==c.status?(e.showError(c.message),e.hasError=!0):(e.hasError=!1,e.animateAddToCart(b))},error:function(a,
b,c){"404"==a.status?e.showError("Sorry, this product is no longer available online."):e.showAjaxError(a,b,c)},complete:function(a,c){e.cartLoaded(b)}});e.cartLoading(b);return d},animateAddToCart:function(b){this.wiggleCart();a.nlg.page.updateCartHeader()},cartLoading:function(b){b.addClass("-disabled");b.attr("disabled",!0);a("#bd").find(".js-add-to-cart-fixed").addClass("-disabled").attr("disabled",!0);this.$loadingSpinner.show();this.$loadingMobileSpinner.show()},cartLoaded:function(b){b.removeClass("-disabled");
b.attr("disabled",!1);a("#bd").find(".js-add-to-cart-fixed").removeClass("-disabled").attr("disabled",!1);this.$loadingSpinner.hide();this.$loadingMobileSpinner.hide()},addToWishlist:function(b,d){var c=this,e=a(b.currentTarget),g=e.data("skucode");b.preventDefault();a.ajax({url:this.controllers.addToWishlist,data:{skuCode:g},dataType:"json",type:"POST",success:function(b,k,h){a.nlg.page.isJson(h)&&"ok"!==b.status?(c.showError(b.message),this.hasError=!0):(this.hasError=!1,dataLayer.push({event:"add-to-wishlist-"+
d,eventLabel:g}),e.find(a(".wishlist-add")).addClass("hide"),e.find(a(".wishlist-added")).removeClass("hide"),a.nlg.page.updateCartHeader())},error:function(a,b,d){c.showError("Cannot add product to the wishlist.")}})}};a.nlg.ready("page").add(function(){a.elementReady(".header, #cart").done(function(){a.nlg.cart=new a.nlg.Cart;a.nlg.ready("cart").fire(a.nlg.cart)})})});window.initQueue.push(function(a,b){var d=b.log.getLogger("signup");a(document).on("submit",".js-footer-signup",function(b){b.preventDefault();b=a(b.target);a.nlg.page.subscribeToNewsletter(b,"Footer")});a(document).on("submit",".js-interest-signup",function(b){b.preventDefault();var c=a(b.target);b=c.prop("action");var g=c.serialize();c.find("button, input").prop("disabled",!0).addClass("-disabled");c.find(".js-error").remove();c.find(".js-success").addClass("hide");d.debug("Newsletter request:",
g);a.ajax({url:b,data:g,method:"POST",dataType:"json"}).then(function(b){d.debug("Newsletter response:",b);if("OK"===b.status)c.find(".js-success").removeClass("hide"),c[0].reset();else return a.Deferred().reject(b)}).fail(function(b){var d=a('\x3cdiv data-alert class\x3d"js-error alert-box alert"\x3eSorry, an error occurred.\x3c/div\x3e');b.messages&&b.messages[0]&&d.text(b.messages[0]);c.prepend(d)}).always(function(){c.find("button, input").prop("disabled",!1).removeClass("-disabled")})});a.elementReady("#bd").then(function(){a(".js-interest-signup button").prop("disabled",
!1).removeClass("-disabled")})});window.readyQueue.push(function(a,b){a("#my-nl__join-message").length&&(b=a("#my-nl__join-message").data("popup-url"),a.magnificPopup.open({items:{src:b,type:"ajax",mainClass:"my-mfp-zoom-in"},closeBtnInside:!0}))});readyQueue.push(function(a,b){var d=b.log.getLogger("nav");b=function(b,c,d){var f=this;b=a(b);this.timeout=Number(b.data("menu-timeout")||d||250);this.activate_cb=a.Callbacks();this.deactivate_cb=a.Callbacks();this.timer=null;this.hovered=a();this.opened=a();this.pinned=!1;b.on("mouseenter",c,function(b){f.hovered=a(b.currentTarget);f.updateTimer()}).on("mouseleave",c,function(b){f.hovered=a();f.updateTimer()}).on("click",c,function(a){f.hovered.is(f.opened)||(a.preventDefault(),f.updateMenu(),f.updateTimer())})};
b.prototype.updateTimer=function(){var a=this,b=this.hovered,c=this.opened,e=0!==b.length||0!==c.length;this.timer&&!e?(d.debug("stop timer",this.timer),clearTimeout(this.timer),this.timer=null):this.timer||!e||b.is(c)?this.timer&&d.debug("leave timer",this.timer):(this.timer=setTimeout(function(){a.updateMenu();a.timer=null},this.timeout),d.debug("start timer",this.timer))};b.prototype.updateMenu=function(){this.hovered.is(this.opened)?d.debug("no menu update"):this.pinned&&0===this.hovered.length?
d.debug("pinned menu"):(d.debug("menu update"),this.opened.length&&this.deactivate_cb.fire(this.opened),this.opened=this.hovered,this.hovered.length&&this.activate_cb.fire(this.hovered))};b.prototype.onActivate=function(a){this.activate_cb.add(a);return this};b.prototype.onDeactivate=function(a){this.deactivate_cb.add(a);return this};b.prototype.pin=function(){d.debug("pin");this.pinned=!0};b.prototype.unpin=function(){d.debug("unpin");this.pinned=!1;this.updateTimer()};b.prototype.close=function(){d.debug("close");
this.pinned=!1;this.updateMenu()};var c=new b(".page__header .page__header-nav","li"),e=a(".page__header-nav-menu");e.find(".nav__menu").hide();a("header").hover(function(a){c.pin()},function(a){c.unpin()});c.onActivate(function(b){var c=b.find("a").data("nav");b.addClass("is-hovered");e.addClass("is-open");a(c).show().addClass("is-active")}).onDeactivate(function(b){var c=b.find("a").data("nav");b.removeClass("is-hovered");e.removeClass("is-open");a(c).hide().removeClass("is-active")});b=new b(".page__nav-top-level",
"li");var g=e.find(".nav__subcat");b.onActivate(function(b){var c=b.find("a").data("nav");b.addClass("is-active").siblings().removeClass("is-active");g.removeClass("is-active");a(c).addClass("is-active")});e.on("click",".page__header-nav-close-button",function(a){c.close()});a(document.body).on("click touch",".page__header-nav \x3e ul \x3e li \x3e a",function(a){a.preventDefault()})});
//# sourceMappingURL=/shop/template-resources/sourcemap/db977acf8c4882f7.js.map