(function(c){c.fn.hoverIntent=function(e,t,n){function r(e2){o=e2.pageX,i=e2.pageY}var o,i,a,u,s={interval:100,sensitivity:6,timeout:50},s=typeof e=="object"?c.extend(s,e):c.isFunction(t)?c.extend(s,{over:e,out:t,selector:n}):c.extend(s,{over:e,out:e,selector:t}),l=function(e2,t2){if(t2.hoverIntent_t=clearTimeout(t2.hoverIntent_t),Math.sqrt((a-o)*(a-o)+(u-i)*(u-i))o3&&(o3=e3.outerHeight(!1)),t3?e3.attr("style",t3):e3.css("display","")})}t2.each(function(){var e3=a(this),t3=0;r2.target&&e3.is(r2.target)||(e3.css("box-sizing")!=="border-box"&&(t3+=u(e3.css("border-top-width"))+u(e3.css("border-bottom-width")),t3+=u(e3.css("padding-top"))+u(e3.css("padding-bottom"))),e3.css(r2.property,o3-t3+"px"))})}),e.each(function(){var e2=a(this);e2.attr("style",e2.data("style-cache")||null)}),c._maintainScroll&&a(window).scrollTop(i2/t*a("html").outerHeight(!0)),this},c._applyDataApi=function(){var n={};a("[data-match-height], [data-mh]").each(function(){var e=a(this),t=e.attr("data-mh")||e.attr("data-match-height");t in n?n[t]=n[t].add(e):n[t]=e}),a.each(n,function(){this.matchHeight(!0)})};function i(e){c._beforeUpdate&&c._beforeUpdate(e,c._groups),a.each(c._groups,function(e2){var t=this;t.elements.length&&setTimeout(function(){c._apply(t.elements,t.options)},500)}),c._afterUpdate&&c._afterUpdate(e,c._groups)}c._update=function(e,t){if(t&&t.type==="resize"){var n=a(window).width();if(n===o)return;o=n}e?r===-1&&(r=setTimeout(function(){i(t),r=-1},c._throttle)):i(t)},a(c._applyDataApi),a(window).bind("load",function(e){c._update(!1,e)}),a(window).bind("resize orientationchange",function(e){c._update(!0,e)})}),typeof Object.create!="function"&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),function(a,u,i){YTPlayer={player:null,defaults:{ratio:16/9,videoId:"LSmgKRx5pBo",mute:!0,repeat:!0,width:a(u).width(),playButtonClass:"YTPlayer-play",pauseButtonClass:"YTPlayer-pause",muteButtonClass:"YTPlayer-mute",volumeUpClass:"YTPlayer-volume-up",volumeDownClass:"YTPlayer-volume-down",start:0,pauseOnScroll:!1,fitToBackground:!0,playerVars:{iv_load_policy:3,modestbranding:1,autoplay:1,controls:0,showinfo:0,wmode:"opaque",branding:0,autohide:0},events:null},init:function(e,t){var n,o,r=this;return r.userOptions=t,r.$body=a("body"),r.$node=a(e),r.$window=a(u),r.defaults.events={onReady:function(e2){r.onPlayerReady(e2),r.options.pauseOnScroll&&r.pauseOnScroll(),typeof r.options.callback=="function"&&r.options.callback.call(this)},onStateChange:function(e2){e2.data===1?(r.$node.find("img").fadeOut(400),r.$node.addClass("loaded")):e2.data===0&&r.options.repeat&&r.player.seekTo(r.options.start)}},r.options=a.extend(!0,{},r.defaults,r.userOptions),r.options.height=Math.ceil(r.options.width/r.options.ratio),r.ID=new Date().getTime(),r.holderID="YTPlayer-ID-"+r.ID,r.options.fitToBackground?r.createBackgroundVideo():r.createContainerVideo(),r.$window.on("resize.YTplayer"+r.ID,function(){r.resize(r)}),n=r.onYouTubeIframeAPIReady.bind(r),(t=i.createElement("script")).id="youtube-sdk",e=i.getElementsByTagName("head")[0],u.location.origin=="file://"?t.src="http://www.youtube.com/iframe_api":t.src="//www.youtube.com/iframe_api",e.appendChild(t),console.log(t),t=e=null,o=n,typeof YT=="undefined"&&u.loadingPlayer===void 0?(u.loadingPlayer=!0,u.dfd=a.Deferred(),u.onYouTubeIframeAPIReady=function(){u.onYouTubeIframeAPIReady=null,u.dfd.resolve("done"),o()}):typeof YT=="object"?o():u.dfd.done(function(e2){o()}),r.resize(r),r},pauseOnScroll:function(){var e=this;e.$window.on("scroll.YTplayer"+e.ID,function(){e.player.getPlayerState()===1&&e.player.pauseVideo()}),e.$window.scrollStopped(function(){e.player.getPlayerState()===2&&e.player.playVideo()})},createContainerVideo:function(){var e=a('
');this.$node.append(e),this.$YTPlayerString=e},createBackgroundVideo:function(){var e=a('
');this.$node.append(e),this.$YTPlayerString=e},resize:function(e){var t=a(u);e.options.fitToBackground||(t=e.$node);var n,o=t.width(),r=t.height(),i2=a("#"+e.holderID);o/e.options.ratio0?{delay:+sliderSpeed}:!1;else autoplay="false";var slidesCount=$("#home-slider-"+sectionId+" .swiper-slide").length;if(slidesCount>1)var loop=!0,simulateTouch=!0;else var loop=!1,simulateTouch=!1;var dtSwiper=this.dtSwiper=new Swiper("#home-slider-"+sectionId,{navigation:{nextEl:"#swiper-button-next-"+sectionId,prevEl:"#swiper-button-prev-"+sectionId},direction:"horizontal",loop:loop,simulateTouch:simulateTouch,pagination:{el:"#swiper-pagination-"+sectionId,clickable:!0},autoplay:autoplay,autoHeight:!0})}return HomeSlideshow}(),theme.HomeSlideshow.prototype=_.assignIn({},theme.HomeSlideshow.prototype,{onBlockSelect:function(evt){var sectionId=this.sectionId,slideIndex=$(evt.target).data("index"),dtSwiper=this.dtSwiper,dtSwiperMobile=this.dtSwiperMobile;dtSwiper.slideTo(slideIndex,1500,!1),dtSwiper.autoplay.stop()},onBlockDeselect:function(){var sectionId=this.sectionId,dtSwiper=this.dtSwiper,dtSwiperMobile=this.dtSwiperMobile;dtSwiper.autoplay.start()}}),theme.ProductPage=function(){var defaults={sliderActive:!1,zoomEnabled:!1,imageSize:null,imageZoomSize:null,selectors:{addToCart:".dT_AddToCart",addToCartText:".dT_AddToCartText",optionSelector:"ProductSelect"}};function Product(container2){var $container=this.$container=$(container2),sectionId=$container.attr("data-section-id");this.settings=$.extend({},defaults,{sectionId:sectionId,swiperObjects:{},selectors:{unitPrice:".unitPrice-"+sectionId,originalSelectorId:"ProductSelect-"+sectionId,addToCart:".dT_AddToCart",productPrice:"#ProductPrice-"+sectionId+" span",comparePrice:"#ComparePrice-"+sectionId+" span",addToCartText:".dT_AddToCartText-"+sectionId,notifyForm:"#notify-block-"+sectionId,zoomEnabled:".zoom-activate",variantSkuData:".sku-table-"+sectionId,variantSku:".variant-sku-"+sectionId,InventoryProduct:".inventory-product-"+sectionId,variantInventory:".variant-inventory-"+sectionId,inventoryAvailability:"[data-inventory-availability]"}}),dt_initQuickShop(sectionId),dt_activateQuickShop();var rteVideo=$container.find(".product-single__description.rte iframe").length||!1;rteVideo&&$container.find(".product-single__description.rte iframe").wrap("
"),dt_Quantity(sectionId),$("#ProductJson-"+sectionId).html()&&(this.productSingleObject=JSON.parse(document.getElementById("ProductJson-"+sectionId).innerHTML),this.init(),$.fn.matchHeight._update(),this.inventoryAvailability=container2.querySelector(this.settings.selectors.inventoryAvailability),this.inventoryAvailability&&this._initProductStatus())}return Product.prototype=_.assignIn({},Product.prototype,{isProductStatus:function(){},_initProductStatus:function(){this.ProductStatus=new theme.ProductStatus(this.inventoryAvailability),this.ProductStatus&&this.initProductVariant()},onSelect:function(){theme.ProductVideo.youtubeApiLoaded==!0&&theme.ProductVideo.loadVideos(theme.ProductVideo.hosts.youtube)},onUnload:function(evt){theme.ProductVideo.removeSectionVideos(this.settings.sectionId)},init:function(){this.dT_init_Swiper(),this.dT_Overrides(),this.dT_Zoom(),this.dT_Swatches()},dT_Overrides:function(){DT_THEME.productStrings=DT_THEME.productStrings||{},$.extend(DT_THEME.strings,DT_THEME.productStrings)},dT_Zoom:function(){if(typeof $.zoom=="function"&&this.settings.selectors.zoomEnabled.length){if($(window).width()>767){var imageBlock=$("#slider");if(imageBlock.length){var imageSlideLinks=imageBlock.find(".zoom-img-wrap");imageSlideLinks.length&&imageSlideLinks.each(function(){var t=$(this),url=t.find("img.zoom-img").data("srczoom");t.find(".zoom-img-container").zoom({url:url,touch:!1})})}}$(window).resize(function(){if($(window).width()>767){var imageBlock2=$("#slider");if(imageBlock2.length){var imageSlideLinks2=imageBlock2.find(".zoom-img-wrap");imageSlideLinks2.length&&imageSlideLinks2.each(function(){var t=$(this),url=t.find("img.zoom-img").data("srczoom");t.find(".zoom-img-container").zoom({url:url,touch:!1})})}}else{var imageBlock2=$("#slider");if(imageBlock2.length){var imageSlideLinks2=imageBlock2.find(".zoom-img-wrap");imageSlideLinks2.length&&imageSlideLinks2.each(function(){var t=$(this);t.find(".zoom-img-container").trigger("zoom.destroy")})}}})}else return!1},dT_Swatches:function(){this.$container.find(".swatch :radio").change(function(){var optionIndex=jQuery(this).closest(".swatch").attr("data-option-index"),optionValue=jQuery(this).val().replace(/\s{2,}/g," ");jQuery(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")});for(var productJSON=this.productSingleObject,i=0,length=productJSON.variants.length;i1)var useLoop=!0;else var useLoop=!1;this.settings.swiperObjects.mySwiper=new Swiper(".swiper-main-"+this.settings.sectionId,{direction:"horizontal",pagination:{el:".swiper-pagination-"+this.settings.sectionId,clickable:!0},updateOnImagesReady:!0,spaceBetween:0,slidesPerView:1,roundLengths:!0,simulateTouch:!1,onImagesReady:windowResizeFunc});var gallerySwiperThumbsVert=this.settings.swiperObjects.gallerySwiperThumbsVert=new Swiper("#swiper-gallery-thumbs-vert-"+this.settings.sectionId,{direction:"vertical",initialSlide:2,spaceBetween:10,slidesPerView:5,loop:!1,loopedSlides:5,freeMode:!0,centeredSlides:!0,slideToClickedSlide:!0,updateOnImagesReady:!1,onImagesReady:windowResizeFunc,disableAutoResize:!0,resizeEvent:"auto"});this.settings.swiperObjects.gallerySwiperVert=new Swiper("#swiper-gallery-vert-"+this.settings.sectionId,{initialSlide:2,spaceBetween:10,slidesPerView:1,loop:!1,roundLengths:!0,simulateTouch:!1}),typeof this.settings.swiperObjects.gallerySwiperVert.controller!="undefined"&&(this.settings.swiperObjects.gallerySwiperVert.controller.control=this.settings.swiperObjects.gallerySwiperThumbsVert,this.settings.swiperObjects.gallerySwiperThumbsVert.controller.control=this.settings.swiperObjects.gallerySwiperVert);var gallerySwiperThumbs=this.settings.swiperObjects.gallerySwiperThumbs=new Swiper("#swiper-gallery-thumbs-"+this.settings.sectionId,{spaceBetween:10,slidesPerView:5,loop:!0,loopedSlides:5,freeMode:!0,centeredSlides:!0,slideToClickedSlide:!0,updateOnImagesReady:!0,onImagesReady:windowResizeFunc,disableAutoResize:!0,resizeEvent:"auto"});this.settings.swiperObjects.gallerySwiper=new Swiper("#swiper-gallery-"+this.settings.sectionId,{spaceBetween:10,loop:!0,loopedSlides:5,roundLengths:!0,simulateTouch:!1}),typeof this.settings.swiperObjects.gallerySwiper.controller!="undefined"&&(this.settings.swiperObjects.gallerySwiper.controller.control=this.settings.swiperObjects.gallerySwiperThumbs,this.settings.swiperObjects.gallerySwiperThumbs.controller.control=this.settings.swiperObjects.gallerySwiper)},initProductVariant:function(){if(this.productSingleObject){var self2=this,productJSON=this.productSingleObject,productVariantObj=productJSON.variants;$(".main-product-select-"+productJSON.id+" .single-option-selector").on("change",function(){for(var option1=$(".main-product-select-"+productJSON.id+" #SingleOptionSelector-0").val()||null,option2=$(".main-product-select-"+productJSON.id+" #SingleOptionSelector-1").val()||null,option3=$(".main-product-select-"+productJSON.id+" #SingleOptionSelector-2").val()||null,flag=!0,i2=0,length=productVariantObj.length;i2"+productJSON.options[0]+""),productJSON.variants.size==1&&productJSON.variants[0].title.indexOf("Default")+1&&$(".selector-wrapper").hide();var str=window.location.href;if(str.indexOf("?variant=")+1)$("#ProductTemplate-"+productJSON.id).html()&&(UrlTrigger=!0),$("#FeaturedProduct").html()&&(home_featured_product_media=!0),$(".main-product-select-"+productJSON.id+" .single-option-selector").first().trigger("change");else{var found_one_in_stock=!1;for(variant in productJSON.variants)if(productJSON.variants[variant].available&&found_one_in_stock==!1){found_one_in_stock=!0;for(option in productJSON.options){var i=Object.keys(productJSON.options).indexOf(option);i>=0&&$(".main-product-select-"+productJSON.id+" .single-option-selector:eq("+i+")").val(productJSON.variants[variant].options[i].replace(/\s{2,}/g," ")).trigger("change")}$("#ProductTemplate-"+productJSON.id).html()&&(UrlTrigger=!0),$("#FeaturedProduct").html()&&(home_featured_product_media=!0)}}this.productVariantStyles()}},productVariantStyles:function(){$(".selector-wrapper").addClass("product-form__item"),$(".single-option-selector").addClass("product-form__input")},productVariantCallback:function(variant2,selector){if(variant2&&this.ProductStatus.updateContent(variant2.id),variant2&&UrlTrigger){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+variant2.id;window.history.replaceState({path:newurl},"",newurl)}var buy_now_btn=$(this.settings.selectors.addToCart).closest("form").find(".shopify-payment-button");if(variant2){var indexArray=[];$(".main-product-select-"+selector+" .single-option-selector option:selected").each(function(){indexArray.push($(this).index())});for(var form=jQuery("#ProductSelect-"+selector).closest("form"),i=0,length=variant2.options.length;ivariant2.price?($(this.settings.selectors.comparePrice).html(Shopify.formatMoney(variant2.compare_at_price,DT_THEME.moneyFormat)).removeClass("hide"),$(this.settings.selectors.price).addClass(this.settings.selectors.saleClasses),$(this.settings.selectors.saleLabel).removeClass("hide"),$(this.settings.selectors.comparePrice).closest("li").removeClass("hide")):($(this.settings.selectors.comparePrice).addClass("hide"),$(this.settings.selectors.comparePrice).closest("li").addClass("hide"),$(this.settings.selectors.saleLabel).addClass("hide"),$(this.settings.selectors.price).removeClass(this.settings.selectors.saleClasses)),variant2.available?($(this.settings.selectors.notifyForm).hide(),$(this.settings.selectors.addToCart).prop("disabled",!1),$(this.settings.selectors.addToCartText).text(DT_THEME.strings.addToCart),buy_now_btn.show()):($(this.settings.selectors.notifyForm).show(),$(this.settings.selectors.addToCart).prop("disabled",!0),$(this.settings.selectors.addToCartText).text(DT_THEME.strings.soldOut),buy_now_btn.hide()),jQuery.type(variant2)!=="null"){if(variantSkuData=$(this.settings.selectors.variantSkuData),variantSku=$(this.settings.selectors.variantSku),InventoryProduct=$(this.settings.selectors.InventoryProduct),variantInventory=$(this.settings.selectors.variantInventory),variant2.sku&&variantSkuData?(variantSkuData.addClass("attributes-visible").removeClass("attributes-hidden"),variantSku.html(variant2.sku),variantSkuData.is(":last-child")&&variantSkuData.prev("li").removeAttr("style")):(variantSkuData.addClass("attributes-hidden").removeClass("attributes-visible"),variantSku.html(""),variantSkuData.is(":last-child")&&variantSkuData.prev("li").css("padding-bottom","0")),InventoryProduct){InventoryProduct.addClass("attributes-visible").removeClass("attributes-hidden");for(var main_product_select=$("#ProductSelect-"+selector),optionsLength=main_product_select.find("option").length,i=0;i<=optionsLength;i++){var currentOption=main_product_select.find("option:nth-child("+i+")");if(currentOption.val()==variant2.id){var variant_inventory_management=currentOption.attr("data-inventory_management"),variant_inventory_policy=currentOption.attr("data-inventory_policy"),variant_inventory_quantity=currentOption.attr("data-inventory_quantity");break}else var variant_inventory_management="",variant_inventory_policy="",variant_inventory_quantity=""}variant_inventory_management=="shopify"&&variant_inventory_policy!="continue"?variant_inventory_quantity>0?variantInventory.html("In stock!"):variantInventory.html("Sorry! This product is currently out of stock."):variantInventory.html("In stock!")}}this.$container.find(".product-price").show(),$(this.settings.selectors.addToCart).show(),this.$container.find(".product_payments_btns").show(),variant2.available&&$(this.settings.selectors.addToCart).prop("disabled",!1)}else this.$container.find(".product-price").show(),this.$container.find(".product_payments_btns").show(),$(this.settings.selectors.addToCart).prop("disabled",!0),$(this.settings.selectors.addToCartText).text(DT_THEME.strings.unavailable),$(this.settings.selectors.comparePrice).addClass("hide"),$(this.settings.selectors.comparePrice).closest("li").addClass("hide"),$(this.settings.selectors.saleLabel).addClass("hide"),$(this.settings.selectors.price).removeClass(this.settings.selectors.saleClasses),$(this.settings.selectors.productPrice).html("Unavailable"),buy_now_btn.hide(),$(this.settings.selectors.notifyForm).show(),InventoryProduct&&variantInventory.html("Sold Out")}}),Product}();var swiperArr=[],container=$("#container");theme.CollectionPage=function(){function CollectionPage(container2){var $container=this.$container=$(container2),sectionId=this.sectionId=$container.attr("data-section-id"),container2=$("#container"),mp=$.magnificPopup.instance,swiperCarousel2,swiperCarouselThumbs;dt_initQuickShop(sectionId),$(".variant-option-color").each(function(){$(this).children().length==0?$(this).remove():$(this).show()}),$(".variant-option-size").each(function(){$(this).children().length==0?$(this).remove():$(this).show()}),dt_activateQuickShop()}return CollectionPage}(),theme.CollectionPage.prototype=_.assignIn({},theme.CollectionPage.prototype,{onSelect:function(){var mp=$.magnificPopup.instance;typeof mp!="undefined"&&mp.close()}});function dt_QuickCallback(variant2,selector){var productPanel=$('div.quick-shop-modal[data-id="'+selector+'"]');if(variant2&&variant2.featured_image){var slideId=variant2.featured_media.id,slide=$("#"+slideId),slideIndex=slide.index();swiperCarousel=new Swiper(".quick-swiper-container"),swiperCarousel.slideTo(slideIndex);var slideImg=slide.find("img"),src=slideImg.attr("data-original")}if(variant2){var indexArray=[];$("[data-id='"+selector+"'] .single-option-selector option:selected").each(function(){indexArray.push($(this).index())});for(var form=jQuery("#dt-sc-quick-ProductSelect-"+selector).closest("form"),i=0,length=variant2.options.length;ivariant2.price?(comparePrice.html(Shopify.formatMoney(variant2.compare_at_price,DT_THEME.moneyFormat)).show(),comparePrice.closest("li").show()):(comparePrice.html(""),comparePrice.closest("li").hide(),comparePrice.hide())),productPanel.find(".product-price").show(),addToCart.show(),productPanel.find(".product_payments_btns").show(),variant2.available&&addToCart.prop("disabled",!1)):(addToCart.val("Unavailable").show().addClass("disabled").prop("disabled",!0),addtoCartText.html("Sold Out"),comparePrice.html(""),comparePrice.closest("li").hide(),comparePrice.hide(),productPrice.html("Unavailable"),productPanel.find(".product-price").show(),productPanel.find(".product_payments_btns").show())}function dt_initQuickShop(sectionId){var sectionContainer=$("[data-section-id='"+sectionId+"']");sectionContainer.find(".quick-view-btn").on("click",function(e){if($(this).hasClass("quick-view-btn-opened"))$(this).removeClass("quick-view-btn-opened");else{var productId=$(this).attr("data-product-id"),quick_view_url=$(this).data("url"),btn=$(this);$("#quick-shop-modal-inner-"+productId).load(quick_view_url,function(resp){dt_QuickShopWindow(btn,productId),dt_QuickShopWindowReady(productId,sectionId)})}})}function dt_activateQuickShop(){if(typeof $().magnificPopup=="function"){var $quickShopBtns=$("a.quick-view-btn");$quickShopBtns.length&&$quickShopBtns.each(function(){var prod_id=$(this).data("product-id"),productId=$(this).attr("data-product-id"),quick_view_url=$(this).data("url"),btn=$(this);$(this).magnificPopup({type:"ajax",closeOnContentClick:!1,mainClass:"mfp-move-from-top",removalDelay:1e3,callbacks:{elementParse:function(item){item.src=item.src.split("?")[0]+"?view=quickview"},ajaxContentAdded:function(){var mp=$.magnificPopup.instance,cur=mp.st.el,href=$(cur).attr("href"),select=$(".mfp-move-from-top").find(".SingleOptionSelector-0");dt_QuickShopWindow(btn,productId),dt_QuickShopWindowReady(productId,prod_id),doProductSingleWishListPersistent(),select.length&&select.trigger("change")}}})})}}function dt_QuickShopWindowReady(productId,sectionId){var quickShopScreen=$("#product-quick-shop-"+productId);if($("#dt_QuickViewJson-"+productId).html()){quickShopScreen.find(".swatch :radio").on("change",function(){var optionIndex=jQuery(this).closest(".swatch").attr("data-option-index"),optionValue=jQuery(this).val().replace(/\s{2,}/g," ");jQuery(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")});var product=JSON.parse(document.getElementById("dt_QuickViewJson-"+productId).innerHTML);$(".quick-view-selector-"+product.id).on("change",function(){for(var $form=$(this).closest("form"),productVariantObj=product.variants,option1=$form.find(".SingleOptionSelector-0").val()||null,option2=$form.find(".SingleOptionSelector-1").val()||null,option3=$form.find(".SingleOptionSelector-2").val()||null,flag=!0,i2=0,length2=productVariantObj.length;i2=0&&quickShopScreen.find(".selector-wrapper").hide();for(var productJSON=product,i=0,length=productJSON.variants.length;i=0)for(var variant2=productVariantOptions[variantIndex],i=0,length=variant2.options.length;i0&&input.val(currentVal-1).change():type=="plus"&&input.val(currentVal+1).change()}),$(".input-number-"+sectionId).focusin(function(){$(this).data("oldValue",$(this).val())}),$(".input-number-"+sectionId).change(function(){minValue=0,maxValue=999,valueCurrent=parseInt($(this).val()),name=$(this).attr("name"),valueCurrent>=minValue?$(".btn-number[data-type='minus'][data-field='"+name+"']").removeAttr("disabled"):$(this).val($(this).data("oldValue")),valueCurrent<=maxValue?$(".btn-number[data-type='plus'][data-field='"+name+"']").removeAttr("disabled"):$(this).val($(this).data("oldValue"))})}theme.Helpers=function(){var touchDevice=!1;function setTouch(){touchDevice=!0,$("body").addClass("body-touch-device")}function isTouch(){return touchDevice}return{setTouch:setTouch,isTouch:isTouch}}();function onYouTubeIframeAPIReady(){theme.ProductVideo.loadVideos(theme.ProductVideo.hosts.youtube),theme.ProductVideo.youtubeApiLoaded=!0}theme.ProductVideo=function(){var videos={},hosts={html5:"html5",youtube:"youtube"},selectors={productMediaWrapper:"[data-product-single-media-wrapper]"},attributes={enableVideoLooping:"enable-video-looping",videoId:"video-id"};function init(videoContainer,sectionId){if(videoContainer.length){var videoElement=videoContainer.find("iframe, video")[0],mediaId=videoContainer.data("mediaId");if(videoElement){videos[mediaId]={mediaId:mediaId,sectionId:sectionId,host:hostFromVideoElement(videoElement),container:videoContainer,element:videoElement,ready:function(){createPlayer(this)}};var video=videos[mediaId];switch(video.host){case hosts.html5:window.Shopify.loadFeatures([{name:"video-ui",version:"1.0",onLoad:setupPlyrVideos}]),theme.LibraryLoader.load("plyrShopifyStyles");break;case hosts.youtube:$("#youtube-sdk").length||theme.LibraryLoader.load("youtubeSdk");break}}}}function setupPlyrVideos(errors){if(errors){fallbackToNativeVideo();return}loadVideos(hosts.html5)}function createPlayer(video){if(!video.player){var productMediaWrapper=video.container.closest(selectors.productMediaWrapper),enableLooping=productMediaWrapper.data(attributes.enableVideoLooping);switch(video.host){case hosts.html5:video.player=new Shopify.Plyr(video.element,{loop:{active:enableLooping}});break;case hosts.youtube:var videoId=productMediaWrapper.data(attributes.videoId);video.player=new YT.Player(video.element,{videoId:videoId,events:{onStateChange:function(event){event.data===0&&enableLooping&&event.target.seekTo(0)}}});break}productMediaWrapper.on("mediaHidden xrLaunch",function(){video.player&&(video.host===hosts.html5&&video.player.pause(),video.host===hosts.youtube&&video.player.pauseVideo&&video.player.pauseVideo())}),productMediaWrapper.on("mediaVisible",function(){theme.Helpers.isTouch()||video.player&&(video.host===hosts.html5&&video.player.play(),video.host===hosts.youtube&&video.player.playVideo&&video.player.playVideo())})}}function hostFromVideoElement(video){return video.tagName==="VIDEO"?hosts.html5:video.tagName==="IFRAME"&&/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(video.src)?hosts.youtube:null}function loadVideos(host){for(var key in videos)if(videos.hasOwnProperty(key)){var video=videos[key];video.host===host&&video.ready()}}function fallbackToNativeVideo(){for(var key in videos)if(videos.hasOwnProperty(key)){var video=videos[key];if(video.nativeVideo)continue;video.host===hosts.html5&&(video.element.setAttribute("controls","controls"),video.nativeVideo=!0)}}function removeSectionVideos(sectionId){for(var key in videos)if(videos.hasOwnProperty(key)){var video=videos[key];video.sectionId===sectionId&&(video.player&&video.player.destroy(),delete videos[key])}}return{init:init,hosts:hosts,loadVideos:loadVideos,removeSectionVideos:removeSectionVideos}}(),theme.faqBlocks=function(){$(document).on("click",".dt-sc-accordion-btn",function(){if(!open_accordion){open_accordion=!0;var active_accordion=$(this).index(".dt-sc-accordion-btn"),active_accordion_height=$(".dt-sc-accordion-content-inner").eq(active_accordion).outerHeight();$(".dt-sc-accordion-btn h5").removeClass("active"),$(this).find("h5").addClass("active"),$(".dt-sc-accordion-content").stop().animate({height:0},transition),$(".dt-sc-accordion-content").eq(active_accordion).stop().animate({height:active_accordion_height},transition),setTimeout(function(){open_accordion=!1},transition)}});var transition=500,open_accordion=!1}(),theme.notify=function(){$(document).on("click","#notify-me",function(){return $("#notify-me-wrapper").fadeIn(),!1})}(),$(document).ready(function(){var sections=new theme.Sections;sections.register("product-page",theme.ProductPage),sections.register("slideshow-section",theme.HomeSlideshow),sections.register("collection-template",theme.CollectionPage),sections.register("store-availability",theme.ProductStatus),sections.register("brand-logos-section",theme.brandLogos),sections.register("about-brand-logos-section",theme.brandLogos),sections.register("home-image-gallery",theme.imageGallery),sections.register("testimonials-section",theme.testimonials),sections.register("about-testimonials-section",theme.testimonials),sections.register("featured-collection-section",theme.featuredCollection),sections.register("featured-blog-section",theme.featuredblog),sections.register("faq-block-section",theme.faqBlocks),sections.register("home-product-carousel-section",theme.indexProductCarousel),sections.register("home-product-tab-carousel-section",theme.indexProductTabCarousel),sections.register("product-sidebar-carousel-section",theme.productSidebarCarousel),sections.register("home-blockCarousel-section",theme.productBlockCarousel),sections.register("notify",theme.notify),sections.register("search-page",theme.searchPage),sections.register("home-tab-grid",theme.tabGrid),sections.register("home-tab-sidebar-collection",theme.tabGrid),sections.register("number-counter-section",theme.numberCounter),$(document).on("shopify:section:select",function(e){var $target=$(e.target),sectionID=e.originalEvent.detail.sectionId,$handle=$("#shopify-section-handle-"+sectionID),handle_class=$handle.length?$handle.attr("data-bg-type"):null;handle_class&&$target.addClass(handle_class)});var selectors={image:"[data-image]",lazyloaded:".lazyloaded"};function onLoadHideLazysizesAnimation(){var alreadyLazyloaded=document.querySelectorAll(".lazyloaded");alreadyLazyloaded.forEach(function(image){removeImageLoadingAnimation(image)})}onLoadHideLazysizesAnimation()});function removeImageLoadingAnimation(image){var imageWrapper=image.hasAttribute("data-image-loading-animation")?image:image.closest("[data-image-loading-animation]");imageWrapper&&imageWrapper.removeAttribute("data-image-loading-animation")}$(document).one("touchstart",function(){theme.Helpers.setTouch()}),$.cookie("announcementCookie")=="closed"&&$(".announcement-bar").hide(),$(".announcement-bar a.close").bind("click",function(){$(".announcement-bar").css({height:"0",padding:"0",opacity:"0","z-index":"-1"}),$.cookie("announcementCookie","closed",{expires:1,path:"/"})}),$(document).ready(function($2){$2(".announcement-bar").each(function(){$2(this).css({height:$2(this).outerHeight()+"px"})})});function dt_sc_parallax(){var $bgs=[],$contents=[],$parallax_window=$(window),scrollTop=window.transY||document.documentElement.scrollTop;$('[data-style="parallax"]').each(function(){var $bgImage=$(this);$bgImage.__speed=$bgImage.data("speed")||1,$bgImage.__pOff=$bgImage.offset().top,$bgs.push($bgImage)}),$parallax_window.on("scroll resize",function(){scrollTop=window.transY||document.documentElement.scrollTop,$contents.forEach(function($contentObj){var transformY=$contentObj.__pOff-scrollTop/$contentObj.__speed;$contentObj.css("top",transformY)}),$bgs.forEach(function($bgImage){var transformY=-((scrollTop-$bgImage.__pOff)/$bgImage.__speed);$bgImage.css({backgroundPosition:"50% "+transformY/2+"px"})})}),$parallax_window.trigger("scroll")}dt_sc_parallax(),$(document).on("click",".color-values",function(){$(this).hasClass("active")?$(".color-values").removeClass("active"):($(".color-values").removeClass("active"),$(this).addClass("active"))}),$("body").on("click",".swatch-element.color",function(){$(this).next("label").find("i")}),$("body").on("click",".swatch span",function(){if($(this).data("image").indexOf("no-image")==-1&&$(this).parents(".products").find(".image_group .featured-image").attr("src",$(this).data("image")),$(this).parents(".swatch").hasClass("color")){var variant2=$(this).data("id");$(this).parents(".shopify-product-form").find(".variant-push").val(variant2);var swatch_item=$(this).data("variant-item");$(this).parents(".shopify-product-form").find(".variant-option-size .size-values").removeClass("active"),$(this).parents(".shopify-product-form").find(".variant-option-size .swatch").each(function(){var swatch_size_vars=$(this).find("span").data("variant-title");swatch_size_vars=swatch_size_vars.split("/"),swatch_size_vars=$.map(swatch_size_vars,$.trim),swatch_size_vars=$.map(swatch_size_vars,function(n){return n.toLowerCase()}),swatch_size_vars=$.map(swatch_size_vars,function(n){return n.replace(/ /g,"-")}),$.inArray(swatch_item,swatch_size_vars)>=0&&$(this).parent(".size-values").toggleClass("active")})}if($(this).parents(".swatch").hasClass("size")){var variant2=$(this).data("id");$(this).parents(".shopify-product-form").find(".variant-push").val(variant2)}}),$(window).width()<1280&&$(".has-sidebar").length>0&&function(){var toggleFilter=function(){$(".toggleIcon").on("click",function(){$(this).hasClass("clicked")?($(this).removeClass("clicked"),$(this).parents(".has-sidebar").removeClass("open")):($(this).addClass("clicked"),$(this).parents(".has-sidebar").addClass("open"))})};$(document).ready(function(){toggleFilter()}),$(window).bind("resize",function(){toggleFilter()}),$(".js-close-modal").click(function(){$(".has-sidebar").removeClass("open")})}(),window.theme=window.theme||{},theme.init=function(){theme.drawersInit(),theme.cartPage()},theme.drawersInit=function(){theme.RightDrawer=new theme.Drawers("CartDrawer","right",{onDrawerOpen:ajaxCart.load})},theme.cartPage=function(){$("body").on("click",".cart__note-add",function(){$(this).addClass("is-hidden"),$(".cart__note").addClass("is-active"),ajaxifyShopify.sizeDrawer()})},theme.Drawers=function(){var Drawer=function(id,position,options){var defaults={close:".js-drawer-close",open:".js-drawer-open-"+position,openClass:"js-drawer-open",dirOpenClass:"js-drawer-open-"+position};if(this.$nodes={parent:$("body, html"),page:$("#container")},this.config=$.extend(defaults,options),this.position=position,this.$drawer=$("#"+id),!this.$drawer.length)return!1;this.drawerIsOpen=!1,this.init()};return Drawer.prototype.init=function(){$(this.config.open).on("click",$.proxy(this.open,this)),this.$drawer.on("click",this.config.close,$.proxy(this.close,this))},Drawer.prototype.open=function(evt){$("body").addClass("shifter-enabled");var externalCall=!1;if(evt?evt.preventDefault():externalCall=!0,evt&&evt.stopPropagation&&(evt.stopPropagation(),this.$activeSource=$(evt.currentTarget)),this.drawerIsOpen&&!externalCall)return this.close();this.$drawer.prepareTransition(),this.$nodes.parent.addClass(this.config.openClass+" "+this.config.dirOpenClass),this.drawerIsOpen=!0,this.trapFocus({$container:this.$drawer,$elementToFocus:this.$drawer.find(".drawer__close-button"),namespace:"drawer_focus"}),this.config.onDrawerOpen&&typeof this.config.onDrawerOpen=="function"&&(externalCall||this.config.onDrawerOpen()),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","true"),this.$nodes.parent.on("keyup.drawer",$.proxy(function(evt2){if(evt2.keyCode===27)return this.close(),!1},this)),this.$nodes.page.on("touchmove.drawer",function(){return!1}),this.$nodes.page.on("click.drawer",$.proxy(function(){return $("body").removeClass("shifter-enabled"),this.close(),!1},this))},Drawer.prototype.close=function(){this.drawerIsOpen&&($(document.activeElement).trigger("blur"),this.$drawer.prepareTransition(),this.$nodes.parent.removeClass(this.config.dirOpenClass+" "+this.config.openClass),this.drawerIsOpen=!1,this.removeTrapFocus({$container:this.$drawer,namespace:"drawer_focus"}),this.$nodes.page.off(".drawer"),this.$nodes.parent.off(".drawer"))},Drawer.prototype.trapFocus=function(options){var eventName=options.eventNamespace?"focusin."+eventNamespace:"focusin";options.$elementToFocus||(options.$elementToFocus=options.$container),options.$container.attr("tabindex","-1"),options.$elementToFocus.focus(),$(document).on(eventName,function(evt){options.$container[0]!==evt.target&&!options.$container.has(evt.target).length&&options.$container.focus()})},Drawer.prototype.removeTrapFocus=function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$container&&options.$container.length&&options.$container.removeAttr("tabindex"),$(document).off(eventName)},Drawer}(),$(theme.init),$(window).load(function(){$(".se-pre-con").fadeOut("slow")}),$(document).ready(function(){$("body").hasClass("template-cart")?console.log("select2 in-active"):$("select").select2({minimumResultsForSearch:1/0,theme:"classic"}),$(".shopify-currency-form select").on("select2:select",function(e){$("#currency_form").submit()});function currencyFormSubmit(event){event.target.form.submit()}document.querySelectorAll(".shopify-currency-form select").forEach(function(element){element.addEventListener("change",currencyFormSubmit)}),$("#accordian li").click(function(){var link=$(this),closest_ul=link.closest("ul"),parallel_active_links=closest_ul.find(".active"),closest_li=link.closest("li"),link_status=closest_li.hasClass("active"),count=0;closest_ul.find("ul").slideUp(function(){++count==closest_ul.find("ul").length&¶llel_active_links.removeClass("active")}),link_status||(closest_li.children("ul").slideDown(),closest_li.addClass("active"))}),$("#to-top").on("click",function(e){e.preventDefault();var target=this.hash,$target=$(target);$("html, body").stop().animate({scrollTop:$target.offset().top},900,"swing")})}),$(window).scroll(function(){var screenHeight=$(this).scrollTop();screenHeight>800?$("#to-top").css("display","block"):$("#to-top").css("display","none")}); //# sourceMappingURL=/cdn/shop/t/7/assets/dt-theme.js.map?v=85438922313922973291623215982