var usePageDots=Shopify.theme_settings.page_dots_enabled,imageFunctions={zoom:function(){var $image=$(event.target),zoomSrc=$image.data("zoom-src");zoomSrc&&$image.wrap('').css("display","block").parent().zoom({url:zoomSrc,touch:!1,magnify:1})},linkGalleryAndCarousel:function($gallery,$carousel){$carousel.find(".gallery-cell:nth-child(1)").addClass("is-nav-selected"),$carousel.on("click",".gallery-cell",function(){var index=$(this).index();$carousel.find(".is-nav-selected").removeClass("is-nav-selected"),$(this).addClass("is-nav-selected"),$gallery.flickity("select",index)}),$gallery.on("select.flickity",function(){var galleryData=$(this).data("flickity");galleryData&&($carousel.find(".is-nav-selected").removeClass("is-nav-selected"),$carousel.find(".gallery-cell:nth-child("+(galleryData.selectedIndex+1)+")").addClass("is-nav-selected"))})},fullWidth:function(images,imageContainer){$(images).each(function(){var $image=$(this),alt=$image.attr("alt"),src=$image.attr("src");if(alt.indexOf("[")>=0){$image.remove();var shortcodes=alt.match(/\[(.*?)\]/ig);alt=alt.replace(/\[(.*?)\]/ig,"");var captionClass=$.map(shortcodes,function(value,index){return value=value.replace(/[\[\]']+/g,""),value}),caption=['
','
','

'+alt+"

","
","
"].join("");$image.attr({alt:alt,class:"lazyload blur-up",src:src,dataSizes:"auto"});var image=$image.prop("outerHTML"),banner='";$(imageContainer).append(banner)}})},showSecondaryImage:function(){Shopify.media_queries.large.matches&&($(".has-secondary-media-swap").off().on("mouseenter",function(){Shopify.theme_settings.product_form_style=="dropdown"&&$(this).find(".product_gallery").toggleClass("secondary-media-hidden"),$(this).find(".image-element__wrap img").toggleClass("secondary-media-hidden"),$(this).find("[data-html5-video]").toggleClass("secondary-media-hidden"),$(this).find(".external-video__container").toggleClass("secondary-media-hidden"),videoFeature.enableVideoOnHover($(this))}),$(".has-secondary-media-swap").on("mouseleave",function(){Shopify.theme_settings.product_form_style=="dropdown"&&$(this).find(".product_gallery").toggleClass("secondary-media-hidden"),$(this).find(".image-element__wrap img").toggleClass("secondary-media-hidden"),$(this).find("[data-html5-video]").toggleClass("secondary-media-hidden"),$(this).find(".external-video__container").toggleClass("secondary-media-hidden"),videoFeature.enableVideoOnHover($(this))}))},flickityIosFix:function(){var touchingCarousel=!1,touchStartCoords;document.body.addEventListener("touchstart",function(e){if(e.target.closest(".flickity-slider"))touchingCarousel=!0;else{touchingCarousel=!1;return}touchStartCoords={x:e.touches[0].pageX,y:e.touches[0].pageY}}),document.body.addEventListener("touchmove",function(e){if(touchingCarousel&&e.cancelable){var moveVector={x:e.touches[0].pageX-touchStartCoords.x,y:e.touches[0].pageY-touchStartCoords.y};Math.abs(moveVector.x)>7&&e.preventDefault()}},{passive:!1})}},recentlyViewed={init:function(){var productHandle,rvCookie,rvProducts,displayProducts,rvProductArray;if($(".js-product_section[data-rv-handle]").length?(productHandle=$(".js-product_section").data("rv-handle").toString(),rvCookie=Cookies.get("recentlyViewed"),rvProducts=recentlyViewed.getCookieProducts(rvCookie,productHandle)):($(".recently-viewed__section").length||$(".js-sidebar-recently-viewed").length)&&(rvCookie=Cookies.get("recentlyViewed"),rvProducts=recentlyViewed.getCookieProducts(rvCookie,productHandle)),rvProducts&&(rvProductArray=unescape(rvProducts).split(",")),productHandle?(!$.inArray(productHandle,rvProductArray)!==-1&&(displayProducts=[],rvProductArray.unshift(productHandle),$.each(rvProductArray,function(i2,el){$.inArray(el,displayProducts)===-1&&displayProducts.push(el)})),recentlyViewed.setCookieProducts(displayProducts)):displayProducts=rvProductArray,$(".recently-viewed__section").length){var parent=".recently-viewed__section",recentlyViewedProductsLoaded=$(parent).data("recently-viewed-items-loaded");if(recentlyViewedProductsLoaded)return!1;recentlyViewed.getProductInformation(parent,displayProducts,productHandle)}else if($(".js-recently-viewed .rv-main").length){var parent=".js-recently-viewed",recentlyViewedProductsLoaded=$(parent).data("recently-viewed-items-loaded");if(recentlyViewedProductsLoaded)return!1;recentlyViewed.getProductInformation(parent,displayProducts,productHandle)}if($(".sidebar .js-sidebar-recently-viewed").length){var parent=".sidebar .js-sidebar-recently-viewed",recentlyViewedProductsLoaded=$(parent).data("recently-viewed-items-loaded");if(recentlyViewedProductsLoaded)return!1;productHandle?recentlyViewed.getProductInformation(parent,displayProducts,productHandle):recentlyViewed.getProductInformation(parent,displayProducts)}},getCookieProducts:function(rvCookie,productHandle){return!rvCookie&&productHandle&&Cookies.set("recentlyViewed",productHandle,{expires:30,path:"",domain:"",sameSite:"None",secure:!0}),rvCookie=Cookies.get("recentlyViewed"),rvCookie},setCookieProducts:function(rvProductArray){Cookies.set("recentlyViewed",escape(rvProductArray.join(",")),{expires:30,path:"",domain:"",sameSite:"None",secure:!0})},getProductInformation:function(parent,displayProducts,productHandle){$(parent).attr("data-recently-viewed-items-loaded","true"),productHandle&&displayProducts.splice($.inArray(productHandle,displayProducts),1);var productLimit=$(parent).data("visible-products");productLimit&&displayProducts&&(displayProducts=displayProducts.slice(0,productLimit)),$.each(displayProducts,function(index,value){value&&($(parent).removeClass("hidden"),$(parent).parents(".sidebar-block").show(),$.ajax({type:"GET",url:"/products/"+value+"?view=rv",success:function(data){var rvProduct=$(data).find(".js-recently-viewed-product");$(parent).find(" .rv-box-"+index).append(rvProduct),Currency.show_multiple_currencies&¤cyConverter.convertCurrencies(),Shopify.theme_settings.collection_secondary_image&&imageFunctions.showSecondaryImage();var $video=rvProduct.find("[data-html5-video] video, [data-youtube-video]");$video.length>0&&videoFeature.setupPlayerForRecentlyViewedProducts(rvProduct.find("[data-html5-video] video, [data-youtube-video]"))},error:function(x,t,m){console.log(x),console.log(t),console.log(m)},dataType:"html"})),$(parent).find(".rv-main").hasClass("js-rv-slider")?(displayProducts.length<=productLimit?$(".js-rv-slider .gallery-cell").eq(displayProducts.length).nextAll().addBack().remove():$(".js-rv-slider .gallery-cell").eq(productLimit).nextAll().addBack().remove(),recentlyViewed.createSlider(parent,productLimit)):$(parent).find(".rv-main").hasClass("js-rv-grid")&&(displayProducts.length<=productLimit?$(".js-rv-grid .thumbnail").eq(displayProducts.length).nextAll().addBack().remove():$(".js-rv-grid .thumbnail").eq(productLimit).nextAll().addBack().remove())})},createSlider:function(el,productsAvailable){var products_per_slide=$(".js-rv-slider").data("products-per-slide"),products_generated=$(".js-rv-slider").find(".gallery-cell").length,products_available=$(".js-rv-slider").data("products-available"),cellAlign="left",wrapAround=!0,prevNextButtons=!0,initialIndex;products_per_slide>=products_generated&&(cellAlign="center",wrapAround=!1,prevNextButtons=!1),products_per_slide=="2"&&products_available>products_per_slide||products_per_slide=="4"&&products_available>products_per_slide||products_per_slide=="6"&&products_available>products_per_slide?initialIndex=0:products_per_slide=="3"&&products_available?initialIndex=1:products_per_slide=="5"&&products_available?initialIndex=2:products_per_slide=="7"&&products_available&&(initialIndex=3),$(".js-rv-slider").flickity({lazyLoad:2,imagesLoaded:!0,prevNextButtons:prevNextButtons,wrapAround:wrapAround,cellAlign:cellAlign,pageDots:usePageDots,contain:!0,freeScroll:!0,arrowShape:arrowSize,initialIndex:initialIndex}),$(".js-rv-slider").addClass("slider-initialized")}},enableLoadMoreButton=function(parentClass){var $grid=parentClass+"[data-load-more--grid]",$gridItems=parentClass+" [data-load-more--grid-item]";$("body").on("click","[data-load-more]",function(e){e.preventDefault();var $button=$(this),url4=$button.attr("href");loadNextPage(url4,$button)});function loadNextPage(url4,$button){$.ajax({type:"GET",dataType:"html",url:url4,beforeSend:function(){$button.addClass("is-loading"),$(".load-more__icon").addClass("loading-in-progress").css({height:"40px",width:"40px",opacity:"1"})},success:function(data){$button.removeClass("is-loading"),$(".load-more__icon").removeClass("loading-in-progress").css({height:"0",width:"0",opacity:"0"});var thumbnails=$(data).find($gridItems),loadMoreButtonUrl=$(data).find("[data-load-more]").attr("href");$("[data-load-more]").attr("href",loadMoreButtonUrl),$($grid).first().append(thumbnails).append($(".js-load-more")),typeof loadMoreButtonUrl=="undefined"&&$("[data-load-more]").addClass("is-hidden")},error:function(x,t,m){console.log(x),console.log(t),console.log(m),location.replace(location.protocol+"//"+location.host+filterURL)}})}},enableLoadMoreProducts=function(){$("body").on("click",".js-load-more a",function(e){return enableInfiniteScroll(),e.stopPropagation(),!1})},enableInfiniteScroll=function(){if($(".collection-matrix").length)var infiniteScroll=new Waypoint.Infinite({element:$(".collection-matrix")[0],items:".collection-matrix",more:"[data-load-more]",loadingClass:"loading-in-progress",onBeforePageLoad:function(){$(".js-load-more").hide()},onAfterPageLoad:function(data){$(".collection-matrix > .collection-matrix .thumbnail").unwrap(".collection-matrix"),Shopify.theme_settings.enable_shopify_review_comments&&Shopify.theme_settings.enable_shopify_collection_badges&&SPR.$(document).ready(function(){return SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()}),Currency.show_multiple_currencies&¤cyConverter.convertCurrencies(),Shopify.PaymentButton&&Shopify.PaymentButton.init(),productPage.init(),Shopify.theme_settings.quick_shop_enabled&&quickShop.init(),hideNoScript(),videoFeature.init(),Shopify.theme_settings.collection_secondary_image&&imageFunctions.showSecondaryImage(),Waypoint.refreshAll()}})},enableLoadMoreSearch=function(){$("body").on("click",".js-load-more a",function(e){return enableInfiniteSearchScroll(),e.stopPropagation(),!1})},enableInfiniteSearchScroll=function(){if($(".search-matrix").length)var infiniteSearchScroll=new Waypoint.Infinite({element:$(".search-matrix")[0],items:".search-matrix",more:"[data-load-more]",loadingClass:"loading-in-progress",onBeforePageLoad:function(){$(".js-load-more").hide()},onAfterPageLoad:function(data){$(".search-matrix > .search-matrix .thumbnail").unwrap(".search-matrix"),Shopify.theme_settings.enable_shopify_review_comments&&Shopify.theme_settings.enable_shopify_collection_badges&&SPR.$(document).ready(function(){return SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()}),Currency.show_multiple_currencies&¤cyConverter.convertCurrencies(),Shopify.PaymentButton&&Shopify.PaymentButton.init(),productPage.init(),Shopify.theme_settings.quick_shop_enabled&&quickShop.init(),hideNoScript(),videoFeature.init(),Shopify.theme_settings.collection_secondary_image&&imageFunctions.showSecondaryImage()}})},hideNoScript=function(){$(".image__container .noscript").addClass("hidden")};if(Shopify.queryParams={},location.search.length)for(var aKeyValue,i=0,aCouples=location.search.substr(1).split("&");i1&&(Shopify.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]));var quickFilter={init:function(){var selectedOptions=[],query="",currentTags="",url1=$.url("1")?"/"+$.url("1")+"/":"";if(url1.length<=4?(url2=$.url("2")?$.url("2")+"/":"",url3=$.url("3")?$.url("3")+"/":"",path=url1+url2+url3):(url2=$.url("2")?$.url("2")+"/":"",path=url1+url2),$("#sort-by").length?query=$("#sort-by").val():query=url("?sort_by"),$("#tag_filter").length){var $tagFilterValue=$("#tag_filter").val();if($("#tag_filter").data("default-collection")!=$tagFilterValue){urlTag=$tagFilterValue.substr($tagFilterValue.lastIndexOf("/")+1);var tagFilterUrl=$tagFilterValue.substr($tagFilterValue);$("#tag_filter option").removeAttr("selected"),$('#tag_filter option[value="'+tagFilterUrl+'"]').attr("selected","selected"),urlTag!="all"&&($.inArray(urlTag,selectedOptions)>-1||selectedOptions.unshift(urlTag))}}$("[data-option-filter] input:checked").each(function(){selectedOptions.push($(this).val())}),selectedOptions=$.makeArray(selectedOptions),$.each(selectedOptions,function(i2,value){i2!=selectedOptions.length-1?currentTags+=selectedOptions[i2]+"+":currentTags+=selectedOptions[i2]}),Shopify.queryParams.sort_by=query,query="?"+$.param(Shopify.queryParams),quickFilter.processUrl(path,currentTags,query)},updateView:function(filterURL2){$.ajax({type:"GET",url:filterURL2,beforeSend:function(){$(".collection-matrix").addClass("fadeOut animated loading-in-progress filter-loading"),Waypoint.destroyAll()},success:function(data){$(".collection-matrix").removeClass("loading-in-progress"),$(".collection-matrix").removeClass("filter-loading");var filteredBreadcrumb=$(data).find(".breadcrumb_text").html();$(".breadcrumb_text").html(filteredBreadcrumb);var filteredPagination=$(data).find(".paginate").html();$(".paginate").html(filteredPagination);var filteredSidebar=$(data).find(".sidebar").html();$(".sidebar").html(filteredSidebar);var filteredPageLinks=$(data).find(".paginate").html();$(".paginate").empty(),$(".paginate").html(filteredPageLinks);var filteredData=$(data).find(".collection-matrix");$(".collection-matrix").remove(),filteredData.insertBefore($(".load-more__icon")),window.history&&window.history.pushState&&window.history.pushState("","",filterURL2),$(".sidebar__collection-filter").length&&collectionSidebarFilter.init(),Shopify.theme_settings.pagination_type=="infinite_scroll"&&enableInfiniteScroll(),Currency.show_multiple_currencies&¤cyConverter.convertCurrencies(),Shopify.theme_settings.enable_shopify_review_comments&&Shopify.theme_settings.enable_shopify_collection_badges&&SPR.$(document).ready(function(){return SPR.registerCallbacks(),SPR.initRatingHandler(),SPR.initDomEls(),SPR.loadProducts(),SPR.loadBadges()}),recentlyViewed.init(),$(".js-product_section .product_form_options").each(function(){new Shopify.OptionSelectors($(this).data("select-id"),{product:$(this).data("product"),onVariantSelected:selectCallback,enableHistoryState:$(this).data("enable-state")})}),productPage.init(),$("body").off("click",".swatch-element"),productPage.productSwatches(),$(".swatch_options input").each(function(){$(this).is(":checked")&&quickShop.toggleSwatchImages($(this))}),$(".swatch_options label").on("click",function(){quickShop.toggleSwatchImages($(this))}),Shopify.PaymentButton&&Shopify.PaymentButton.init()},error:function(x,t,m){console.log(x),console.log(t),console.log(m),location.replace(location.protocol+"//"+location.host+filterURL2)},dataType:"html"})},processUrl:function(path2,tags,query){var query=query.replace(/\page=(\w+)&/,""),urlString="";urlString=path2+tags+query,quickFilter.updateView(urlString)}},searchAutocomplete={vars:{term:"",searchPath:Shopify.routes.search_url,displayTimer:""},init:function(){this.unload(),$("[data-autocomplete-true]").on("focus",function(){$(this).parents("[data-autocomplete-true]").find(".search__results-wrapper").show()}),$(document).on("click focusout",function(e){if(Shopify.media_queries.large.matches){var searchForm=$(e.target).parents(".search__form");searchForm.length===0&&$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")}}),$('[data-dropdown-rel="search"], [data-autocomplete-true] input').on("click touchstart",function(e){if(Shopify.media_queries.medium.matches){e.preventDefault(),e.stopPropagation();var formType=$(this).closest("form").find('[name="type"]').val(),position=$(document).scrollTop();searchAutocomplete.showMobileSearch(formType,position)}}),$(".search-close").on("click touchstart",function(){$("body").removeClass("is-active"),$(".dropdown_link").removeClass("active_link"),$(".dropdown_container").hide(),$(".mobile_nav").find("div").removeClass("open"),$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")}),$("[data-autocomplete-true] form").on("submit",function(e){e.preventDefault();var formValue=$(this).find('input[name="q"]').val(),cleanFormValue=encodeURI(formValue);if($(this).find('[name="type"]').length>0)var searchType=$(this).find('[name="type"]').val();else var searchType=Shopify.theme_settings.search_option;cleanFormValue==null?window.location.href=Shopify.routes.search_url+"?type="+searchType:window.location.href=searchAutocomplete.vars.searchPath+"?type="+searchType+"&q="+cleanFormValue+"*"}),$("[data-autocomplete-true] form").each(function(){var $this=$(this),input=$this.find('input[name="q"]');$('
').appendTo($this),input.attr("autocomplete","off").on("input",function(){clearTimeout(searchAutocomplete.vars.displayTimer),$(this).val().length>3?(searchAutocomplete.vars.term=$(this).val(),searchAutocomplete.getResults(searchAutocomplete.vars.term,$this)):$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")})})},getResults:function(term,$this){if($this.find('[name="type"]').length>0)var searchType=$this.find('[name="type"]').val();else var searchType=Shopify.theme_settings.search_option;jQuery.getJSON("/search/suggest.json",{q:term,resources:{type:searchType,limit:Shopify.theme_settings.search_items_to_display,options:{unavailable_products:"last",fields:"title,body,variants.title,vendor,product_type,tag"}}}).done(function(response){var suggestions=[response.resources.results.products,response.resources.results.pages,response.resources.results.articles],filteredResults=[];$.each(suggestions,function(index,suggestion){suggestion!==void 0&&suggestion.length>0&&filteredResults.push(suggestion)}),searchAutocomplete.vars.displayTimer=setTimeout(function(){searchAutocomplete.displayResults(filteredResults[0],$this)},500)})},displayResults:function(results,$this){var $resultsWrapper=$this.find(".search__results-wrapper"),$resultsList=$this.find(".search__results");if($resultsWrapper.show(),$resultsList.empty(),$this.find('[name="type"]').length>0)var searchType=$this.find('[name="type"]').val();else var searchType=Shopify.theme_settings.search_option;if(results&&results.length>0)$.each(results,function(index,result){var link=$('').attr("href",result.url);if(Shopify.routes.root_url!=="/"&&(link=$('').attr("href",Shopify.routes.root_url+result.url)),result.price){var formatPrice2=function(price){return''+Shopify.formatMoney(price,$("body").data("money-format"))+""},formatPrice=formatPrice2;if(result.available===!0)if(result.compare_at_price_max>result.price_max||result.compare_at_price_min>result.price_min)var itemPrice=formatPrice2(result.price)+' '+formatPrice2(result.compare_at_price_max)+"";else if(result.price>0)if(result.price_min!=result.price_max)var itemPrice=Shopify.translation.from_text+" "+formatPrice2(result.price);else var itemPrice=formatPrice2(result.price);else var itemPrice=Shopify.theme_settings.free_text;else var itemPrice=Shopify.theme_settings.sold_out_text;result.image&&link.append('
'),link.append('
'+result.title+'
'+itemPrice+"
")}else result.summary_html?(result.image!="NULL"&&link.append('
'),link.append('
'+result.title+'
'+result.summary_html.replace(/(<([^>]+)>)/ig,"").slice(0,25)+"
")):result.published_at&&link.append('
'+result.title+'
'+result.body.replace(/(<([^>]+)>)/ig,"").slice(0,25)+"
");link.wrap('
  • '),$resultsList.append(link.parent())}),$resultsList.prepend('
  • '+Shopify.translation.all_results+'
  • '),(Currency.show_multiple_currencies||Currency.native_multi_currency)&¤cyConverter.init(),$resultsList.parents(".search__results-wrapper").addClass("results-found");else{var noResults='
  • '+Shopify.translation.no_results+"
  • ";$resultsList.append(noResults),$resultsList.parents(".search__results-wrapper").removeClass("results-found")}$resultsList.show()},showMobileSearch:function(formType,position){$("body").css("max-height",window.innerHeight),$(".mobile-search").fadeIn(200),/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1?$(".mobile-search input#q").focus():setTimeout(function(){$(".mobile-search input#q").focus()},205),document.body.style.position="fixed",document.body.style.top="-"+position+"px",$(".mobile-search").css("top",position);var searchHeight=window.innerHeight-60;$(".mobile-search .search__results-wrapper").css("max-height",searchHeight),formType?$('.mobile-search [name="type"]').val(formType):$('.mobile-search [name="type"]').val(Shopify.theme_settings.search_option),$(".search-form .close-search").on("click touchstart",function(e){e.preventDefault(),e.stopPropagation(),searchAutocomplete.hideMobileSearch(position),$("[data-autocomplete-true] .search__results-wrapper").hide().removeClass("results-found")}),$(".search-form .submit-search").on("click touchstart",function(e){$(this).parents("form").submit()})},hideMobileSearch:function(position){$("body").css("max-height","none"),document.body.style.position="",document.body.style.top="",window.scrollTo(0,position),$(".mobile-search").fadeOut(200),$('.mobile-search [name="q"]').val(""),$("body").off("focus",".search-form .close-search"),$("body").off("focus",".search-form .submit-search")},unload:function(){$("body").off("focus","[data-autocomplete-true] input"),$('input[name="q"]').off(),$('[data-dropdown-rel="search"], [data-autocomplete-true] input').off(),$(".search__results-wrapper").remove()}},collectionSidebarFilter={init:function(){$(".filter-active-tag input:checked").parents(".filter-active-tag").siblings(".filter-all-tags").hide(),$(".toggle-all--true .toggle_list .filter-active-tag input:checked").parents("ul.toggle_list").prev().click();var queryString=window.location.search;queryString.indexOf("sort_by")>0&&$(".toggle-all--true .toggle_list .filter-active-tag input").attr("checked")&&$(".sidebar__collection-filter > h4").addClass("active"),($.url(2)==="types"||$.url(2)==="vendors")&&$(".sidebar__collection-filter").remove(),$(".sidebar-block:empty").prev().css("border-bottom","none"),recentlyViewed.init()},clearAllFilters:function(){$("[data-option-filter] input").prop("checked",!1),$("[data-option-filter] input").trigger("change"),recentlyViewed.init()},clearSelectedFilter:function(optionFilter){$("#tag_filter").length&&optionFilter.find("[data-option-filter] input").val()===$("#tag_filter option:selected ").val().substr($("#tag_filter option:selected ").val().lastIndexOf("/")+1)&&$("#tag_filter").val($("#tag_filter option:first").val()),optionFilter.find("[data-option-filter] input").prop("checked",!1),optionFilter.find("[data-option-filter] input").trigger("change"),recentlyViewed.init()}};if(Shopify.theme_settings.slideshow_arrow_size=="bold")var arrowSize={x0:10,x1:40,y1:50,x2:80,y2:50,x3:50},svgArrowSizeLeft='',svgArrowSizeRight='';else if(Shopify.theme_settings.slideshow_arrow_size=="light")var arrowSize={x0:10,x1:60,y1:50,x2:62,y2:40,x3:22},svgArrowSizeLeft='',svgArrowSizeRight='';else if(Shopify.theme_settings.slideshow_arrow_size=="regular")var arrowSize={x0:10,x1:60,y1:50,x2:70,y2:40,x3:30},svgArrowSizeLeft='',svgArrowSizeRight='';function isScreenSizeLarge(){if(window.matchMedia("(min-width: 1024px)").matches)return!0}var utils={createAccordion:function(container,tab,content){var $container2=$(container),$tab2=$(container).find(tab),$content2=$(container).find(content),specificTab=container+" "+tab;if(container.indexOf(".accordion-tabs")>=0){var rearrangedTabs=$.map($tab2,function(v,i2){return[v,$content2[i2]]});$container2.empty(),$.each(rearrangedTabs,function(index,value){$container2.append(this)}),$content2.removeClass("active"),$container2.find(".active").next().slideToggle(),tab=container+"> a"}$(container).children("a").each(function(i2,tab2){var tab2=$(this),tabValue=tab2.attr("href");tab2.attr("data-tab-value",tabValue),tab2.removeAttr("href")}),$(container).find(tab+".active").next().slideToggle(),$("body").on("click",specificTab,function(e){e.preventDefault(),$(this).toggleClass("active"),$(this).next().slideToggle()})},mobileAccordion:function(container,tab,content){$container=$(container),$tab=$(container).find(tab),$content=$(container).find(content),$(tab+".active").next().slideToggle(),$("body").on("click",tab,function(e){e.preventDefault(),$(this).toggleClass("active"),$(this).next().slideToggle()})},mobileParentActiveAccordion:function(container,tab,content){$container=$(container),$tab=$(container).find(tab),$content=$(container).find(content),$(tab+".active").parent().next().slideToggle(),$("body").on("click",tab,function(e){e.preventDefault(),$(this).toggleClass("active"),$(this).parent().next().slideToggle()})},initializeTabs:function(){$("ul.tabs > li > a").attr("data-no-instant",!0),$("body").on("click","ul.tabs > li > a",function(e){e.preventDefault();var contentLocation=$(this).attr("href");contentLocation.charAt(0)=="#"&&($("ul.tabs > li > a.active").removeClass("active"),$(this).addClass("active"),$(this).parents("ul.tabs").next().find(contentLocation).show().css({display:"block"}).addClass("active").siblings().hide().removeClass("active"))})},productReviewScroll:function(){$("#shopify-product-reviews").length&&$(".shopify-product-reviews-badge").length&&$(".spr-badge-container").on("click",function(){utils.scrollToTop("#shopify-product-reviews")})},scrollToTop:function(element,height){height!=null?$("html, body").animate({scrollTop:$(element).offset().top-height},1e3):$("html, body").animate({scrollTop:$(element).offset().top},1e3)},pageBannerCheck:function(){!$(".page-banner").length>0||$(".header").hasClass("header-background--solid")?($(".feature_image").removeClass("feature_image"),$(".header.is-absolute").removeClass("is-absolute"),$(".secondary_logo--true").find(".secondary_logo").css("display","none"),$(".secondary_logo--true").find(".primary_logo").css("display","block")):$(".page-banner").hasClass("full-width--true")?($(".header").parent().addClass("feature_image"),$(".header").addClass("is-absolute"),$("header.feature_image").hasClass("secondary_logo--true")&&($(".secondary_logo--true").find(".secondary_logo").css("display","block"),$(".secondary_logo--true").find(".primary_logo").css("display","none"))):($(".header").parent().removeClass("feature_image"),$(".header").removeClass("is-absolute")),$(".index-sections").children().first(".under-menu").find(".full-width--true").length?($(".header").hasClass("header-background--solid")||($(".index .header").parent().addClass("feature_image"),$(".index .header").addClass("is-absolute")),$("header.feature_image").hasClass("secondary_logo--true")&&($(".secondary_logo--true").find(".secondary_logo").show(),$(".secondary_logo--true").find(".primary_logo").hide())):($(".index .feature_image").removeClass("feature_image"),$(".index .header.is-absolute").removeClass("is-absolute"),$("header.feature_image").hasClass("secondary_logo--true")||($(".secondary_logo--true").find(".secondary_logo").hide(),$(".secondary_logo--true").find(".primary_logo").show())),$(".detail-sections").children().first().hasClass("under-menu")?($(".header").hasClass("header-background--solid")||($('[class^="page-details"] .header').parent().addClass("feature_image"),$('[class^="page-details"] .header').addClass("is-absolute")),$("header.feature_image").hasClass("secondary_logo--true")&&($(".secondary_logo--true").find(".secondary_logo").show(),$(".secondary_logo--true").find(".primary_logo").hide())):($('[class^="page-details"] .feature_image').removeClass("feature_image"),$('[class^="page-details"] .header.is-absolute').removeClass("is-absolute"),$("header.feature_image").hasClass("secondary_logo--true")||($(".secondary_logo--true").find(".secondary_logo").hide(),$(".secondary_logo--true").find(".primary_logo").show()))},enableDisclosure:function(){var $disclosure=$("[data-disclosure]"),$toggle=$("[data-disclosure-toggle]"),$disclosureWrap=$(".disclosure__list-wrap");function checkOffScreen($openedToggle){$openedToggle.siblings(".disclosure__list-wrap").is(":off-right")&&$openedToggle.siblings(".disclosure__list-wrap").addClass("disclosure--left")}function closeDisclosures(ignoreTarget,currentTarget){ignoreTarget===!0?($toggle.not(currentTarget).removeClass("is-clicked"),$toggle.not(currentTarget).attr("aria-expanded","false")):($toggle.removeClass("is-clicked"),$toggle.attr("aria-expanded","false")),$disclosureWrap.removeClass("disclosure--left")}$("body").on("keyup",function(e){e.which=="27"&&closeDisclosures()}),$disclosure.on("mouseleave",function(e){closeDisclosures()}),$toggle.on("mouseenter focus",function(e){closeDisclosures(!0,this);var $target=$(e.currentTarget);$target.attr("aria-expanded","true").addClass("is-clicked"),checkOffScreen($target)}),$(".disclosure__button").on("focusout",function(e){(!$(e.relatedTarget).hasClass("disclosure__button")||$(e.relatedTarget).hasClass("disclosure__toggle"))&&closeDisclosures()}),$toggle.on("touchstart",function(e){if(Shopify.media_queries.medium.matches||!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){var $target=$(e.currentTarget);closeDisclosures(!0,this),$target.hasClass("is-clicked")?($target.attr("aria-expanded","false").removeClass("is-clicked"),$disclosureWrap.removeClass("disclosure--left")):($target.attr("aria-expanded","true").addClass("is-clicked"),checkOffScreen($target))}})},addImageDimension:function(imageUrl,size){var insertPosition=imageUrl.lastIndexOf(".");return imageUrl.substring(0,insertPosition)+size+imageUrl.substring(insertPosition)},unload:function($target){$("[data-disclosure]").off(),$("[data-disclosure-toggle]").off()}},sliderBlock={select:function(blockId,$parentSection){var $blocks=$parentSection.find(".gallery-cell"),blockIdsArray=$blocks.map(function(){return String($(this).data("block-id"))}),$slider=$parentSection.find("[data-slider-id]"),settings={slideshowTextAnimation:$slider.data("slideshow-text-animation")},flkty=$slider.data("flickity");$slider.flickity("pausePlayer");for(var i2=0;i21?($(".js-gallery-modal").addClass("multi-image"),$(".js-gallery-modal").removeClass("single-image"),$(".js-gallery-modal").addClass("is-draggable")):($(".js-gallery-modal").addClass("single-image"),$(".js-gallery-modal").removeClass("multi-image"))},afterContent:function($productForm,$notifyForm,productData){quickShop.retrieveProductInfo(productData),videoFeature.setupVideoPlayer();var $productGallery=$(".js-gallery-modal");if(productPage.enableGallery($productGallery),$(".js-quickshop-forms--"+productData.product_id).empty(),$productForm.appendTo(".quick-shop__lightbox .js-product-form"),$notifyForm.appendTo(".quick-shop__lightbox .js-product-form"),$productForm.hasClass("product_form_options")&&$productForm.hasClass("viewed")==!1?new Shopify.OptionSelectors($productForm.data("select-id"),{product:$productForm.data("product"),onVariantSelected:selectCallback,enableHistoryState:$productForm.data("enable-state")}):Currency.show_multiple_currencies&¤cyConverter.convertCurrencies(),Shopify.theme_settings.product_form_style=="swatches"){var JSONData=$productForm.data("product"),productID=productData.section_id,productSection=".product-"+productID+" .js-product_section",swatchOptions=$productForm.find(".swatch_options .swatch");swatchOptions.length>1&&Shopify.linkOptionSelectors(JSONData,productSection)}$('.js-quick-shop select[name="id"]').trigger("change"),utils.initializeTabs(),productPage.productSwatches()},beforeClose:function(productData){var $insertedNotifyForm=$(".quick-shop__lightbox .notify_form"),$insertedProductForm=$(".quick-shop__lightbox .product_form");$(".js-quickshop-forms--"+productData.product_id).append($insertedProductForm),$(".js-quickshop-forms--"+productData.product_id).append($insertedNotifyForm),$(".js-quickshop-forms--"+productData.product_id+" .product_form").addClass("viewed"),$(".js-quickshop-forms--"+productData.product_id+" .notify_form").addClass("viewed");var $gallery=$(".js-gallery-modal"),$carousel=$(".js-gallery-carousel");$(".js-gallery-carousel .gallery-cell").off("click"),$gallery.flickity("remove",$(".gallery-cell",$gallery)),$gallery.flickity("destroy"),$carousel.hasClass("flickity-enabled")?($carousel.flickity("remove",$(".gallery-cell",$carousel)),$carousel.flickity("destroy")):$carousel.find(".gallery-cell").remove();var variantPrice=$(".js-current-price .money").text();$(".js-quick-shop-link[data-id="+productData.product_id+"]").attr("data-initial-modal-price",variantPrice),$(".js-current-price, .js-was-price, .js-savings").empty()},retrieveProductInfo:function(productData){$.ajax({dataType:"json",async:!1,cache:!1,url:"/products/"+productData.handle+".js",success:function(product){product=$.extend({},product,productData),globalQuickShopProduct=product,quickShop.updateVariant(product.variants[0].id.toString(),product)}})},updateVariant:function(variant){if(globalQuickShopProduct!="undefined"){var product=globalQuickShopProduct;$(".js-current-price").html(""),$(".js-was-price").html(""),$(".js-savings").html(""),$(".js-product-title").html(''+product.title+""),$(".js-product-vendor").html(''+product.vendor+""),$(".js-full-description").html(product.full_description),$(".js-regular-description").html(product.regular_description);var productDetails=''+product.details_text+"";if($(".js-product-details").html(productDetails),$.each(product.collection_handles,function(value,index){this.toString()=="new"&&$(".js-new-banner").html(Shopify.translation.new_text),this.toString()=="pre-order"&&$(".js-pre-order-banner").html(Shopify.translation.pre_order_text),this.toString()=="coming-soon"&&(product.price=Shopify.translation.coming_soon_text)}),product.single_variant=="true")Shopify.theme_settings.sale_banner_enabled&&product.compare_at_price>product.price&&$(".js-sale-banner").html(Shopify.translation.sale_text),product.compare_at_price>product.price?$(".js-current-price").addClass("sale"):$(".js-current-price").removeClass("sale"),product.available==!1?product.price==Shopify.translation.coming_soon_text?$(".js-sold-out").html(Shopify.translation.coming_soon_text):$(".js-sold-out").html(Shopify.theme_settings.sold_out_text):$(".js-sold-out").html(""),(product.available==!0||product.available==!1&&Shopify.theme_settings.display_sold_out_price)&&(product.compare_at_price>product.price&&($(".js-was-price").html(''+Shopify.formatMoney(product.variants[0].compare_at_price,product.money_format)+""),$(".js-savings").html(Shopify.translation.savings_text+" "+parseInt((product.variants[0].compare_at_price-product.variants[0].price)*100/product.variants[0].compare_at_price)+'% ( '+Shopify.formatMoney(product.variants[0].compare_at_price-product.variants[0].price,product.money_format)+")")),product.price==Shopify.translation.coming_soon_text?$(".js-current-price").html(Shopify.translation.coming_soon_text):product.price?$(".js-current-price").html(''+Shopify.formatMoney(product.variants[0].price,product.money_format)+""):$(".js-current-price").html(Shopify.theme_settings.free_text)),product.available==!0?$(".js-notify-form").hide():$(".js-notify-form").show();else for(var i2=0;i2product.variants[i2].price&&$(".js-sale-banner").html(Shopify.translation.sale_text),product.variants[i2].compare_at_price>product.variants[i2].price?$(".js-current-price").addClass("sale"):$(".js-current-price").removeClass("sale"),product.variants[i2].available==!1?product.price==Shopify.translation.coming_soon_text?$(".js-sold-out").html(Shopify.translation.coming_soon_text):$(".js-current-price").parents(".modal_price").hasClass("variant-unavailable")?$(".js-sold-out").html(Shopify.translation.unavailable_text):$(".js-sold-out").html(Shopify.theme_settings.sold_out_text):$(".js-sold-out").html(""),$(".js-current-price").parents(".modal_price").hasClass("variant-unavailable")&&$(".js-sold-out").html(Shopify.translation.unavailable_text),product.variants[i2].available==!0?$(".js-notify-form").hide():$(".js-notify-form").show(),(product.variants[i2].available==!0||product.variants[i2].available==!1&&Shopify.theme_settings.display_sold_out_price)&&(product.variants[i2].compare_at_price>product.variants[i2].price&&($(".js-was-price").html(''+Shopify.formatMoney(product.variants[i2].compare_at_price,product.money_format)+""),$(".js-savings").html(Shopify.translation.savings_text+" "+parseInt((product.variants[i2].compare_at_price-product.variants[i2].price)*100/product.variants[i2].compare_at_price)+'% ('+Shopify.formatMoney(product.variants[i2].compare_at_price-product.variants[i2].price,product.money_format)+")")),product.price==Shopify.translation.coming_soon_text?$(".js-current-price").html(Shopify.translation.coming_soon_text):product.variants[i2].price?$(".js-current-price").html(''+Shopify.formatMoney(product.variants[i2].price,product.money_format)+""):$(".js-current-price").html(Shopify.theme_settings.free_text)))}Currency.show_multiple_currencies&¤cyConverter.convertCurrencies()},populateGallery:function(productData){var $gallery=$(".js-gallery-modal"),$carousel=$(".js-gallery-carousel");function addMainGalleryImages(){$.each(productData.image_array,function(i2,image){if(image.path==""||image.id==null)var imgPath=productData.feat_img;else var imgPath=image.path;if(image.alt==null||image.alt=="")var alt="";else var alt=image.alt;var img2048x2048=imgPath.replace(/(\.[^.]*)$/,"_2048x2048$1").replace("http:",""),cellContent;!image.mediaType||image.mediaType.indexOf("image")>=0?cellContent='
    ${alt}
    ':cellContent=unescape(imgPath);var $cellElems=$('");$(".js-gallery-modal").append($cellElems)})}function addCarouselGalleryImages(){$.each(productData.thumbnail_array,function(i2,image){if(image.path!=""){var imgPath=image.path,carouselSizedImg=imgPath.replace(/(\.[^.]*)$/,"_grande$1").replace("http:",""),mediaBadge="";image.alt.indexOf("model")>=0?mediaBadge='':(image.alt.indexOf("external_video")>=0||image.alt.indexOf("video")>=0)&&(mediaBadge='');var img=''+escape(image.alt)+'',$carouselCellElems=$('");$carousel.append($carouselCellElems)}}),imageFunctions.linkGalleryAndCarousel($gallery,$carousel)}addMainGalleryImages(),$gallery.find(".gallery-cell").length>1&&addCarouselGalleryImages()}},newsletter_popup={init:function(){var popup=Cookies.get("popup"),newsletter_popup_days=parseInt(Shopify.theme_settings.newsletter_popup_days),cookie_enabled=newsletter_popup_days!=0;if(cookie_enabled&&popup=="open")return!1;newsletter_popup.open(),cookie_enabled&&Cookies.set("popup","open",{expires:newsletter_popup_days,path:"",domain:"",sameSite:"None",secure:!0})},open:function(){var newsletter_popup_seconds=parseInt(Shopify.theme_settings.newsletter_popup_seconds);(Shopify.theme_settings.newsletter_popup_mobile||Shopify.media_queries.large.matches)&&setTimeout(function(){$.fancybox.open($(".js-newsletter-popup"),{baseClass:"newsletter__lightbox",hash:!1,infobar:!1,toolbar:!1,loop:!0,smallBtn:!0,mobile:{preventCaptionOverlap:!1,toolbar:!0,buttons:["close"]}})},newsletter_popup_seconds*1e3)}},productMedia={models:[],setupMedia:function(){var config={controls:["zoom-in","zoom-out","fullscreen"],focusOnPlay:!1};$($("model-viewer",$(".js-product-gallery, .js-gallery-modal"))).each(function(index,model){model=new Shopify.ModelViewerUI(model,config),productMedia.models.push(model)}),$(".product-gallery__model model-viewer").on("mousedown",function(){productMedia.hideModelIcon(this)})},showModelIcon:function(slide){$(slide).find(".button--poster, .model-icon-button-control").show()},hideModelIcon:function(slide){$(slide).find(".button--poster, .model-icon-button-control").hide()}},videoEl={playButtonIcon:'',playButton:'',muteButton:'',progressInput:'
    % buffered00:00
    ',volume:'
    ',fullscreen:''},videoControls=videoEl.playButtonIcon+'
    '+videoEl.playButton+videoEl.progressInput+videoEl.muteButton+videoEl.volume+videoEl.fullscreen+"
    ",globalVideoPlayers=[],videoPlayers=[],videosInRecommendedProductsPlayer;videoFeature={init:function(){this.setupVideoPlayer(),this.setupRecommendedVideoPlayer()},setupVideoPlayer:function(){var productVideos=document.querySelectorAll("[data-html5-video] video, [data-youtube-video]"),setupVideoPlayers=Plyr.setup(productVideos,{controls:videoControls,ratio:this.aspect_ratio,fullscreen:{enabled:!0,fallback:!0,iosNative:!0},storage:{enabled:!1}});globalVideoPlayers&&$.each(setupVideoPlayers,function(index,player){globalVideoPlayers.push(player)});var videoLooping=$("[data-video-loop]").data("video-loop")||!1;$.each(setupVideoPlayers,function(index,player){player.loop=videoLooping,videoPlayers.push(player)}),this.setupListeners()},setupPlayerForRecentlyViewedProducts:function(video){if(video){var recentlyViewedProductPlayer=new Plyr(video,{controls:videoControls,ratio:this.aspect_ratio,fullscreen:{enabled:!0,fallback:!0,iosNative:!0},storage:{enabled:!1}});videoPlayers!==null&&(videoPlayers.push(recentlyViewedProductPlayer),this.setupListeners())}},setupRecommendedVideoPlayer:function(){var videosInRecommendedProducts=document.querySelectorAll(".product-recommendations [data-html5-video] video, .product-recommendations [data-youtube-video]");if(videosInRecommendedProducts.length>0)if(videosInRecommendedProductsPlayer=Plyr.setup(videosInRecommendedProducts,{controls:videoControls,fullscreen:{enabled:!0,fallback:!0,iosNative:!0},storage:{enabled:!1}}),videoPlayers!==null){var combinedArray=videoPlayers.concat(videosInRecommendedProductsPlayer);videoPlayers=combinedArray}else videoPlayers=videosInRecommendedProductsPlayer;this.setupListeners()},setupListeners:function(){$.each(videoPlayers,function(index,player){var id=player.id||player.media.dataset.plyrVideoId,$video;player.isHTML5&&($video=$(player.elements.wrapper).find("video"),$video.attr("data-plyr-video-id",id))}),$.each(globalVideoPlayers,function(index,player){player.on("play",function(event2){var instance=event2.detail.plyr;$.each(globalVideoPlayers,function(index2,player2){instance.id!=player2.id&&player2.pause()})})})},enableVideoOnHover:function($thumbnail){var $html5Video=$thumbnail.find("[data-html5-video]"),$youtubeVideo=$thumbnail.find("[data-youtube-video]"),videoID;$html5Video.length>0?videoID=$html5Video.find("[data-plyr-video-id]").data("plyr-video-id"):$youtubeVideo.length>0&&(videoID=$youtubeVideo.find("iframe").attr("id")),videoID&&$.each(videoPlayers,function(index,player){(player.id==videoID||player.media.id==videoID)&&(player.toggleControls(!1),player.muted=!0,player.play())})},disableVideoOnHover:function($thumbnail){var $html5Video=$thumbnail.find("[data-html5-video]"),$youtubeVideo=$thumbnail.find("[data-youtube-video]"),videoID;$html5Video.length>0?videoID=$html5Video.find("[data-plyr-video-id]").data("plyr-video-id"):$youtubeVideo.length>0&&(videoID=$youtubeVideo.find("iframe").attr("id")),videoID&&$.each(videoPlayers,function(index,player){(player.id==videoID||player.media.id==videoID)&&player.playing&&player.pause()})}},$("#show-more").click(function(){$(".full-description, .partial-description, .swatch_options, .quantity-block").toggle();var v=$("#show-more").text();console.log(v),$("#show-more").text(function(){return v==="M\xC1S INFORMACI\xD3N"?"MENOS INFORMACI\xD3N":"M\xC1S INFORMACI\xD3N"})}); //# sourceMappingURL=/cdn/shop/t/38/assets/utilities.js.map?v=71879478781625155881737643798