window.theme=window.theme||{},theme.Sections=function(){this.constructors={},this.instances=[],$(document).on("shopify:section:load",this._onSectionLoad.bind(this)).on("shopify:section:unload",this._onSectionUnload.bind(this)).on("shopify:section:select",this._onSelect.bind(this)).on("shopify:section:deselect",this._onDeselect.bind(this)).on("shopify:block:select",this._onBlockSelect.bind(this)).on("shopify:block:deselect",this._onBlockDeselect.bind(this))},theme.Sections.prototype=_.assignIn({},theme.Sections.prototype,{_createInstance:function(container,constructor){var $container=$(container),id=$container.attr("data-section-id"),type=$container.attr("data-section-type");if(constructor=constructor||this.constructors[type],!_.isUndefined(constructor)){var instance=_.assignIn(new constructor(container),{id,type,container});this.instances.push(instance)}},_onSectionLoad:function(evt){var container=$("[data-section-id]",evt.target)[0];container&&this._createInstance(container)},_onSectionUnload:function(evt){this.instances=_.filter(this.instances,function(instance){var isEventInstance=instance.id===evt.detail.sectionId;return isEventInstance&&_.isFunction(instance.onUnload)&&instance.onUnload(evt),!isEventInstance})},_onSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onSelect)&&instance.onSelect(evt)},_onDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onDeselect)&&instance.onDeselect(evt)},_onBlockSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockSelect)&&instance.onBlockSelect(evt)},_onBlockDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockDeselect)&&instance.onBlockDeselect(evt)},register:function(type,constructor){this.constructors[type]=constructor,$("[data-section-type="+type+"]").each(function(index,container){this._createInstance(container,constructor)}.bind(this))}}),window.slate=window.slate||{},slate.rte={wrapTable:function(){$(".rte table").wrap('
')},iframeReset:function(){var $iframeVideo=$('.rte iframe[src*="youtube.com/embed"], .rte iframe[src*="player.vimeo"]'),$iframeReset=$iframeVideo.add(".rte iframe#admin_bar_iframe");$iframeVideo.each(function(){$(this).wrap('')}),$iframeReset.each(function(){this.src=this.src})}},window.slate=window.slate||{},slate.a11y={pageLinkFocus:function($element){var focusClass="js-focus-hidden";$element.first().attr("tabIndex","-1").focus().addClass(focusClass).one("blur",callback);function callback(){$element.first().removeClass(focusClass).removeAttr("tabindex")}},focusHash:function(){var hash=window.location.hash;hash&&document.getElementById(hash.slice(1))&&this.pageLinkFocus($(hash))},bindInPageLinks:function(){$("a[href*=#]").on("click",function(evt){this.pageLinkFocus($(evt.currentTarget.hash))}.bind(this))},trapFocus:function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$elementToFocus||(options.$elementToFocus=options.$container),options.$container.attr("tabindex","-1"),options.$elementToFocus.focus(),$(document).off("focusin"),$(document).on(eventName,function(evt){options.$container[0]!==evt.target&&!options.$container.has(evt.target).length&&options.$container.focus()})},removeTrapFocus:function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$container&&options.$container.length&&options.$container.removeAttr("tabindex"),$(document).off(eventName)}},theme.Images=function(){function preload(images,size){typeof images=="string"&&(images=[images]);for(var i=0;i a").each(function(){$(this).attr("href")==window.location.pathname&&$(this).addClass("active")}),$(hd.mnTgl).on("click",function(){$(hd.mbNav).toggleClass("active"),$("html").toggleClass("showOverly stopScroll")}),$("#main_nav .hasSub, .cmgmenu .hasSub").hover(function(){var submenu=$(this).data("link");$(this).addClass("active").siblings().removeClass("active"),$(submenu).addClass("active").siblings().removeClass("active")}),$(".mnvTtl").on("click",function(e){e.preventDefault();var menu=$(this).attr("href");$(".mnvTtl").removeClass("active"),$(this).addClass("active"),$(".mobNav").fadeOut("fast"),$(menu).fadeIn()}),$(".mobNav .hasSub").on("click",function(e){e.preventDefault(),$(this).next().addClass("active")}),$(".mobNav .backto").on("click",function(e){e.preventDefault(),$(this).parent().removeClass("active")}),$(".sdCate .at-icon").on("click",function(e){e.preventDefault(),$(this).toggleClass("minus"),$(this).parent().next().slideToggle()}),$("body").click(function(e){var $tg=$(e.target);!$tg.parents().is(hd.mbNav)&&!$tg.parents().is(hd.mnTgl)&&!$tg.is(hd.mnTgl)&&$(hd.mbNav).removeClass("active"),!$tg.parents().is(".main-search")&&!$tg.parents().is(".searchinline")&&!$tg.is(".searchIcn")&&!$tg.parents().is(".leftcol")&&$(".main-search .s_res, .searchinline .s_res, .hdSearch .s_res").fadeOut(),!$tg.parents().is("#LanguageForm")&&!$tg.is(".sl-lang")&&$("#language").fadeOut(),!$tg.parents().is("#currency-picker")&&!$tg.is(".selected-currency")&&$("#currencies").fadeOut(),$tg.parents().is(".sb_filter")||$(".flTop .filterBx").removeAttr("open")})}return HeaderSection}(),theme.Search=function(){var selectors={search:".search",searchSubmit:".s_submit",searchInput:".s_input"},classes={focus:"search--focus"};function init(){searchSubmit();var currentAjaxRequest=null,searchForms=$("form.search").each(function(){var input=$(this).find('input[name="q"]');input.bind("focus keyup change",function(){var term=$(this).val(),form=$(this).closest("form"),resultsWr=form.find(".s_res"),searchList=form.find("#serchList"),searchPre=form.find("#searchPre");resultsWr.fadeIn(),term.length>2?fetch(`${routes.predictive_search_url}?q=${term}&resources[type]=product&resources[limit]=4§ion_id=predictive-search`).then(response=>{if(!response.ok){var error=new Error(response.status);throw $(searchList).hide(),$(searchPre).fadeIn(),error}return response.text()}).then(text=>{var resultsMarkup=new DOMParser().parseFromString(text,"text/html").querySelector("#shopify-section-predictive-search").innerHTML;$(searchList).html(text),$(searchList).fadeIn(),$(searchPre).hide()}).catch(error=>{throw $(searchList).hide(),error}):($(searchList).empty().hide(),$(searchPre).fadeIn())})});$(".modalOverly, .closeSearch").on("click",function(){$("html").removeClass("showOverly stopScroll searchact")}),$(".searchIcn").on("click",function(e){e.preventDefault(),$("html").addClass("showOverly stopScroll searchact"),setTimeout(function(){$("input[name=q]").focus()},600)})}function searchSubmit(){$(selectors.searchSubmit).on("click",function(evt){var $el=$(evt.target),$input=$el.parents(selectors.search).find(selectors.searchInput);$input.val().length===0&&(evt.preventDefault(),searchFocus($input))})}return{init}}(),theme.Product=function(){function Product(container){this.container=container;var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");this.settings={mediaQueryMediumUp:"screen and (min-width: 768px)",mediaQuerySmall:"screen and (max-width: 767px)",bpSmall:!1,enableHistoryState:$container.data("enable-history-state")||!1,imageSize:null,imageZoomSize:null,namespace:".slideshow-"+sectionId,sectionId,sliderActive:!1,zoomEnabled:!1},this.selectors={purl:$container.attr("data-url"),mainSec:sectionId,addToCart:"#AddToCart-"+sectionId,SKU:".variant-sku",productPrices:"#price"+sectionId,ftImg:".featImg"+sectionId,imgZoom:".przoom"+sectionId,primgsl:".pis"+sectionId,thumbImg:".pr_thumb"+sectionId,thumbs:".pr_thumbs"+sectionId,originalSelectorId:"#ProductSelect-"+sectionId,singleOptionSelector:".single-option-selector-"+sectionId},$(".mfp-link, .product-info, .pr_form_item").magnificPopup({delegate:".mfp",removalDelay:300,callbacks:{beforeOpen:function(){$(".sticky_hdr").addClass("popup"),this.st.mainClass=this.st.el.attr("data-effect")},close:function(){$(".sticky_hdr").removeClass("popup")}},midClick:!0}),$("#PrSecTabs .product-tabs .tablink").on("click",function(e){e.preventDefault(),$(this).parent().addClass("active"),$(this).parent().siblings().removeClass("active");var tab=$(this).attr("href");$(".tb_cnt").not(tab).css("display","none"),$(tab).fadeIn()}),$("#PrSecTabs .product-tabs li:first-child, #PrSecTabs .prtabAcr:first-child").addClass("active"),$("#PrSecTabs .tbs_wrp .tb_cnt:eq(0)").show(),$(".prtabAcr").on("click",function(){$(this).toggleClass("active").next().slideToggle()}),$(".stickyOpt .selectedOpt").on("click",function(){$(".stickyOpt ul").slideToggle("fast")}),$(".stickyOpt .vrOpt").on("click",function(e){var number=$(this).data("no");$(".stickyOpt ul").slideUp("fast"),this.productvariants=JSON.parse(document.getElementById("ProductJson-"+sectionId).innerHTML);var stOpt=this.productvariants.variants[number].options;stOpt[1]!=null&&$('.swatchInput[value="'+stOpt[1]+'"]').prop("checked",!0),stOpt[2]!=null&&$('.swatchInput[value="'+stOpt[2]+'"]').prop("checked",!0),stOpt[0]!=null&&$('.swatchInput[value="'+stOpt[0]+'"]').trigger("click")}),$(".stickyQty .qtyBtn").on("click",function(){var qtyField=$(".mianQty"),oldValue=$(qtyField).val(),newVal=1;$(this).is(".plus")?newVal=parseInt(oldValue)+1:oldValue>1&&(newVal=parseInt(oldValue)-1),$(qtyField).val(newVal).trigger("change")}),$(".mianQty").on("change",function(){$("#stquantity").val($(this).val())}),typeof variantImages<"u"&&$(this.selectors.thumbImg).bind("click",function(){var arrImage=$(this).attr("href").split("?")[0].split("."),strExtention=arrImage.pop(),strRemaining=arrImage.pop().replace(/_[a-zA-Z0-9@]+$/,""),strNewImage=arrImage.join(".")+"."+strRemaining+"."+strExtention;typeof variantImages[strNewImage]<"u"&&productOptions.forEach(function(value,i){optionValue=variantImages[strNewImage]["option-"+i],$(".swatch.pvOpt0").length?optionValue!==null&&$(".pvOpt"+i+" .swatchInput").filter(function(){return $(this).val()===optionValue}).length&&$(".pvOpt"+i).find('.swatchInput[value="'+optionValue+'"]').prop("checked",!0).trigger("change"):optionValue!==null&&$(".single-option-selector:eq("+i+") option").filter(function(){return $(this).text()===optionValue}).length&&$(".single-option-selector:eq("+i+")").val(optionValue).trigger("change")})}),$("#ProductJson-"+sectionId).html()&&(this.productSingleObject=JSON.parse(document.getElementById("ProductJson-"+sectionId).innerHTML),this.settings.zoomEnabled=$(this.selectors.imgZoom).length,this._initBreakpoints(),this._stringOverrides(),this._initVariants(),this._setActiveThumbnail())}Product.prototype=_.assignIn({},Product.prototype,{_stringOverrides:function(){theme.productStrings=theme.productStrings||{},$.extend(theme.strings,theme.productStrings)},_initBreakpoints:function(){var self=this;enquire.register(this.settings.mediaQuerySmall,{match:function(){self.settings.zoomEnabled&&_destroyZoom($(self.selectors.imgZoom)),self.settings.bpSmall=!0},unmatch:function(){self.settings.bpSmall=!1}}),enquire.register(this.settings.mediaQueryMediumUp,{match:function(){self.settings.zoomEnabled&&_enableZoom($(self.selectors.imgZoom))}})},_initVariants:function(){var options={$container:this.$container,enableHistoryState:this.$container.data("enable-history-state")||!1,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId,product:this.productSingleObject};this.variants=new slate.Variants(options),this.$container.on("variantChange"+this.settings.namespace,this._updateAddToCart.bind(this)),this.$container.on("variantImageChange"+this.settings.namespace,this._updateImages.bind(this)),this.$container.on("variantSKUChange"+this.settings.namespace,this._updateSKU.bind(this))},_setActiveThumbnail:function(variant){var view=$(this.selectors.thumbs).data("view"),prthumbs=new Swiper(this.selectors.thumbs,{slidesPerView:5,spaceBetween:10,direction:getDirection(),watchSlidesVisibility:!0,watchSlidesProgress:!0,mousewheel:!0,breakpoints:{767:{slidesPerView:view}},on:{resize:function(){prthumbs.changeDirection(getDirection())}}});function getDirection(){if($(".thumbs_nav.bottom").length)var direction="horizontal";else var direction=window.innerWidth>=767?"vertical":"horizontal";return direction}var breakpoint=window.matchMedia("(min-width: 768px)"),sliderId=this.selectors.primgsl,prslider,breakpointChecker=function(){if(theme.productStrings.prStyle!="1"&&theme.productStrings.prStyle!="5"){if(breakpoint.matches===!0){prslider!==void 0&&prslider.destroy();return}else if(breakpoint.matches===!1)return enableSwiper()}else return enableSwiper()},enableSwiper=function(){var center=!1;theme.productStrings.prStyle=="5"&&(center=!0),prslider=new Swiper(sliderId,{lazy:!0,preloadImages:!1,slidesPerView:"auto",loopedSlides:4,loop:!0,centeredSlides:center,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},thumbs:{swiper:prthumbs}}),prslider.on("slideChange",function(){var slide=prslider.slides.eq(prslider.activeIndex),video=$(slide).find("video").get(0);$(video).length&&video.play()})};if(breakpointChecker(),variant==null)var mediaid=$(this.selectors.thumbImg+".activeSlide").attr("data-img");else{var mediaid=variant.featured_media.id;$(".stickCtImg").attr("src",variant.featured_image.src)}var vrMedia=$('.pr_photo:not(.swiper-slide-duplicate)[data-id="'+mediaid+'"]').data("slide");if(theme.productStrings.prStyle=="2"||theme.productStrings.prStyle=="3"||theme.productStrings.prStyle=="4"){var imgposition=$(".pr_photo[data-slide='"+vrMedia+"']").offset();$(window).width()>767?$("html, body").animate({scrollTop:imgposition.top-70},700):prslider.slideToLoop(vrMedia)}else prslider.slideToLoop(vrMedia);$(this.selectors.thumbImg).on("click",function(e){e.preventDefault();var $el=$(this).parent().data("slide");prslider.slideToLoop($el)})},_updateAddToCart:function(evt){var variant=evt.variant;if(variant&&updateDiscountLabel(variant),variant){if($(this.selectors.productPrices).removeClass("v_hidden").attr("aria-hidden","true"),variant.available){var quantity=$(".prvQty").data("v"+variant.id);$(this.selectors.addToCart).prop("disabled",!1),quantity<1&&variant.inventory_management=="shopify"?$(this.selectors.addToCart).find(".txt").text(theme.strings.preOrder):$(this.selectors.addToCart).find(".txt").text(theme.strings.addToCart)}else $(this.selectors.addToCart).prop("disabled",!0).find(".txt").text(theme.strings.soldOut);$(".selectedOpt").text(variant.title)}else $(this.selectors.addToCart).prop("disabled",!0).find(".txt").text(theme.strings.unavailable),$(this.selectors.productPrices).addClass("v_hidden").attr("aria-hidden","false");fetch(this.selectors.purl+"?variant="+variant.id+"§ion_id="+this.selectors.mainSec).then(response=>response.text()).then(responseText=>{var html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.getElementById("price"+this.selectors.mainSec),source=html.getElementById("price"+this.selectors.mainSec);source&&destination&&(destination.innerHTML=source.innerHTML),document.querySelector(".stPrice")&&(document.querySelector(".stPrice").innerHTML=source.innerHTML),theme.mlcurrency&¤ciesChange(this.selectors.productPrices+" span.money");var qty=document.getElementById("invens"),sourceqty=html.getElementById("invens");sourceqty&&qty&&(qty.innerHTML=sourceqty.innerHTML)})},_updateImages:function(evt){var variant=evt.variant;this._setActiveThumbnail(variant)},_updateSKU:function(evt){var variant=evt.variant;$(this.selectors.SKU).html(variant.sku)},onUnload:function(){this.$container.off(this.settings.namespace)}});function _enableZoom($el){$($el).hover(function(){var zoomUrl=$(this).data("zoom");$(this).zoom({url:zoomUrl})},function(){$(this).trigger("zoom.destroy")})}function _destroyZoom($el){$($el).each(function(){$(this).trigger("zoom.destroy")})}return Product}(),theme.QuickView=function(){$("body").on("click",".quick-view",function(e){$.ajax({beforeSend:function(){$("body").addClass("loading")},url:$(this).attr("href"),success:function(data){$.magnificPopup.open({items:{src:'",type:"inline"},removalDelay:500,callbacks:{beforeOpen:function(){$(".sticky_hdr").addClass("popup"),this.st.mainClass="mfp-zoom-in"},open:function(){},close:function(){$(".sticky_hdr").removeClass("popup"),$("#quickv_pp").empty()}}})},complete:function(){$("body").removeClass("loading")}}),e.preventDefault(),e.stopPropagation()})}(),theme.slideshows={},theme.SlideshowSection=function(){function SlideshowSection(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),slideshow="#ss"+sectionId,loop=$("#ss"+sectionId).data("loop"),fade=$("#ss"+sectionId).data("effect"),autoplay=$("#ss"+sectionId).data("autoplay"),slswiper=new Swiper(slideshow,{loop,slidesPerView:1,effect:fade,autoplay,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}});theme.slideshows=slswiper;var iframes=$(slideshow).find(".embed-player");resizePlayer(iframes,16/9,$(slideshow)),$(window).on("resize",function(){resizePlayer(iframes,16/9,$(slideshow))})}function resizePlayer(iframes,ratio,slideshow){if(iframes[0]){var win=$(slideshow),width=win.width(),playerWidth,height=win.height(),playerHeight,ratio=ratio||16/9;iframes.each(function(){var current=$(this);width/ratio0&&(SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()),theme.countdown(),$("body").removeClass("loading hideOverly"),history.pushState({page:url},url,url)}})},infiniteScroll=function(){var action="scroll load delayed-resize";$(window).on(action,function(){var moreURL=$(".infinitpagin a").attr("href");if($(".infinitpagin a.infinite").length){var bottom=$(".infinitpagin").offset(),docTop=$(document).scrollTop()+$(window).height()-50;docTop>bottom.top&&($(window).off(action),loadMore(moreURL))}})},loadMoreBtn=function(){$(document).on("click","a.loadMore",function(e){e.preventDefault();var moreURL=$(this).attr("href");loadMore(moreURL)})},loadMore=function(moreURL){moreURL.length&&$.ajax({type:"GET",dataType:"html",url:moreURL,beforeSend:function(){$(".infinitpaginOuter").attr("data-type")=="button"?$("body").addClass("loading hideOverly"):$(".infinitpagin a").show()},complete:function(data){$("#collectionPr").length&&$("#collectionPr").append($("#collectionPr",data.responseText).html()),$(".infinitpagin",data.responseText).html()?$(".infinitpagin").html($(".infinitpagin",data.responseText).html()):$(".infinitpagin").remove(),shopreviews(),$(".infinitpagin a.loadMore").length||infiniteScroll(),theme.countdown(),$("body").removeClass("loading hideOverly")}})},infiniteScroll(),loadMoreBtn()}return collectionView}(),theme.instagramSection=function(){function instagramSection(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),act=$container.attr("data-act"),limit=$container.attr("data-count"),autopl=$container.attr("data-autop"),ajaxUrl="https://graph.instagram.com/me/media?fields=id,media_type,media_url,permalink,thumbnail_url,caption,children&access_token="+act;$.ajax({url:ajaxUrl,type:"GET",dataType:"json",success:function(res){var data=res.data,igdiv="#instafeed"+sectionId,html="",bl=bl||!0;$.each(data,function(index,el){if(index>=limit)return 0;var img_url=el.thumbnail_url||el.media_url;html+='![]()
'}),$(igdiv).html(html)},complete:function(res){}})}return instagramSection}(),theme.quotesl={},theme.Quotes=function(){function Quotes(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),fade=$("#Quotes-"+sectionId).data("effect"),autoplay=$("#Quotes-"+sectionId).data("autoplay"),swiper=new Swiper("#Quotes-"+sectionId,{loop:!0,slidesPerView:"auto",effect:fade,autoplay,pagination:{el:".swpg"+sectionId,clickable:!0},navigation:{nextEl:".swn"+sectionId,prevEl:".swp"+sectionId}});this.quotesl=swiper,swiper.on("slideChange",function(data){$("#Quotes-"+sectionId+" .swiper-slide-duplicate .bgImg.lazyloading").addClass("lazyload")})}return Quotes}(),theme.slcarousel={},theme.carousel=function(){function carousel(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),carousel2=$("#swp"+sectionId),tabs="#"+sectionId+" .tablink",tabcontent="#"+sectionId+" .tb_cnt";function loadSlider(){var tabswiper=new Swiper(".tabswiper",{loop:!0,slidesPerView:"auto",autoplay,pagination:{el:".tb"+sectionId,clickable:!0},navigation:{nextEl:".tbn"+sectionId,prevEl:".tbp"+sectionId}})}$("#"+sectionId+".cltabWrap").length&&loadSlider(),$(tabs).on("click",function(e){e.preventDefault(),$(this).parent().addClass("active"),$(this).parent().siblings().removeClass("active");var tab=$(this).attr("href");$(tabcontent).not(tab).hide(),$(tab).show(),setTimeout(function(){loadSlider(),window.dispatchEvent(new Event("resize"))},5)});var autoplay=$("#swp"+sectionId).data("autoplay"),loop=$("#swp"+sectionId).data("loop");loop==null&&(loop=!0);var swiper=new Swiper("#swp"+sectionId,{loop,slidesPerView:"auto",autoplay,pagination:{el:".swpg"+sectionId,clickable:!0},navigation:{nextEl:".swn"+sectionId,prevEl:".swp"+sectionId}});theme.slcarousel=swiper}return carousel}(),theme.masonary=function(){function masonary(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),masonary2=this.masonary=$($container).find(".grid-masonary");loadMasonary(masonary2),setTimeout(function(){loadMasonary(masonary2)},1e3);function loadMasonary(masonary3){$(masonary3).masonry({columnWidth:".grid-sizer-"+sectionId,itemSelector:".msitem",percentPosition:!0})}}return masonary}(),theme.ajaxCart=function(){if($(".continue-shopping, .modalOverly, .closeDrawer").click(function(){$(".modal").fadeOut(200),$("body").removeClass("loading showOverly")}),$(document).on("click",".add-to-cart",function(e){e.preventDefault(),$("body").addClass("loading"),$(this).next().find(".cartBtn").trigger("click")}),$(document).on("click touch",".quickShop",function(e){e.preventDefault(),e.stopImmediatePropagation();var url=$(this).attr("href"),imgwrapper=$(this).parents(".grid_bx").find(".grid_img_wr"),wrapper=$(this).parents(".grid_bx");$.ajax({url:url+"/?section_id=quick-shop",dataType:"html",type:"GET",beforeSend:function(){$(imgwrapper).addClass("showLoading")},success:function(data){$("#shopify-section-quick-shop").remove(),$(wrapper).addClass("active").append(data)},complete:function(data){$(imgwrapper).removeClass("showLoading"),theme.mlcurrency&¤ciesChange(".quick_shop.active .product-single__price span.money")}})}),$(document).on("click touch",".closeShop",function(e){e.preventDefault(),$("#shopify-section-quick-shop").remove()}),$(document).on("click",".addto-wishlist",function(e){e.preventDefault();var id=$(this).attr("rel");if(localStorage.getItem("wishlist")==null)var str2=id;else if(localStorage.getItem("wishlist").indexOf(id)==-1){var str2=localStorage.wishlist+"+"+id;str2=str2.replace("++","+")}localStorage.setItem("wishlist",str2),$(this).find(".at-icon").addClass("at-flip"),setTimeout(function(){$('.wishlist[rel="'+id+'"]').removeClass("addto-wishlist").find("span").text(theme.wlAvailable),$('.wishlist[rel="'+id+'"] .at-icon').removeClass("at-flip").addClass("added")},1500)}),localStorage.getItem("wishlist")!=null&&localStorage.getItem("wishlist")!="+")for(var str=String(localStorage.getItem("wishlist")).split("+"),i=0;i99?days=("00"+days).substr(-3):days=("00"+days).substr(-2),hours=("00"+hours).substr(-2),minutes=("00"+minutes).substr(-2),seconds=("00"+seconds).substr(-2),$($this).find(".days").html(days),$($this).find(".hours").html(hours),$($this).find(".minutes").html(minutes),$($this).find(".seconds").html(seconds),distance<0&&(clearInterval(x),$($this).hide().parents(".timerl").hide())},1e3)})},theme.init=function(){slate.rte.wrapTable(),slate.rte.iframeReset(),theme.countdown(),slate.a11y.pageLinkFocus($(window.location.hash)),$(".in-page-link").on("click",function(e){slate.a11y.pageLinkFocus($(e.currentTarget.hash))}),$('a[href="#"]').on("click",function(e){e.preventDefault()}),$(document).on("click",".crlgTtl",function(i){i.preventDefault(),$(this).next().slideToggle()}),$(document).on("click",".clOtp",function(i){var form=$(this).parents("form");$(form).find(".slcrlg").val($(this).data("value")),$(form).submit()}),$("#currencies li").click(function(){$(window).width()>999&&$("#currencies").slideUp()})},$(theme.init),$(document).ready(function(){"use strict";$(document).on("click",".currencyOpt",function(i){$("#CurrencySelector").val($(this).data("value")),$("#localization_form").submit()}),$(".btn-shop").click(function(){$(".btn-shop").not($(this)).removeClass("active"),$(".products .lb_shop, .grid-lookbook").not($(this).next()).removeClass("active"),$(this).parents(".grid-lookbook").addClass("active"),$(this).toggleClass("active"),$(this).next().toggleClass("active")}),$(".btn-shop-custom").click(function(){console.log("clicked"),$(".btn-shop-custom").not($(this)).removeClass("active");let prd_id=$(this).data("product-id");$(".lb_shop_custom, .grid-lookbook").removeClass("active"),$(".lb_shop_custom, .grid-lookbook").hide(),$("#"+prd_id).addClass("active"),$(this).toggleClass("active"),$(this).next().toggleClass("active")}),$(document).on("click",".btn-filter,.mbtFilter",function(e){$("html").toggleClass("showOverly stopScroll").find(".sb_filter").toggleClass("active"),$(".sb_filter").removeClass("flTop"),$(".filterBx[open]").length||$(".filterBx").attr("open","")}),$(document).on("click",".closeFilter",function(){$("html").removeClass("showOverly stopScroll").find(".sb_filter").removeClass("active")}),$("body").click(function(event){var $target=$(event.target);!$target.parents().is(".sb_filter")&&!$target.is(".sb_filter")&&!$target.is(".btn-filter")&&$("html").removeClass("showOverly stopScroll").find(".sb_filter").removeClass("active")});var lastScroll=0,hdpos=$(".hdr_wrap").offset(),headht=$(".hdr_wrap").innerHeight();function sticky_header(){var scroll=$(window).scrollTop();theme.stickyHeader=="top"?(scroll>headht&&scroll>lastScroll||scroll<=headht?$(".hdr_wrap").removeClass("sticky_hdr fadeInDown"):scrollhdpos.top?$(".hdr_wrap").addClass("sticky_hdr"):$(".hdr_wrap").removeClass("sticky_hdr"))}window.onscroll=function(){scrollFunction()};function scrollFunction(){setTimeout(function(){sticky_header()},100),$(window).scrollTop()>600&&$(".stickyCart").length?($("body.template-product").css("padding-bottom","70px"),$(".stickyCart").slideDown()):($("body.template-product").css("padding-bottom","0"),$(".stickyCart").slideUp()),$(window).scrollTop()>200?$("#scroll_top").addClass("active"):$("#scroll_top").removeClass("active")}$("#scroll_top").on("click",function(){return $("html,body").animate({scrollTop:0},500),!1}),$(".f_links .h4").click(function(){$(window).width()<769&&($(this).toggleClass("active"),$(this).next().slideToggle())}),$(".cartOpen").on("click",function(e){e.preventDefault(),$("body").addClass("overflow-hidden").find(".ctdrawer").addClass("active")}),$(document).on("click",".grswatches li:not(.noImg)",function(e){var $this=$(this),newImage=$(this).attr("rel"),gridWrapper=$(this).parents(".grid_bx").find(".grid_img_wr");$(gridWrapper).addClass("showLoading"),$(gridWrapper).find(".variantImg").css("background-image","url('"+newImage+"')");var image=document.createElement("img");return image.src=newImage,image.onload=function(){$(gridWrapper).removeClass("showLoading").addClass("showVariantImg"),$this.siblings().removeClass("active"),$this.addClass("active")},!1})});function htmlDecode(input){var doc=new DOMParser().parseFromString(input,"text/html");return doc.documentElement.textContent}function freeShippMsg(){document.querySelector(".freeShipMsg")&&fetch(window.routes.url+"/?section_id=cart-drawer").then(response=>response.text()).then(responseText=>{var html=new DOMParser().parseFromString(responseText,"text/html"),destination=document.querySelector(".freeShipMsg"),source=html.querySelector(".ctfreeship");source&&destination&&(destination.innerHTML=source.innerHTML),theme.mlcurrency&¤ciesChange(".freeShipMsg span.money")})}freeShippMsg();function shopreviews(){$(".spr-badge").length&&(SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges())}function updateDiscountLabel(variant){const primaryLabel=document.getElementById("variant-discount-label"),secondaryLabel=document.getElementById("variant-discount-label-secondary"),labelsToUpdate=[primaryLabel,secondaryLabel].filter(el=>el!==null),variantData=window.variantDiscounts[variant.id];if(labelsToUpdate.length===0||!variantData)return;const comparePrice=variantData.compare_at_price,price=variantData.price;if(comparePrice>price){const discountAmount=comparePrice-price,percentage=Math.round(discountAmount/comparePrice*100);labelsToUpdate.forEach(label=>{label.textContent=`-${percentage}%`,label.style.display=""})}else labelsToUpdate.forEach(label=>{label.style.display="none"})}
//# sourceMappingURL=/cdn/shop/t/22/assets/theme.js.map?v=53834636977044133161761152315