1(function($){$(".collection-sidebar")&&History.Adapter.bind(window,"statechange",function(){var State=History.getState();if(!ella.isSidebarAjaxClick){ella.sidebarParams();var newurl=ella.sidebarCreateUrl();ella.sidebarGetContent(newurl),ella.reActivateSidebar()}ella.isSidebarAjaxClick=!1}),window.use_color_swatch&&($(".swatch :radio").change(function(){var optionIndex=$(this).closest(".swatch").attr("data-option-index"),optionValue=$(this).val();$(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")}),Shopify.optionsMap={},Shopify.updateOptionsInSelector=function(selectorIndex){switch(selectorIndex){case 0:var key="root",selector=$(".single-option-selector:eq(0)");break;case 1:var key=$(".single-option-selector:eq(0)").val(),selector=$(".single-option-selector:eq(1)");break;case 2:var key=$(".single-option-selector:eq(0)").val();key+=" / "+$(".single-option-selector:eq(1)").val();var selector=$(".single-option-selector:eq(2)")}var initialValue=selector.val();selector.empty();var availableOptions=Shopify.optionsMap[key];if(availableOptions&&availableOptions.length){for(var i2=0;i2<availableOptions.length;i2++){var option=availableOptions[i2],newOption=$("<option></option>").val(option).html(option);selector.append(newOption)}$('.swatch[data-option-index="'+selectorIndex+'"] .swatch-element').each(function(){$.inArray($(this).attr("data-value"),availableOptions)!==-1?$(this).removeClass("soldout").show().find(":radio").removeAttr("disabled","disabled").removeAttr("checked"):$(this).addClass("soldout").hide().find(":radio").removeAttr("checked").attr("disabled","disabled")}),$.inArray(initialValue,availableOptions)!==-1&&selector.val(initialValue),selector.trigger("change")}},Shopify.linkOptionSelectors=function(product){for(var i2=0;i2<product.variants.length;i2++){var variant=product.variants[i2];if(variant.available){if(Shopify.optionsMap.root=Shopify.optionsMap.root||[],Shopify.optionsMap.root.push(variant.option1),Shopify.optionsMap.root=Shopify.uniq(Shopify.optionsMap.root),product.options.length>1){var key=variant.option1;Shopify.optionsMap[key]=Shopify.optionsMap[key]||[],Shopify.optionsMap[key].push(variant.option2),Shopify.optionsMap[key]=Shopify.uniq(Shopify.optionsMap[key])}if(product.options.length===3){var key=variant.option1+" / "+variant.option2;Shopify.optionsMap[key]=Shopify.optionsMap[key]||[],Shopify.optionsMap[key].push(variant.option3),Shopify.optionsMap[key]=Shopify.uniq(Shopify.optionsMap[key])}}}Shopify.updateOptionsInSelector(0),product.options.length>1&&Shopify.updateOptionsInSelector(1),product.options.length===3&&Shopify.updateOptionsInSelector(2),$(".single-option-selector:eq(0)").change(function(){return Shopify.updateOptionsInSelector(1),product.options.length===3&&Shopify.updateOptionsInSelector(2),!0}),$(".single-option-selector:eq(1)").change(function(){return product.options.length===3&&Shopify.updateOptionsInSelector(2),!0})}),$(document).ready(function(){ella.init()}),$(window).resize(function(){}),$(window).scroll(function(){$(this).scrollTop()>200?$("#back-top").fadeIn():$("#back-top").fadeOut()}),$(".header-mobile").is(":visible")||$(document).on("click touchstart",function(e){var quickview=$(".quick-view"),dropdowncart=$(".dropdown-cart"),cartButton=$(".cartToggle"),newsletter=$("#email-modal .modal-window"),searchBar=$(".nav-search");!quickview.is(e.target)&&quickview.has(e.target).length===0&&!dropdowncart.is(e.target)&&dropdowncart.has(e.target).length===0&&!cartButton.is(e.target)&&cartButton.has(e.target).length===0&&!newsletter.is(e.target)&&newsletter.has(e.target).length===0&&!searchBar.is(e.target)&&searchBar.has(e.target).length===0&&(ella.closeQuickViewPopup(),ella.closeDropdownCart(),ella.closeEmailModalWindow(),ella.closeDropdownSearch())}),$(document).keyup(function(e){e.keyCode==27&&(ella.closeQuickViewPopup(),ella.closeDropdownCart(),ella.closeDropdownSearch(),clearTimeout(ella.ellaTimeout),$(".modal").is(":visible")&&$(".modal").fadeOut(500))});var ella={ellaTimeout:null,isSidebarAjaxClick:!1,init:function(){this.initColorSwatchGrid(),this.initSidebar(),this.initMobileSidebar(),this.initScrollTop(),this.initQuickView(),this.initProductMoreview(),this.initAddToCart(),this.initModal(),this.initProductAddToCart(),this.initDropDownCart(),this.initDropdownSearch(),this.initToggleCollectionPanel(),this.initWishlist(),this.initProductWishlist(),this.initRemoveWishlist(),this.initInfiniteScrolling(),this.product_slick(),this.header_mobile(),this.sidebarInitToggle(),this.hide_filter(),this.initoptionsize(),this.cookie_popup(),$(".brands-page").length&&this.Page_brands(),this.initWishList(),this.initStickyAddtoCart(),$(".template-cart").length&&this.changeQttCart()}
1,sidebarMapTagEvents:function(){$('.sidebar-tag a:not(".clear"), .sidebar-tag label').click(function(e){var currentTags=[];if(Shopify.queryParams.constraint&&(currentTags=Shopify.queryParams.constraint.split("+")),!window.enable_sidebar_multiple_choice&&!$(this).prev().is(":checked")){var otherTag=$(this).parents(".sidebar-tag").find("input:checked");if(otherTag.length>0){var tagName=otherTag.val();if(tagName){var tagPos=currentTags.indexOf(tagName);tagPos>=0&¤tTags.splice(tagPos,1)}}}var tagName=$(this).prev().val();if(tagName){var tagPos=currentTags.indexOf(tagName);tagPos>=0?currentTags.splice(tagPos,1):currentTags.push(tagName)}currentTags.length?Shopify.queryParams.constraint=currentTags.join("+"):delete Shopify.queryParams.constraint,ella.sidebarAjaxClick(),e.preventDefault()})},sidebarMapCategories:function(){$(".collection-sidebar .sidebar-links a").click(function(e){$(this).hasClass("active")||(delete Shopify.queryParams.q,ella.sidebarAjaxClick($(this).attr("href")),$(".sidebar-links a.active").removeClass("active"),$(this).addClass("active")),e.preventDefault()})},sidebarMapView:function(){$(".view-mode > span").click(function(e){if(!$(this).hasClass("active")){var paging=$(".filter-show > button span").text();$(this).hasClass("list")?Shopify.queryParams.view="list"+paging:Shopify.queryParams.view=paging,ella.sidebarAjaxClick(),$(".view-mode span.active").removeClass("active"),$(this).addClass("active")}e.preventDefault()})},sidebarMapShow:function(){$(".filter-show a").click(function(e){if(!$(this).parent().hasClass("active")){var thisPaging=$(this).attr("href"),view=$(".view-mode a.active").attr("href");view=="list"?Shopify.queryParams.view="list"+thisPaging:Shopify.queryParams.view=thisPaging,ella.sidebarAjaxClick(),$(".filter-show > button span").text(thisPaging),$(".filter-show li.active").removeClass("active"),$(this).parent().addClass("active")}e.preventDefault()})},sidebarInitToggle:function(){$(".sidebar_toggle .widget-title").addClass("click"),$(".sidebar_toggle .widget-title h3").off().click(function(){var $title=$(this).parents(".widget-title");$title.hasClass("click")?$title.removeClass("click"):$title.addClass("click"),$(this).parents(".sidebar_toggle").find(".widget-content").slideToggle()})},sidebarMapSorting:function(e){$(".filter-sortby li span").click(function(e2){if(!$(this).parent().hasClass("active")){Shopify.queryParams.sort_by=$(this).attr("data-href"),ella.sidebarAjaxClick();var sortbyText=$(this).text();$(".filter-sortby > button span").text(sortbyText),$(".filter-sortby li.active").removeClass("active"),$(this).parent().addClass("active")}e2.preventDefault()})},sidebarMapPaging:function(){$(".template-collection .pagination-page a").click(function(e){var page=$(this).attr("href").match(/page=\d+/g);if(page&&(Shopify.queryParams.page=parseInt(page[0].match(/\d+/g)),Shopify.queryParams.page)){var newurl=ella.sidebarCreateUrl();ella.isSidebarAjaxClick=!0,History.pushState({param:Shopify.queryParams},newurl,newurl),ella.sidebarGetContent(newurl),$("body,html").animate({scrollTop:500},600)}e.preventDefault()})},sidebarMapClearAll:function(){$(".refined-widgets a.clear-all").click(function(e){delete Shopify.queryParams.constraint,delete Shopify.queryParams.q,ella.sidebarAjaxClick(),e.preventDefault()})},sidebarMapClear:function(){$(".sidebar-tag").each(function(){var sidebarTag=$(this);sidebarTag.find("input:checked").length>0&&sidebarTag.find(".clear").show().click(function(e){console.log("im clicked");var currentTags=[];Shopify.queryParams.constraint&&(currentTags=Shopify.queryParams.constraint.split("+")),sidebarTag.find("input:checked").each(function(){var selectedTag=$(this),tagName=selectedTag.val();if(tagName){var tagPos=currentTags.indexOf(tagName);tagPos>=0&¤tTags.splice(tagPos,1)}}),currentTags.length?Shopify.queryParams.constraint=currentTags.join("+"):delete Shopify.queryParams.constraint,ella.sidebarAjaxClick(),e.preventDefault()})})},sidebarMapEvents:function(){ella.sidebarMapTagEvents(),ella.sidebarMapCategories(),ella.sidebarMapView(),ella.sidebarMapShow(),ella.sidebarMapSorting()},reActivateSidebar:function(){$(".sidebar-custom .active, .sidebar-links .active").removeClass("active"),$(".sidebar-tag input:checked").attr("checked",!1);var cat=location.pathname.match(/\/collections\/(.*)(\?)?/);if(cat&&cat[1]&&$(".sidebar-links a[href='"+cat[0]+"']").addClass("active"),Shopify.queryParams.view){$(".view-mode .active").removeClass("active");var view=Shopify.queryParams.view;view.indexOf("list")>=0?($(".view-mode .list").addClass("active"),view=view.replace("list","")):$(".view-mode .grid").addClass("active"),$(".filter-show > button span").text(view),$(".filter-show li.active").removeClass("active"),$(".filter-show a[href='"+view+"']").parent().addClass("active")}ella.initSortby()},initSortby:function(){if(Shopify.queryParams.sort_by){var sortby=Shopify.queryParams.sort_by,sortbyText=$(".filter-sortby span[data-href='"+sortby+"']").text();$(".filter-sortby > button span.text").text(sortbyText),$(".filter-sortby li.active").removeClass("active"),$(".filter-sortby span[data-href='"+sortby+"']").parent().addClass("active")}else{var sortbyText=$(".filter-sortby .dropdown-menu .active").text();$(".filter-sortby > button span.text").text(sortbyText)}},sidebarMapData:function(data){var currentList=$(".col-main .products-grid");currentList.length==0&&(currentList=$(".col-main .product-list"));var productList=$(data).find(".col-main .products-grid");productList.length==0&&(productList=$(data).find(".col-main .product-list")),currentList.replaceWith(productList),ella.checkNeedToConvertCurrency()&&Currency.convertAll(window.shop_currency,jQuery(".currencies").val(),".col-main span.money","money_format"),$(".padding").length>0?$(".padding").replaceWith($(data).find(".padding")):$(".block-row.col-main").append($(data).find(".padding"));var currentHeader=$(".page-header"),dataHeader=$(data).find(".page-header");if(currentHeader.find("h2").text()!=dataHeader.find("h2").text()){currentHeader.find("h2").replaceWith(dataHeader.find("h2"));var currentDes=$(".collection-des"),dataDes=$(data).find(".collection-des");currentDes.find(".rte").length?dataDes.find(".rte").length?currentDes.html(dataDes.find(".rte")):currentDes.find(".rte").hide():currentDes.html(dataDes.find(".rte"));var currentImg=$(".collection-img"),dataImg=$(data).find(".collection-img");
1currentImg.find("p").length?dataImg.find("p").length?currentImg.html(dataImg.find("p")):currentImg.find("p").hide():currentImg.html(dataImg.find("p"))}if($(".refined-widgets").replaceWith($(data).find(".refined-widgets")),$(".sidebar-block").replaceWith($(data).find(".sidebar-block")),$(".breadcrumb .bd-title").replaceWith($(data).find(".breadcrumb .bd-title")),$(".img_cart").replaceWith($(data).find(".img_cart")),ella.initColorSwatchGrid(),$(".spr-badge").length>0)return window.SPR.registerCallbacks(),window.SPR.initRatingHandler(),window.SPR.initDomEls(),window.SPR.loadProducts(),window.SPR.loadBadges()},sidebarCreateUrl:function(baseLink){var newQuery=$.param(Shopify.queryParams).replace(/%2B/g,"+");return baseLink?newQuery!=""?baseLink+"?"+newQuery:baseLink:location.pathname+"?"+newQuery},sidebarAjaxClick:function(baseLink){delete Shopify.queryParams.page;var newurl=ella.sidebarCreateUrl(baseLink);ella.isSidebarAjaxClick=!0,History.pushState({param:Shopify.queryParams},newurl,newurl),ella.sidebarGetContent(newurl)},sidebarGetContent:function(newurl){$.ajax({type:"get",url:newurl,beforeSend:function(){ella.showLoading()},success:function(data){ella.sidebarMapData(data),ella.sidebarMapPaging(),ella.translateBlock(".main-content"),ella.sidebarMapTagEvents(),ella.sidebarInitToggle(),ella.sidebarMapClear(),ella.sidebarMapClearAll(),ella.hideLoading(),ella.initQuickView(),ella.initAddToCart(),ella.initWishlist(),ella.initInfiniteScrolling(),ella.hide_filter(),ella.initoptionsize()},error:function(xhr,text){ella.hideLoading(),$(".loading-modal").hide(),$(".ajax-error-message").text($.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})},sidebarParams:function(){if(Shopify.queryParams={},location.search.length)for(var aKeyValue,i2=0,aCouples=location.search.substr(1).split("&");i2<aCouples.length;i2++)aKeyValue=aCouples[i2].split("="),aKeyValue.length>1&&(Shopify.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]))},initMobileSidebar:function(){$(".sidebar-mb a").click(function(event){$(".sidebar").is(":hidden")?($(".sidebar").slideToggle(500),$("body,html").animate({scrollTop:200},600),$(this).toggleClass("hidden-arrow-left"),$(this).html("<span>"+window.hide_sidebar+'<i class="fa fa-chevron-up"></i></span>')):($(".sidebar").slideToggle(500),$(this).removeClass("hidden-arrow-left"),$(this).html("<span>"+window.show_sidebar+'<i class="fa fa-chevron-down"></i></span>'))})},initSidebar:function(){$(".collection-sidebar").length>=0&&(ella.sidebarParams(),ella.initSortby(),ella.sidebarMapEvents(),ella.sidebarMapPaging(),ella.sidebarInitToggle(),ella.sidebarMapClear(),ella.sidebarMapClearAll())},initWishlist:function(){$(".grid-item button.wishlist").click(function(e){e.preventDefault();var form=$(this).parent(),item=form.parents(".grid-item");$.ajax({type:"POST",url:"/contact",data:form.serialize(),beforeSend:function(){ella.showLoading()},success:function(data){ella.hideLoading(),form.html('<a class="wishlist" href="/pages/wish-list" title="Go to wishlist"><span class="icon"></span><span>Go to wishlist</span></a>');var title=item.find(".product-title").html(),image=item.find("a > img").attr("src");$(".ajax-success-modal").find(".ajax-product-title").html(title),$(".ajax-success-modal").find(".ajax-product-image").attr("src",image),$(".ajax-success-modal").find(".btn-go-to-wishlist").show(),$(".ajax-success-modal").find(".btn-go-to-cart").hide(),ella.showModal(".ajax-success-modal")},error:function(xhr,text){ella.hideLoading(),$(".loading-modal").hide(),$(".ajax-error-message").text($.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})})},initProductWishlist:function(){$(".product button.wishlist").click(function(e){e.preventDefault();var form=$(this).parent(),item=form.parents(".grid-item");$.ajax({type:"POST",url:"/contact",data:form.serialize(),beforeSend:function(){ella.showLoading()},success:function(data){ella.hideLoading(),form.html('<a class="wishlist" href="/pages/wish-list" title="Go to wishlist"><span class="icon"></span><span>Go to wishlist</span></a>');
1var title=$(".product-title h2").html(),image=$("#product-featured-image").attr("src");$(".ajax-success-modal").find(".ajax-product-title").html(title),$(".ajax-success-modal").find(".ajax-product-image").attr("src",image),$(".ajax-success-modal").find(".btn-go-to-wishlist").show(),$(".ajax-success-modal").find(".btn-go-to-cart").hide(),ella.showModal(".ajax-success-modal")},error:function(xhr,text){ella.hideLoading(),$(".loading-modal").hide(),$(".ajax-error-message").text($.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})})},initRemoveWishlist:function(){$(".btn-remove-wishlist").click(function(e){var row=$(this).parents("tr"),tagID=row.find(".tag-id").val(),form=jQuery("#remove-wishlist-form");form.find("input[name='contact[tags]']").val("x"+tagID),$.ajax({type:"POST",url:"/contact",data:form.serialize(),beforeSend:function(){ella.showLoading()},success:function(data){ella.hideLoading(),row.fadeOut(1e3)},error:function(xhr,text){ella.hideLoading(),$(".loading-modal").hide(),$(".ajax-error-message").text($.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})})},initColorSwatchGrid:function(){jQuery(".item-swatch li label").hover(function(){var newImage=jQuery(this).parent().find(".hidden a").attr("href");return jQuery(this).parents(".grid-item").find(".product-grid-image img").attr({src:newImage}),!1})},initInfiniteScrolling:function(){$(".infinite-scrolling").length>0&&$(".infinite-scrolling a").click(function(e){e.preventDefault(),$(this).hasClass("disabled")||ella.doInfiniteScrolling()}),window.infinitPos=0,$(window).scroll(function(event){if($(".infinite-scrolling").length>0){var pos=$(".infinite-scrolling").offset().top;$(this).scrollTop()>pos-600&&$(".infinite-scrolling").length>0&&$(".infinite-scrolling a:eq(0)").is(":visible")&&$(this).scrollTop()-window.infinitPos>1e3&&(window.infinitPos=$(this).scrollTop(),$(".infinite-scrolling a").trigger("click"),event.stopPropagation(),event.preventDefault())}})},doInfiniteScrolling:function(){var currentList=$(".block-row .products-grid");if(currentList.length||(currentList=$(".block-row .product-list")),currentList){var showMoreButton=$(".infinite-scrolling a").first();$.ajax({type:"GET",url:showMoreButton.attr("href"),beforeSend:function(){ella.showLoading(),$(".loading-modal").show(),showMoreButton.hide()},success:function(data){ella.hideLoading(),showMoreButton.show();var products=$(data).find(".block-row .products-grid");if(products.length||(products=$(data).find(".block-row .product-list")),products.length&&(currentList.append(products.children()),ella.translateBlock("."+currentList.attr("class")),ella.initQuickView(),ella.initAddToCart(),ella.initWishlist(),ella.initoptionsize(),$(data).find(".infinite-scrolling").length>0?showMoreButton.attr("href",$(data).find(".infinite-scrolling a").attr("href")):(showMoreButton.hide(),showMoreButton.next().show()),window.show_multiple_currencies&&window.shop_currency!=jQuery(".currencies").val()&&Currency.convertAll(window.shop_currency,jQuery(".currencies").val(),"span.money","money_format"),ella.initColorSwatchGrid(),$(".spr-badge").length>0))return window.SPR.registerCallbacks(),window.SPR.initRatingHandler(),window.SPR.initDomEls(),window.SPR.loadProducts(),window.SPR.loadBadges()},error:function(xhr,text){ella.hideLoading(),$(".loading-modal").hide(),$(".ajax-error-message").text($.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")},dataType:"html"})}},closeEmailModalWindow:function(){$("#email-modal").length>0&&$("#email-modal").is(":visible")&&$("#email-modal .modal-window").fadeOut(600,function(){$("#email-modal .modal-overlay").fadeOut(600,function(){$("#email-modal").hide(),$.cookie("emailSubcribeModal","closed",{expires:1,path:"/"})})})},showModal:function(selector){$(selector).fadeIn(500),ella.ellaTimeout=setTimeout(function(){$(selector).fadeOut(500)},5e3)},initToggleCollectionPanel:function(){$(".collection-sharing-btn").length>0&&$(".collection-sharing-btn").click(function(){$(".collection-sharing-panel").toggle(),$(".collection-sharing-panel").is(":visible")?($(".collection-sharing-btn").addClass("btn-hover"),$(".collection-filter-panel").hide(),$(".collection-filter-btn").removeClass("btn-hover")):$(".collection-sharing-btn").removeClass("btn-hover")}),$(".collection-filter-btn").length>0&&($(".collection-filter-btn").click(function(){$(".collection-filter-panel").toggle(),$(".collection-filter-panel").is(":visible")?($(".collection-filter-btn").addClass("btn-hover"),$(".collection-sharing-panel").hide(),$(".collection-sharing-btn").removeClass("btn-hover")):$(".collection-filter-btn").removeClass("btn-hover")}),$(".collection-filter-panel select").change(function(index){window.location=$(this).find("option:selected").val()}))},checkItemsInDropdownCart:function(){$(".dropdown-cart .mini-products-list").children().length>0?($(".dropdown-cart .no-items").hide(),$(".dropdown-cart .has-items").show()):($(".dropdown-cart .has-items").hide(),$(".dropdown-cart .no-items").show())},initModal:function(){$(".continue-shopping").click(function(){clearTimeout(ella.ellaTimeout),$(".ajax-success-modal").fadeOut(500)}),$(".close-modal, .overlay").click(function(){clearTimeout(ella.ellaTimeout),$(".ajax-success-modal").fadeOut(500)})},initDropDownCart:function(){window.dropdowncart_type=="click"?$(".cartToggle").
1click(function(){$(".dropdown-cart").is(":visible")?$(".dropdown-cart").slideUp("fast"):$(".dropdown-cart").slideDown("fast")}):"ontouchstart"in document?$(".cartToggle").click(function(){$(".dropdown-cart").is(":visible")?$(".dropdown-cart").slideUp("fast"):$(".dropdown-cart").slideDown("fast")}):($(".cartToggle").hover(function(){$(".dropdown-cart").is(":visible")||$(".dropdown-cart").slideDown("fast")}),$(".wrapper-top-cart").mouseleave(function(){$(".dropdown-cart").slideUp("fast")})),ella.checkItemsInDropdownCart(),$(".dropdown-cart .no-items a").click(function(){$(".dropdown-cart").slideUp("fast")}),$(".dropdown-cart .btn-remove").click(function(event){event.preventDefault();var productId=$(this).parents(".item").attr("id");productId=productId.match(/\d+/g),Shopify.removeItem(productId,function(cart){ella.doUpdateDropdownCart(cart)})})},closeDropdownCart:function(){$(".dropdown-cart").is(":visible")&&$(".dropdown-cart").slideUp("fast")},initDropdownSearch:function(){$(".nav-search .icon-search").click(function(){$(".header-bottom.on .search-bar").is(":visible")?$(".header-bottom.on .search-bar").slideUp("fast"):$(".header-bottom.on .search-bar").slideDown("fast")})},closeDropdownSearch:function(){$(".header-bottom.on .search-bar").is(":visible")&&$(".header-bottom.on .search-bar").slideUp("fast")},initProductMoreview:function(){$(".more-view-wrapper-owlslider").length>0?this.initOwlMoreview():$(".more-view-wrapper-jcarousel").length>0&&this.initJcarouselMoreview()},initOwlMoreview:function(){$(".more-view-wrapper-owlslider ul").owlCarousel({navigation:!0,items:5,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,3],itemsTabletSmall:[540,3],itemsMobile:[360,3]}).css("visibility","visible")},initJcarouselMoreview:function(){$(".more-view-wrapper-jcarousel ul").jcarousel({vertical:!0}).css("visibility","visible"),$(".product-img-box").addClass("has-jcarousel"),$(".more-view-wrapper").css("visibility","visible")},initCloudzoom:function(){$(window).width()>=1025?$(".picture-product .item-picture .fancybox").zoom():$(".picture-product .item-picture .fancybox").trigger("zoom.destroy")},initScrollTop:function(){$("#back-top").click(function(){return $("body,html").animate({scrollTop:0},400),!1})},initProductAddToCart:function(){$("#product-add-to-cart").length>0&&$("#product-add-to-cart").click(function(event){if(event.preventDefault(),$(this).attr("disabled")!="disabled")if(!window.ajax_cart)$(this).closest("form").submit();else{var variant_id=$("#add-to-cart-form select[name=id]").val();variant_id||(variant_id=$("#add-to-cart-form input[name=id]").val());var quantity=$("#add-to-cart-form input[name=quantity]").val();quantity||(quantity=1);var title=$(".product-title h2").html(),image=$(".picture-product .slick-current .product-featured-image").attr("src"),form=this.closest("form");ella.doAjaxAddToCart(variant_id,quantity,title,image,form)}return!1})},initAddToCart:function(){$(".add-to-cart-btn").length>0&&$(".add-to-cart-btn").click(function(event){if(event.preventDefault(),$(this).attr("disabled")!="disabled"){var productItem=$(this).parents(".product-item"),productId=$(productItem).attr("id");if(productId=productId.match(/\d+/g),!window.ajax_cart)$("#product-actions-"+productId).submit();else{var variant_id=$("#product-actions-"+productId+" select[name=id]").val();variant_id||(variant_id=$("#product-actions-"+productId+" input[name=id]").val());var quantity=$("#product-actions-"+productId+" input[name=quantity]").val();quantity||(quantity=1);var title=$(productItem).find(".product-title").html(),image=$(productItem).find(".product-grid-image img").attr("src"),form=this.closest("form");ella.doAjaxAddToCart(variant_id,quantity,title,image,form)}}return!1})},showLoading:function(){$(".loading-modal").show()},hideLoading:function(){$(".loading-modal").hide()},doAjaxAddToCart:function(variant_id,quantity,title,image,form){$.ajax({type:"post",url:"/cart/add.js",data:form?$(form).serialize():"quantity="+quantity+"&id="+variant_id,dataType:"json",beforeSend:function(){ella.showLoading()},success:function(msg){typeof BOLD=="object"&&BOLD.helpers&&typeof BOLD.helpers.cleanCart=="function"&&(msg=BOLD.helpers.cleanItem(msg)),msg.formatted_recurring_desc||(msg.formatted_recurring_desc=""),ella.hideLoading(),$(".ajax-success-modal").find(".ajax-product-title").html(ella.translateText(title)+msg.formatted_recurring_desc),$(".ajax-success-modal").find(".ajax-product-image").attr("src",image),$(".ajax-success-modal").find(".btn-go-to-wishlist").hide(),$(".ajax-success-modal").find(".btn-go-to-cart").show(),ella.showModal(".ajax-success-modal"),ella.updateDropdownCart()},error:function(xhr,text){ella.hideLoading(),$(".ajax-error-message").text($.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})},initQuickView:function(){$(".quickview-button a").click(function(){var product_handle=$(this).attr("id");return Shopify.getProduct(product_handle,function(product){var template=$("#quickview-template").html();$(".quick-view").html(template);var quickview=$(".quick-view");if(quickview.find(".product-title a").html(ella.translateText(product.title)),quickview.find(".product-title a").attr("href",product.url),quickview.find(".product-vendor span").length>0&&quickview.find(".product-vendor span").text(product.vendor),quickview.find(".product-type span").length>0&&quickview.find(".product-type span").text(product.type),quickview.find(".product-inventory span").length>0){var variant=product.variants[0],inventoryInfo=quickview.find(".product-inventory span");variant.available?variant.inventory_management!=null?inventoryInfo.text(window.inventory_text.in_stock):inventoryInfo.text(window.inventory_text.many_in_stock):inventoryInfo.text(window.inventory_text.out_of_stock)}if(product.description.indexOf("[countdown]")>0){var countdownTime=product.description.match(/\[countdown\](.*)\[\/countdown\]/);countdownTime&&countdownTime.length>0&&(quickview.find(".countdown").show(),quickview.find(".quickview-clock").countdown(countdownTime[1],function(event){$(this).html(event.strftime("%Dd %H:%M:%S"))}))}if(quickview.find(".product-description").length>0){var description=product.description.replace(/(<([^>]+)>)/ig,""),description=description.replace(/\[countdown\](.*)\[\/countdown\]/g,"");if(window.multi_lang&&description.indexOf("[lang2]")>0){var descList=description.split("[lang2]");jQuery.cookie("language")!=null?description=descList[translator.current_lang-1]:description=descList[0]}description=description.split(" ").splice(0,20).join(" ")+"...",quickview.find(".product-description").text(description)}else quickview.find(".product-description").remove();quickview.find(".price").html(Shopify.formatMoney(product.price,window.money_format)),quickview.find(".product-item").attr("id","product-"+product.id),quickview.find(".variants").attr("id","product-actions-"+product.id),quickview.find(".variants select").attr("id","product-select-"+product.id),product.compare_at_price>product.price?(quickview.find(".compare-price").html(Shopify.formatMoney(product.compare_at_price_max,window.money_format)).show(),quickview.find(".price").addClass("on-sale")):(quickview.find(".compare-price").html(""),quickview.find(".price").removeClass("on-sale")),product.available?(quickview.find(".total-price span").html(Shopify.formatMoney(product.price,window.money_format)),window.use_color_swatch?ella.createQuickViewVariantsSwatch(product,quickview):ella.createQuickViewVariants(product,quickview)):(quickview.find("select, input, .total-price, .dec, .inc, .variants label").remove(),quickview.find(".add-to-cart-btn").text(window.inventory_text.unavailable).addClass("disabled").attr("disabled","disabled")),quickview.find(".button").on("click",function(){var oldValue=quickview.find(".quantity").val(),newVal=1;$(this).text()=="+"?newVal=parseInt(oldValue)+1:oldValue>1&&(newVal=parseInt(oldValue)-1),quickview.find(".quantity").val(newVal),quickview.find(".total-price").length>0&&ella.updatePricingQuickview()}),window.show_multiple_currencies&&Currency.convertAll(window.shop_currency,jQuery(".currencies").val(),"span.money","money_format"),ella.loadQuickViewSlider(product,quickview),ella.initQuickviewAddToCart(),ella.translateBlock(".quick-view"),$(".quick-view").fadeIn(500),$(".quick-view .total-price").length>0&&$(".quick-view input[name=quantity]").on("change",ella.updatePricingQuickview)}),!1}),$(document).on("click",".quick-view .overlay, .close-window",function(){return ella.closeQuickViewPopup(),!1})},updatePricingQuickview:function(){var regex=/([0-9]+[.|,][0-9]+[.|,][0-9]+)/g,unitPriceTextMatch=$(".quick-view .price").text().match(regex);if(unitPriceTextMatch||(regex=/([0-9]+[.|,][0-9]+)/g,unitPriceTextMatch=$(".quick-view .price").text().match(regex)),unitPriceTextMatch){var unitPriceText=unitPriceTextMatch[0],unitPrice=unitPriceText.replace(/[.|,]/g,""),quantity=parseInt($(".quick-view input[name=quantity]").val()),totalPrice=unitPrice*quantity,totalPriceText=Shopify.formatMoney(totalPrice,window.money_format);regex=/([0-9]+[.|,][0-9]+[.|,][0-9]+)/g,totalPriceText.match(regex)||(regex=/([0-9]+[.|,][0-9]+)/g),totalPriceText=totalPriceText.match(regex)[0];var regInput=new RegExp(unitPriceText,"g"),totalPriceHtml=$(".quick-view .price").html().replace(regInput,totalPriceText);$(".quick-view .total-price span").html(totalPriceHtml)}},initQuickviewAddToCart:function(){$(".quick-view .add-to-cart-btn").length>0&&$(".quick-view .add-to-cart-btn").click(function(){var variant_id=$(".quick-view select[name=id]").val();variant_id||(variant_id=$(".quick-view input[name=id]").val());var quantity=$(".quick-view input[name=quantity]").val();quantity||(quantity=1);
1var title=$(".quick-view .product-title a").html(),image=$(".quick-view .quickview-featured-image img").attr("src"),form=this.closest("form");ella.doAjaxAddToCart(variant_id,quantity,title,image,form),ella.closeQuickViewPopup()})},updateDropdownCart:function(){Shopify.getCart(function(cart){ella.doUpdateDropdownCart(cart)})},doUpdateDropdownCart:function(cart){typeof BOLD=="object"&&BOLD.helpers&&typeof BOLD.helpers.cleanCart=="function"&&(cart=BOLD.helpers.cleanCart(cart));var template='<li class="item" id="cart-item-{ID}"><a href="{URL}" title="{TITLE}" class="product-image"><img src="{IMAGE}" alt="{TITLE}"></a><div class="product-details"><a href="javascript:void(0)" title="Remove This Item" class="btn-remove">X</a><p class="product-name"><a href="{URL}">{TITLE}</a></p><div class="cart-collateral">{QUANTITY} x <span class="price">{PRICE}</span></div></div></li>';if($(".cartCount").text(cart.item_count),$(".dropdown-cart .summary .price").html(Shopify.formatMoney(cart.total_price,window.money_format)),$(".dropdown-cart .mini-products-list").html(""),cart.item_count>0){for(var i2=0;i2<cart.items.length;i2++){var item=template;item=item.replace(/\{ID\}/g,cart.items[i2].id),item=item.replace(/\{URL\}/g,cart.items[i2].url),item=item.replace(/\{TITLE\}/g,ella.translateText(cart.items[i2].title)),item=item.replace(/\{QUANTITY\}/g,cart.items[i2].quantity),item=item.replace(/\{IMAGE\}/g,Shopify.resizeImage(cart.items[i2].image,"small")),item=item.replace(/\{PRICE\}/g,Shopify.formatMoney(cart.items[i2].price,window.money_format)),$(".dropdown-cart .mini-products-list").append(item)}$(".dropdown-cart .btn-remove").click(function(event){event.preventDefault();var productId=$(this).parents(".item").attr("id");productId=productId.match(/\d+/g),Shopify.removeItem(productId,function(cart2){ella.doUpdateDropdownCart(cart2)})}),ella.checkNeedToConvertCurrency()&&Currency.convertAll(window.shop_currency,jQuery(".currencies").val(),".dropdown-cart span.money","money_format")}ella.checkItemsInDropdownCart()},checkNeedToConvertCurrency:function(){return window.show_multiple_currencies&&Currency.currentCurrency!=shopCurrency},loadQuickViewSlider:function(product,quickviewTemplate){var product_container=quickviewTemplate.find(".quickview-featured-image"),count=0;for(i in product.images)if(count<product.images.length){var featuredImage=Shopify.resizeImage(product.images[i],"grande"),item='<div class="qv_item"><a href="'+product.url+'"><img src="'+featuredImage+'" title="'+product.title+'" /></a></div>';product_container.append(item),count=count+1}var product_thumbnails=quickviewTemplate.find(".more-view-wrapper ul"),count=0;for(i in product.images)if(count<product.images.length){var grande=Shopify.resizeImage(product.images[i],"grande"),compact=Shopify.resizeImage(product.images[i],"compact"),item='<li class="grid-item"><a href="javascript:void(0)" data-image="'+grande+'"><img src="'+compact+'" /></a></li>';product_thumbnails.append(item),count=count+1}setTimeout(function(){ella.image_product_slick(product_container,product_thumbnails)},500)},convertToSlug:function(text){return text.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},createQuickViewVariantsSwatch:function(product,quickviewTemplate){if(product.variants.length>1){for(var i2=0;i2<product.variants.length;i2++){var variant=product.variants[i2],option='<option value="'+variant.id+'">'+variant.title+"</option>";quickviewTemplate.find("form.variants > select").append(option)}new Shopify.OptionSelectors("product-select-"+product.id,{product:product,onVariantSelected:selectCallbackQuickview});for(var filePath=window.file_url.substring(0,window.file_url.lastIndexOf("?")),assetUrl=window.asset_url.substring(0,window.asset_url.lastIndexOf("?")),options="",i2=0;i2<product.options.length;i2++){options+='<div class="swatch clearfix" data-option-index="'+i2+'">',options+='<div class="header">'+product.options[i2].name+"</div>";var is_color=!1;/Color|Colour/i.test(product.options[i2].name)&&(is_color=!0);for(var optionValues=new Array,j=0;j<product.variants.length;j++){var variant=product.variants[j],value=variant.options[i2],valueHandle=this.convertToSlug(value),forText="swatch-"+i2+"-"+valueHandle;if(variant.featured_image!=null&&window.use_variant_swatch==!0)var variant_swatch=variant.featured_image.src;else var variant_swatch=filePath+valueHandle+".png";optionValues.indexOf(value)<0&&(options+='<div data-value="'+value+'" class="swatch-element '+(is_color?"color":"")+valueHandle+(variant.available?" available ":" soldout ")+'">',is_color&&(options+='<div class="tooltip">'+value+"</div>"),options+='<input id="'+forText+'" type="radio" name="option-'+i2+'" value="'+value+'" '+(j==0?" checked ":"")+(variant.available?"":" disabled")+" />",is_color?options+='<label for="'+forText+'" style="background-color: '+valueHandle+";background-size: cover; background-image: url("+variant_swatch+')"><img class="crossed-out" src="'+assetUrl+'soldout.png" /></label>':options+='<label for="'+forText+'">'+value+'<img class="crossed-out" src="'+assetUrl+'soldout.png" /></label>',options+="</div>",variant.available&&$('.quick-view .swatch[data-option-index="'+i2+'"] .'+valueHandle).removeClass("soldout").addClass("available").find(":radio").removeAttr("disabled"),optionValues.push(value))}options+="</div>"}quickviewTemplate.find("form.variants > select").after(options),quickviewTemplate.find(".swatch :radio").change(function(){var optionIndex=$(this).closest(".swatch").attr("data-option-index"),optionValue=$(this).val();$(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")}),product.available&&(Shopify.optionsMap={},Shopify.linkOptionSelectors(product))}else{quickviewTemplate.find("form.variants > select").remove();var variant_field='<input type="hidden" name="id" value="'+product.variants[0].id+'">';quickviewTemplate.find("form.variants").append(variant_field)}},createQuickViewVariants:function(product,quickviewTemplate){if(product.variants.length>1){for(var i2=0;i2<product.variants.length;i2++){var variant=product.variants[i2],option='<option value="'+variant.id+'">'+variant.title+"</option>";quickviewTemplate.find("form.variants > select").append(option)}if(new Shopify.OptionSelectors("product-select-"+product.id,{product:product,onVariantSelected:selectCallbackQuickview}),product.options.length==1){$(".selector-wrapper:eq(0)").prepend("<label>"+product.options[0].name+"</label>");for(var text=product.variants,r=0;r<text.length;r++){var s=text[r];s.available||jQuery(".single-option-selector option").filter(function(){return jQuery(this).html()===s.title}).remove()}}$(".quick-view .single-option-selector").selectize(),$(".quick-view .selectize-input input").attr("disabled","disabled"),quickviewTemplate.find("form.variants .selector-wrapper label").each(function(i3,v){$(this).html(product.options[i3].name)})}else{quickviewTemplate.find("form.variants > select").remove();var variant_field='<input type="hidden" name="id" value="'+product.variants[0].id+'">';quickviewTemplate.find("form.variants").append(variant_field)}},closeQuickViewPopup:function(){$(".quick-view").fadeOut(500)},translateText:function(str){if(!window.multi_lang||str.indexOf("|")<0)return str;if(window.multi_lang){var textArr=str.split("|");return translator.isLang2()?textArr[1]:textArr[0]}},translateBlock:function(blockSelector){window.multi_lang&&translator.isLang2()&&translator.doTranslate(blockSelector)},image_product_slick:function(product_container,product_thumbnails){product_container.not(".slick-initialized").slick({slidesToShow:1,slidesToScroll:1,arrows:!1,fade:!0,asNavFor:product_thumbnails}),product_thumbnails.not(".slick-initialized").slick({slidesToShow:$(".product-photo-container").data("item"),slidesToScroll:1,asNavFor:product_container,dots:!1,focusOnSelect:!0,horizontalSwiping:$(".product-photo-container").data("moreview"),horizontal:$(".product-photo-container").data("moreview")})},product_slick:function(){var product_container=$(".product-photo-container .picture-product"),product_thumbnails=$(".product-thumbnails .picture-thumbnails");ella.image_product_slick(product_container,product_thumbnails),ella.initCloudzoom()},header_mobile:function(){$(".mn_mobile nav ul").html($(".site-nav").html()),$(".mn_mobile .icon-menu, .customer-mb .ico_user").click(function(){$("html").hasClass("open-mn")?$("html").removeClass("open-mn"):$("html").addClass("open-mn")}),$(".hd_mobile .customer-area .ico_user").click(function(){$("html").hasClass("open-user")?$("html").removeClass("open-user"):$("html").addClass("open-user")}),$(".overlay-mn, .close_user").click(function(){$("html").removeClass("open-mn"),$("html").removeClass("open-user")}),$(".hd_mobile .icon-dropdown").click(function(e){e.preventDefault(),$(this).hasClass("mobile-toggle-open")?($(this).parent().next().hide(),$(this).removeClass("mobile-toggle-open")):($(this).parent().next().show(),$(this).addClass("mobile-toggle-open"))});var w=window.innerWidth;w<1024&&jQuery(".hd_mobile .dropdown .menu__moblie").bind("click",function(event){currentEl!=this&&($(this).next().show(),$(this).prev().addClass("mobile-toggle-open"),$(this).find(".icon-dropdown").addClass("mobile-toggle-open"),event.preventDefault(),currentEl=this)})},hide_filter:function(){$(".sidebar-custom .widget-content ul").each(function(){$(this).children("li").length>0?$(this).parents(".sidebar-custom").show():$(this).parents(".sidebar-custom").hide()})},Page_brands:function(){$(".brands-list .brand").each(function(){var chi=$(this).find(".azbrands-title h3").text().trim(),ch=$(this).find("ul.brandgrid li:eq(0)").text().charAt(0);$(".azbrandstable").children().each(function(){if($(this).find("a").text().trim()==chi){$(this).find("a").hasClass("readonly")||$(this).find("a").addClass("readonly");return}}),$(this).find(".azbrands-title").length==0&&($(this).find("ul.brandgrid").children().appendTo(".brand-"+ch+" ul.brandgrid"),$(this).remove())}),$(".azbrandstable .vendor-letter a.readonly").click(function(){var v=$(this).text();$(".brands-list .brand").hide().filter(function(e){var n=$(this).find("h3").text();return n==v}).show(),$(".azbrandstable .all-brand a").click(function(){$(".brands-list .brand").show()})}),$(".azbrandstable a.readonly").click(function(){$(".azbrandstable a").removeClass("active");var $this=$(this);$this.hasClass("active")||$this.addClass("active");var topbrand=$(".header").outerHeight();$("html, body").animate({scrollTop:topbrand},400)}),$(".logo-brands").each(function(){var brand_slider=$(this).find(".slide-logo");brand_slider.length&&brand_slider.not(".slick-initialized").slick({slidesToShow:brand_slider.data("row"),slidesToScroll:brand_slider.data("row"),arrows:!0,nextArrow:'<button type="button" class="slick-next"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 17 33" xml:space="preserve"><g id="e4eb89a6-f885-43b8-9259-0d6b1516fab0"><g id="_x38_e584754-6657-46f1-a9d8-2cfd6623b552"><g><polygon points="14.9,14.5 0,0 0,3.7 11.1,14.5 13.2,16.5 11.1,18.5 0,29.3 0,33 14.9,18.5 17,16.5 "/></g></g></g></svg></button>',prevArrow:'<button type="button" class="slick-prev"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 33"><g id="7f9a1925-e8c7-4614-8787-3c6095a9f6e1" data-name="Layer 2"><g id="c9b7920a-81fa-4bfe-ad13-4da717c6854b" data-name="Layer 1"><g id="c2d982ff-0cf6-4220-b365-47f30d708fea" data-name="e4eb89a6-f885-43b8-9259-0d6b1516fab0">
1<g id="f51d455e-6b9c-4c4e-96db-a5004582beda" data-name="8e584754-6657-46f1-a9d8-2cfd6623b552"><polygon points="0 16.5 2.1 18.5 17 33 17 29.3 5.9 18.5 3.8 16.5 5.9 14.5 17 3.7 17 0 2.1 14.5 0 16.5"/></g></g></g></g></svg></button>',speed:1e3,dots:!1,responsive:[{breakpoint:1025,settings:{slidesToShow:4,slidesToScroll:4}},{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3,dots:!1,arrows:!1}},{breakpoint:767,settings:{slidesToShow:2,slidesToScroll:2,dots:!1,arrows:!1}}]})})},initWishList:function(e){var ListWishList=$(".wishlist-content"),button=$(".wishlist-btn"),itemsArray=localStorage.getItem("items")?JSON.parse(localStorage.getItem("items")):[];localStorage.setItem("items",JSON.stringify(itemsArray));var data=JSON.parse(localStorage.getItem("items"));itemsArray.length>0&&(itemsArray=JSON.parse(localStorage.getItem("items")));var currentpage=1,pagecount=0;ella.translateBlock(".wishlist-page");var dataWishlist=function(ProductHandle){jQuery.getJSON("/products/"+ProductHandle+".js",function(product){var productHTML="",price_min=Shopify.formatMoney(product.price_min,window.money_format);productHTML+='<div class="wishlist-product-content wishlist-tile-container product-item grid-item" data-product-handle="'+product.handle+'" data-id="'+product.id+'">',productHTML+='<div class="row">',productHTML+='<div class="product-image col-sm-2"><a href="'+product.url+'"><image src="'+product.featured_image+'" /></a></div>',productHTML+='<div class="product-bottom col-sm-5">',productHTML+='<div class="product-vendor">'+product.vendor+"</div>",productHTML+='<a class="product-title" href="'+product.url+'">'+product.title+"</a>",productHTML+="</div>",productHTML+='<div class="price-box col-sm-2">'+price_min+"</div>",productHTML+='<div class="col-sm-1 text-center wishlist-button"><a class="btn-active wishlist-btn" href="#" data-id="'+product.id+'"></a></div>',productHTML+='<div class="col-sm-2 text-center wishlist-button"><div class="action"><form action="/cart/add" method="post" class="variants" enctype="multipart/form-data">',productHTML+='<input type="hidden" name="id" value="'+product.variants[0].id+'" /> ',product.available?(product.variants.length==1&&(productHTML+='<input class="btn add-to-cart-btn1" type="submit" value="'+window.inventory_text.add_to_cart+'"/>'),product.variants.length>1&&(productHTML+='<a class="btn add-to-cart-btn1" href="'+product.url+'">'+window.inventory_text.select_options+"</a>")):productHTML+='<input class="btn add-to-cart-btn1" disabled="disabled" type="submit" value="'+window.inventory_text.unavailable+'"/>',productHTML+="</div></form></div>",productHTML+="</div></div>",productHTML.textContent=product,ListWishList.append(productHTML).html();var currentpage2=1,pagecount2=0;function showpage(page){$(".wishlist-page .grid-item").hide(),$(".wishlist-page .grid-item").eq((page-1)*3).show().next().show().next().show(),$("#pagin").find("a").removeClass("current").eq(page).addClass("current")}$(".wishlist-page #pagin").on("click","a",function(event){event.preventDefault(),$(this).html()=="next"?currentpage2++:$(this).html()=="previous"?currentpage2--:currentpage2=$(this).html(),currentpage2<1&&(currentpage2=1),currentpage2>pagecount2&&(currentpage2=pagecount2),showpage(currentpage2)}),$(document).ready(function(){pagecount2=Math.floor($(".wishlist-page .grid-item").size()/3),$(".wishlist-page .grid-item").size()%3>0&&pagecount2++,$(".wishlist-page #pagin").html("<li><a>previous</a></li>");for(var i2=1;i2<=pagecount2;i2++)$("#pagin").append('<li><a class="current">'+i2+"</a></li>");$(".wishlist-page #pagin").append("<li><a>next</a></li>"),showpage(1)})})},updateWishlist=function(self2){var ProductHandle=$(self2).attr("data-product-handle");jQuery.getJSON("/products/"+ProductHandle+".js",function(product){itemsArray.push(ProductHandle),localStorage.setItem("items",JSON.stringify(itemsArray)),dataWishlist(ProductHandle);var x=itemsArray.length;$(".wishlist .wishCount").text(x)})},le=function(self2){var x=itemsArray.length;$(".wishlist .wishCount").text(x)};data.forEach(function(item){dataWishlist(item)}),$(document).on("click",".wishlist-btn:not(.btn-active)",function(e2){e2.preventDefault(),$(this).toggleClass("btn-active"),$(this).find(".wishlist_text").text(window.inventory_text.remove_wishlist),updateWishlist(this)}),$(document).on("click",".btn-active",function(e2){$(this).find(".wishlist_text").text(window.inventory_text.add_wishlist),e2.preventDefault();var ProductHandle=$(self).attr("data-product-handle"),removeIndex=itemsArray.indexOf(ProductHandle),dataID=$(this).data("id");$(".wishlist-content .grid-item").each(function(t){var compareID=$(this).data("id");if(dataID===compareID){var showpage2=function(page){$(".wishlist-page .grid-item").hide(),$(".wishlist-page .grid-item").eq((page-1)*3).show().next().show().next().show(),$("#pagin").find("a").removeClass("current").eq(page).addClass("current")}
1,showpage=showpage2;$(this).remove(),pagecount=Math.floor($(".wishlist-page .grid-item").size()/3),$(".wishlist-page .grid-item").size()%3>0&&pagecount++,currentpage<1&&(currentpage=1),currentpage>pagecount&&(currentpage=pagecount),$(".wishlist-page #pagin").html("<li><a>previous</a></li>");for(var i2=1;i2<=pagecount;i2++)$("#pagin").append('<li><a class="current">'+i2+"</a></li>");$(".wishlist-page #pagin").append("<li><a>next</a></li>"),showpage2(currentpage)}$(".wishlist-content .grid-item").css("display")==="block"&&$(".wishlist-content .grid-item").eq(0).next().show().next().show()}),itemsArray.splice(removeIndex,1),localStorage.setItem("items",JSON.stringify(itemsArray)),$(this).removeClass("btn-active"),le()}),$(".wishlist-btn").each(function(){var ProductHandle=$(this).attr("data-product-handle");itemsArray.indexOf(ProductHandle)>-1&&($(this).addClass("btn-active"),$(this).find(".wishlist_text").text(window.inventory_text.remove_wishlist))}),le()},initoptionsize:function(){$(window).innerWidth()<1025?$(".option-size-dk .product-grid-options-size").remove():$(".option-size-mb .product-grid-options-size").remove()},cookie_popup:function(){$("#accept-cookies").show(),$.cookie("cookieMessage")=="closed"&&$("#accept-cookies").remove(),$("#accept-cookies .btn").bind("click",function(){$("#accept-cookies").remove(),$.cookie("cookieMessage","closed",{expires:1,path:"/"})}),$("#accept-cookies .close").bind("click",function(){$("#accept-cookies").remove()})},initStickyAddtoCart:function(){$("#grouped-add-to-cart").length&&$(".sticky_form .sticky-item.extra").remove();var p=$("#product-selectors option:selected").val(),t=$('.sticky_form .pr-swatch[data-value="'+p+'"]').text();$(".pr-selectors .pr-active").text(t),$('.sticky_form .pr-swatch[data-value="'+p+'"]').addClass("active"),$(".swatch .swatch-element").each(function(e){var dav=$(this).data("value");$('.swatch input.text[data-value="'+dav+'"]').appendTo($(this))}),$(".selector-wrapper").change(function(){var n=$("#product-selectors").val();if($(".sticky_form .pr-selectors li").each(function(e){var t2=$(this).find("a").data("value");t2==n?$(this).find("a").addClass("active"):$(this).find("a").removeClass("active")}),$("#product-selectors").change(function(){var str="";$("#product-selectors option:selected").each(function(){str+=$(this).data("imge")}),$(".sticky_form .pr-img img").attr("src",str)}).trigger("change"),$(".sticky_form .pr-swatch").hasClass("active")){var h=$(".sticky_form .pr-swatch.active").text();$(".sticky_form .action input[type=hidden]").val(n),$(".sticky_form .pr-active").text(h),$(".sticky_form .pr-active").attr("data-value",n)}}),$("body").on("click touchstart",function(e){var container=$(".sticky_form .pr-active"),swatchList=container.next(),swatchLink=swatchList.find("a");!container.is(e.target)&&container.has(e.target).length===0&&!swatchList.is(e.target)&&swatchList.has(e.target).length===0&&!swatchLink.is(e.target)&&swatchLink.has(e.target).length===0&&$(".sticky_form").removeClass("open-sticky")}),$(".sticky_form .pr-active").on("click",function(){$(".sticky_form").toggleClass("open-sticky")}),$(".sticky_form .pr-swatch").on("click",function(e){e.stopPropagation(),$(".sticky_form .pr-swatch").removeClass("active"),$(this).addClass("active"),$(".sticky_form").toggleClass("open-sticky");var text=$(this).text(),value=$(this).data("value");$(".sticky_form .action input[type=hidden]").val(value),$(".sticky_form .pr-active").attr("data-value",value),$(".sticky_form .pr-active").text(text),$('.swatch input.text[data-v="'+value+'"]').parent().find(".tric").click(),$(this).hasClass("sold-out")?$(".sticky-add-to-cart").val(window.inventory_text.sold_out).addClass("disabled").attr("disabled","disabled"):$(".sticky-add-to-cart").removeClass("disabled").removeAttr("disabled").val(window.inventory_text.add_to_cart);var newImage=$(this).data("img");return $(".pr-img img").attr({src:newImage}),!1}),$(document).on("click",".sticky-add-to-cart",function(event){return event.preventDefault(),$("#grouped-add-to-cart").length?$("#grouped-add-to-cart").click():$("#product-add-to-cart").click(),!1});var height=$(".product").outerHeight();$(window).scroll(function(){var scrollTop=$(this).scrollTop();scrollTop>height?$("body").addClass("show_sticky"):$("body").removeClass("show_sticky")}
1),$(".sticky_form .extra .button").off("click").on("click",function(e){e.preventDefault();var oldValue=jQuery("#quantity").val(),newVal=1;jQuery(this).hasClass("sticky_inc")?newVal=parseInt(oldValue)+1:oldValue>1&&(newVal=parseInt(oldValue)-1),jQuery("#quantity").val(newVal),$(".sticky_form .extra .qty-input").val(newVal),updatePricing()})},changeQttCart:function(){$(".qtt-group .button").on("click",function(){var numInput=$(this).parent().find("input[id^='updates_']"),oldValue=numInput.val(),newVal=1;$(this).text()=="+"?newVal=parseInt(oldValue)+1:oldValue>1&&(newVal=parseInt(oldValue)-1),numInput.val(newVal)})}};$(document).on("shopify:section:load",ella.product_slick).on("shopify:section:unload",ella.product_slick)})(jQuery); 2//# sourceMappingURL=/cdn/shop/t/19/assets/ella.js.map?v=121331679604420839631643236969
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.