var woodmartThemeModule,wooFile=!1;!function(a){"use strict";woodmartThemeModule=function(){var b={popupEffect:"mfp-move-horizontal",bootstrapTooltips:".woodmart-tooltip, .woodmart-hover-icons .woodmart-buttons .wd-action-btn:not(.wd-add-cart-btn) > a, .woodmart-hover-icons .woodmart-buttons .wd-add-cart-btn, body:not(.catalog-mode-on):not(.login-see-prices) .woodmart-hover-base .wd-bottom-actions .wd-action-btn.wd-style-icon:not(.wd-add-cart-btn) > a, body:not(.catalog-mode-on):not(.login-see-prices) .woodmart-hover-base .wd-bottom-actions .wd-action-btn.wd-style-icon.wd-add-cart-btn, .woodmart-hover-base .wd-compare-btn > a, .woodmart-products-nav .woodmart-back-btn"};return{init:function(){b.disableNanoScrollerWebkit="webkit"==woodmart_settings.disable_nanoscroller&&("Chrome"==jscd.browser||"Opera"==jscd.browser||"Safari"==jscd.browser),this.headerBanner(),this.headerBuilder(),this.visibleElements(),this.bannersHover(),this.portfolioEffects(),this.parallax(),this.googleMap(),this.scrollTop(),this.sidebarMenu(),this.widgetsHidable(),this.stickyColumn(),this.mfpPopup(),this.blogMasonry(),this.blogLoadMore(),this.portfolioLoadMore(),this.equalizeColumns(),this.menuSetUp(),this.menuOffsets(),this.onePageMenu(),this.mobileNavigation(),this.simpleDropdown(),this.promoPopup(),this.contentPopup(),this.cookiesPopup(),this.btnsToolTips(),this.stickyFooter(),this.countDownTimer(),this.nanoScroller(),this.gradientShift(),this.videoPoster(),this.mobileSearchIcon(),this.fullScreenMenu(),this.searchFullScreen(),this.wooInit(),this.lazyLoading(),this.ajaxSearch(),this.photoswipeImages(),this.stickySocialButtons(),this.animationsOffset(),this.hiddenSidebar(),this.imageHotspot(),this.woodSliderLazyLoad(),this.owlCarouselInit(),this.portfolioPhotoSwipe(),this.woocommerceNotices(),this.menuDropdownsAJAX(),this.instagramAjaxQuery(),this.footerWidgetsAccordion(),this.googleMapInit(),this.moreCategoriesButton(),this.buttonSmoothScroll(),this.ageVerify(),this.htmlBlockColorSchemeSwitcher(),this.view3d(),this.infoboxSvg(),this.imagesGalleryMasonry(),this.imagesGalleryJustified(),a(window).resize()},wooInit:function(){woodmart_settings.woo_installed&&(this.loginDropdown(),this.loginSidebar(),this.productLoaderPosition(),this.initZoom(),this.woocommerceWrappTable(),this.woocommerceComments(),this.onRemoveFromCart(),this.woocommerceQuantity(),this.cartWidget(),this.ajaxFilters(),this.shopPageInit(),this.filtersArea(),this.categoriesMenu(),this.headerCategoriesMenu(),this.loginTabs(),this.productVideo(),this.product360Button(),this.wishList(),this.compare(),this.woodmartCompare(),this.productsLoadMore(),this.productsTabs(),this.swatchesVariations(),this.swatchesOnGrid(),this.quickViewInit(),this.quickShop(),this.addToCart(),this.productAccordion(),this.productImagesGallery(),this.productImages(),this.stickyDetails(),this.stickyAddToCart(),this.stickySidebarBtn(),this.productMoreDescription(),this.variationsPrice(),this.wishlist(),this.singleProductTabsAccordion(),this.singleProductTabsCommentsFix(),this.commentImage(),this.commentImagesUploadValidation(),this.wcTabsHoverFix(),this.gridQuantity(),this.miniCartQuantity(),this.swatchesLimit())},imagesGalleryMasonry:function(){if(void 0!==a.fn.isotope&&void 0!==a.fn.imagesLoaded){var b=a(".view-masonry .gallery-images");b.imagesLoaded(function(){b.isotope({gutter:0,isOriginLeft:!a("body").hasClass("rtl"),itemSelector:".woodmart-gallery-item"})})}},imagesGalleryJustified:function(){a(".view-justified").each(function(){a(this).find(".gallery-images").justifiedGallery({margins:1,cssAnimation:!0})})},infoboxSvg:function(){a(".woodmart-info-box.with-animation").each(function(){a(this).find(".info-svg-wrapper > svg").length>0&&new Vivus(a(this).find(".info-svg-wrapper > svg")[0],{type:"delayed",duration:200,start:"inViewport",animTimingFunction:Vivus.EASE_OUT})})},view3d:function(){a(".woodmart-threed-view").each(function(){var b=a(this),c=b.data("args");if(b.hasClass("threesixty-ready")||!c)return!1;b.ThreeSixty({totalFrames:c.frames_count,endFrame:c.frames_count,currentFrame:1,imgList:".threed-view-images",progress:".spinner",imgArray:c.images,height:c.height,width:c.width,responsive:!0,navigation:!0})})},htmlBlockColorSchemeSwitcher:function(){a(".wd-html-block-scheme-switcher > div").on("click",function(){a(".website-wrapper").css("background-color",a(this).data("color"))})},buttonSmoothScroll:function(){a(".woodmart-button-wrapper.wd-smooth-scroll a").on("click",function(b){b.stopPropagation(),b.preventDefault();var c=a(this),d=c.parent().data("smooth-time"),e=c.parent().data("smooth-offset"),f=c.attr("href").split("#")[1],g=a("#"+f);if(!(g.length<1)){var h=g.offset().top;a("html, body").animate({scrollTop:h-e},d)}})},moreCategoriesButton:function(){a(".wd-more-cat").each(function(){var b=a(this);b.find(".wd-more-cat-btn a").on("click",function(a){a.preventDefault(),b.addClass("wd-show-cat")})})},googleMapInit:function(){a(".google-map-container").each(function(){var b=a(this),c=b.data("map-args"),d={locations:[{lat:c.latitude,lon:c.longitude,icon:c.marker_icon,animation:google.maps.Animation.DROP}],controls_on_map:!1,map_div:"#"+c.selector,start:1,map_options:{zoom:parseInt(c.zoom),scrollwheel:"yes"===c.mouse_zoom}};c.json_style&&!c.elementor?(d.styles={},d.styles[woodmart_settings.google_map_style_text]=a.parseJSON(c.json_style)):c.json_style&&c.elementor&&(d.styles={},d.styles[woodmart_settings.google_map_style_text]=a.parseJSON(atob(c.json_style))),"yes"===c.marker_text_needed&&(d.locations[0].html=c.marker_text),"button"===c.init_type?b.find(".woodmart-init-map").on("click",function(a){a.preventDefault(),b.hasClass("woodmart-map-inited")||(b.addClass("woodmart-map-inited"),new Maplace(d).Load())}):"scroll"===c.init_type?(a(window).scroll(function(){if(window.innerHeight+a(window).scrollTop()+parseInt(c.init_offset)>b.offset().top){if(b.hasClass("woodmart-map-inited"))return;b.addClass("woodmart-map-inited"),new Maplace(d).Load()}}),a(window).scroll()):new Maplace(d).Load()})},footerWidgetsAccordion:function(){a(window).width()>=576||a(".footer-widget-collapse .widget-title").on("click",function(){var b=a(this),c=b.parent(),d=c.find("> *:not(.widget-title)");c.hasClass("footer-widget-opened")?(c.removeClass("footer-widget-opened"),d.stop().slideUp(200)):(c.addClass("footer-widget-opened"),d.stop().slideDown(200))})},instagramAjaxQuery:function(){a(".instagram-widget").each(function(){var b=a(this);if(b.hasClass("instagram-with-error")){var c=b.data("username"),d=b.data("atts"),e=c.indexOf("#")>-1?"explore/tags/"+c.substr(1):c,f="https://www.instagram.com/"+e+"/";b.addClass("loading"),a.ajax({url:f,success:function(c){a.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_instagram_ajax_query",body:c,atts:d},dataType:"json",method:"POST",success:function(a){b.parent().html(a),woodmartThemeModule.owlCarouselInit()},error:function(a){console.log("instagram ajax error")}})},error:function(a){console.log("instagram ajax error")}})}})},menuDropdownsAJAX:function(){function a(a){d.each(function(){var d=jQuery(this);d.hasClass("dropdowns-loading")||d.hasClass("dropdowns-loaded")||c(d,50,a)&&b(d)})}function b(a){a.addClass("dropdowns-loading");var b=a.find(".dropdown-load-ajax"),c=[];b.each(function(){c.push(jQuery(this).find(".dropdown-html-placeholder").data("id"))}),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_load_html_dropdowns",ids:c},dataType:"json",method:"POST",success:function(b){"success"==b.status?(Object.keys(b.data).forEach(function(c){var d=b.data[c];a.find('[data-id="'+c+'"]').replaceWith(d)}),woodmartThemeModule.owlCarouselInit()):console.log("loading html dropdowns returns wrong data - ",b.message)},error:function(a){console.log("loading html dropdowns ajax error")},complete:function(){a.removeClass("dropdowns-loading").addClass("dropdowns-loaded")}})}function c(a,b,c){var d=a.offset().left-b,e=a.offset().top-b,f=d+a.width()+2*b,g=e+a.height()+2*b,h=c.pageX,i=c.pageY;return h>d&&he&&i1024||(c.on("click",function(){return b.hasClass("hotspot-opened")?b.removeClass("hotspot-opened"):(b.addClass("hotspot-opened"),b.siblings().removeClass("hotspot-opened")),a(document).trigger("wood-images-loaded"),!1}),a(document).on("click",function(c){var d=c.target;if(b.hasClass("hotspot-opened")&&!a(d).is(".woodmart-image-hotspot")&&!a(d).parents().is(".woodmart-image-hotspot"))return b.removeClass("hotspot-opened"),!1}))}),a(".woodmart-image-hotspot-wrapper").each(function(){var b=a(this);b.imagesLoaded(function(){b.addClass("loaded")})}),a(".woodmart-image-hotspot .hotspot-content").each(function(){var b=a(this),c=b.offset().left,d=a(window).width()-(c+b.outerWidth());a(window).width()>768&&(c<=0&&b.addClass("hotspot-overflow-right"),d<=0&&b.addClass("hotspot-overflow-left")),a(window).width()<=768&&(c<=0&&b.css("marginLeft",Math.abs(c-15)+"px"),d<=0&&b.css("marginLeft",d-15+"px"))})},hiddenSidebar:function(){a("body").on("click",".woodmart-show-sidebar-btn, .woodmart-sticky-sidebar-opener",function(b){b.preventDefault(),a(".sidebar-container").hasClass("show-hidden-sidebar")?woodmartThemeModule.hideShopSidebar():c()}),a("body").on("click touchstart",".woodmart-close-side, .close-side-widget",function(){woodmartThemeModule.hideShopSidebar()});var c=function(){a(".sidebar-container").addClass("show-hidden-sidebar"),a(".woodmart-close-side").addClass("woodmart-close-side-opened"),a(".woodmart-show-sidebar-btn").addClass("btn-clicked"),a(window).width()>=1024&&!b.disableNanoScrollerWebkit&&"disable"!=woodmart_settings.disable_nanoscroller&&a(".sidebar-inner.woodmart-sidebar-scroll").nanoScroller({paneClass:"woodmart-scroll-pane",sliderClass:"woodmart-scroll-slider",contentClass:"woodmart-sidebar-content",preventPageScrolling:!1})}},hideShopSidebar:function(){a(".woodmart-show-sidebar-btn").removeClass("btn-clicked"),a(".sidebar-container").removeClass("show-hidden-sidebar"),a(".woodmart-close-side").removeClass("woodmart-close-side-opened"),b.disableNanoScrollerWebkit||"disable"==woodmart_settings.disable_nanoscroller||a(".sidebar-inner.woodmart-scroll").nanoScroller({destroy:!0})},animationsOffset:function(){void 0!==a.fn.waypoint&&a(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").waypoint(function(){a(this).addClass("wpb_start_animation animated")},{offset:"100%"})},stickySocialButtons:function(){a(".woodmart-sticky-social").addClass("buttons-loaded")},photoswipeImages:function(){a(".photoswipe-images").each(function(){var c=a(this);c.on("click","a",function(d){d.preventDefault();var e=a(d.currentTarget).data("index")-1,f=b(c,[]);woodmartThemeModule.callPhotoSwipe(e,f)})});var b=function(b,d){var e,f,g,h;return b.find("a").each(function(){e=a(this).attr("href"),f=a(this).data("width"),g=a(this).data("height"),h=a(this).attr("title"),c(d,e)||d.push({src:e,w:f,h:g,title:h})}),d},c=function(a,b){var c;for(c=0;c a").on("click",function(b){b.preventDefault(),a("body").toggleClass("full-screen-menu-open")}),a(document).keyup(function(b){27===b.keyCode&&a(".full-screen-close-icon").click()}),a(".full-screen-close-icon").on("click",function(){a("body").removeClass("full-screen-menu-open"),setTimeout(function(){a(".full-screen-nav .menu-item-has-children").removeClass("sub-menu-open"),a(".full-screen-nav .menu-item-has-children .icon-sub-fs").removeClass("up-icon")},200)}),a(".full-screen-nav .menu > .menu-item.menu-item-has-children, .full-screen-nav .menu-item-design-default.menu-item-has-children .menu-item-has-children").append(''),a(".full-screen-nav").on("click",".icon-sub-fs",function(b){var c=a(this),d=c.parent();b.preventDefault(),d.hasClass("sub-menu-open")?(d.removeClass("sub-menu-open"),c.removeClass("up-icon")):(d.siblings(".sub-menu-open").find(".icon-sub-fs").removeClass("up-icon"),d.siblings(".sub-menu-open").removeClass("sub-menu-open"),d.addClass("sub-menu-open"),c.addClass("up-icon"))})},mobileSearchIcon:function(){a(".mobile-search-icon.search-button").on("click",function(b){b.preventDefault(),a(".mobile-nav").hasClass("act-mobile-menu")||(a(".mobile-nav").addClass("act-mobile-menu"),a(".woodmart-close-side").addClass("woodmart-close-side-opened"),a(".mobile-nav .searchform").find('input[type="text"]').focus())})},videoPoster:function(){a(".woodmart-video-poster-wrapper").on("click",function(){var b=a(this),c=b.parent().find("iframe"),d=c.attr("src"),e=d+"&autoplay=1";d.indexOf("vimeo.com")+1&&(e=d+"?autoplay=1"),c.attr("src",e),b.addClass("hidden-poster")})},headerBuilder:function(){function b(){i||(i=!0,d.addClass("whb-sticked"))}function c(){i&&(i=!1,d.removeClass("whb-sticked"))}var d=a(".whb-header"),e=a(".whb-sticky-row"),f="",g=d.find(".whb-main-header").outerHeight(),h=a(window),i=!1,j=a("#wpadminbar").outerHeight(),k=300,l="",m=d.hasClass("whb-hide-on-scroll");if(e.each(function(){if(a(this).outerHeight()>10)return f=a(this),!1}),d.hasClass("whb-sticky-real")){if(0==f.length||f.outerHeight()<10)return;d.addClass("whb-sticky-prepared").css({paddingTop:g}),k=f.offset().top-j}if(d.hasClass("whb-sticky-clone")){var n=[];n.cloneClass=d.find(".whb-general-header").attr("class"),m&&(n.wrapperClasses="whb-hide-on-scroll"),l=woodmart_settings.whb_header_clone,l=l.replace(/<%([^%>]+)?%>/g,function(b){var c=b.slice(2,-2);return d.find(c).length?a("
").append(d.find(c).first().clone()).html():void 0!==n[c]?n[c]:""}),d.after(l),d=d.parent().find(".whb-clone"),d.find(".whb-row").removeClass("whb-flex-equal-sides").addClass("whb-flex-flex-middle")}a(".whb-header").hasClass("whb-scroll-slide")&&(k=g+j);var o;h.on("scroll",function(){var e=k,f=a(window).scrollTop(),g=a(window).height(),h=a(document).height();a(".header-banner").length>0&&a("body").hasClass("header-banner-display")&&(e+=a(".header-banner").outerHeight()),!a(".close-header-banner").length&&d.hasClass("whb-scroll-stick")&&(e=k),f>e?b():c();var i=100;d.hasClass("whb-scroll-stick")&&(i=500),m&&(o-f>0&&f>e?(d.addClass("whb-scroll-up"),d.removeClass("whb-scroll-down")):f-o>0&&f+g!=h&&f>e+i?(d.addClass("whb-scroll-down"),d.removeClass("whb-scroll-up")):f<=e?(d.removeClass("whb-scroll-down"),d.removeClass("whb-scroll-up")):f+g>=h-5&&(d.addClass("whb-scroll-up"),d.removeClass("whb-scroll-down"))),o=f})},counterShortcode:function(a){"done"!=a.attr("data-state")&&a.text()==a.data("final")&&a.prop("Counter",0).animate({Counter:a.text()},{duration:3e3,easing:"swing",step:function(b){b>=a.data("final")&&a.attr("data-state","done"),a.text(Math.ceil(b))}})},visibleElements:function(){a(".woodmart-counter .counter-value").each(function(){a(this).waypoint(function(){woodmartThemeModule.counterShortcode(a(this))},{offset:"100%"})})},bannersHover:function(){void 0!==a.fn.panr&&a(".promo-banner.banner-hover-parallax").panr({sensitivity:20,scale:!1,scaleOnHover:!0,scaleTo:1.15,scaleDuration:.34,panY:!0,panX:!0,panDuration:.5,resetPanOnMouseLeave:!0})},portfolioEffects:function(){void 0!==a.fn.panr&&a(".woodmart-portfolio-holder .portfolio-parallax").panr({sensitivity:15,scale:!1,scaleOnHover:!0,scaleTo:1.12,scaleDuration:.45,panY:!0,panX:!0,panDuration:1.5,resetPanOnMouseLeave:!0})},ageVerify:function(){"yes"==woodmart_settings.age_verify&&"confirmed"!=Cookies.get("woodmart_age_verify")&&(a.magnificPopup.open({items:{src:".wd-age-verify"},type:"inline",closeOnBgClick:!1,closeBtnInside:!1,showCloseBtn:!1,enableEscapeKey:!1,removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.mainClass=b.popupEffect+" promo-popup-wrapper"}}}),a(".wd-age-verify-allowed").on("click",function(){Cookies.set("woodmart_age_verify","confirmed",{expires:parseInt(woodmart_settings.age_verify_expires),path:"/"}),a.magnificPopup.close()}),a(".wd-age-verify-forbidden").on("click",function(){a(".wd-age-verify").addClass("wd-forbidden")}))},promoPopup:function(){var c=woodmart_settings.promo_version;if(!(a("body").hasClass("page-template-maintenance")||"yes"!=woodmart_settings.enable_popup||"yes"==woodmart_settings.promo_popup_hide_mobile&&a(window).width()<768||"confirmed"!=Cookies.get("woodmart_age_verify")&&"yes"==woodmart_settings.age_verify)){var d=(a(".woodmart-promo-popup"),!1),e=Cookies.get("woodmart_shown_pages"),f=function(){a.magnificPopup.open({items:{src:".woodmart-promo-popup"},type:"inline",removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.mainClass=b.popupEffect+" promo-popup-wrapper"},open:function(){},close:function(){Cookies.set("woodmart_popup_"+c,"shown",{expires:7,path:"/"})}}}),a(document).trigger("wood-images-loaded")};if(a(".woodmart-open-newsletter").on("click",function(a){a.preventDefault(),f()}),e||(e=0),e=woodmart_settings.popup_scroll&&(f(),d=!0)}):setTimeout(function(){f()},woodmart_settings.popup_delay))}},contentPopup:function(){a(".woodmart-open-popup").magnificPopup({type:"inline",removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.mainClass=b.popupEffect+" content-popup-wrapper"},open:function(){a(document).trigger("wood-images-loaded")}}})},cookiesPopup:function(){var b=woodmart_settings.cookies_version;if("accepted"!=Cookies.get("woodmart_cookies_"+b)){var c=a(".woodmart-cookies-popup");setTimeout(function(){c.addClass("popup-display"),c.on("click",".cookies-accept-btn",function(a){a.preventDefault(),d()})},2500);var d=function(){c.removeClass("popup-display").addClass("popup-hide"),Cookies.set("woodmart_cookies_"+b,"accepted",{expires:60,path:"/"})}}},googleMap:function(){var b=a(".google-map-container-with-content");a(window).resize(function(){b.css({height:b.find(".woodmart-google-map.with-content").outerHeight()})})},menuSetUp:function(){var b=a(".woodmart-navigation").find("ul.menu"),c=(b.find(" > li"),"item-menu-opened");a(".mobile-nav").find("ul.site-mobile-menu").find(" > li").has(".sub-menu-dropdown").addClass("menu-item-has-children"),b.on("click"," > .item-event-click > a",function(b){b.preventDefault(),a(this).parent().hasClass(c)||a("."+c).removeClass(c),a(this).parent().toggleClass(c)}),a(document).on("click",function(d){var e=d.target;if(a("."+c).length>0&&!a(e).is(".item-event-hover")&&!a(e).parents().is(".item-event-hover")&&!a(e).parents().is("."+c))return b.find("."+c).removeClass(c),!1});var d=function(){a(window).width()<=1024?b.find(" > .menu-item-has-children.item-event-hover").each(function(){a(this).data("original-event","hover").removeClass("item-event-hover").addClass("item-event-click")}):b.find(" > .item-event-click").each(function(){"hover"==a(this).data("original-event")&&a(this).removeClass("item-event-click").addClass("item-event-hover")})};a(window).on("resize",d)},menuOffsets:function(){var b=a(".main-nav, .whb-secondary-menu").find("ul.menu"),c=b.find(" > li.menu-item-design-sized, li.menu-item-design-full-width");b.on("hover"," > li.menu-item-design-sized, li.menu-item-design-full-width",function(b){d(a(this))});var d=function(b){var c=b.find(" > .sub-menu-dropdown"),d=a(".website-wrapper");c.attr("style","");var e=c.outerWidth(),f=c.offset(),g=a(window).width(),h=d.outerWidth()+d.offset().left,i=a("body").hasClass("wrapper-boxed")||a("body").hasClass("wrapper-boxed-2")?h:g,j=b.hasClass("menu-item-design-full-width")?0:10;if(e&&f){var k=g-f.left-e;if(a("body").hasClass("rtl")&&k+e>=i&&(b.hasClass("menu-item-design-sized")||b.hasClass("menu-item-design-full-width"))){var l=k+e-i;c.css({right:-l-j})}else if(f.left+e>=i&&(b.hasClass("menu-item-design-sized")||b.hasClass("menu-item-design-full-width"))){var m=f.left+e-i;c.css({left:-m-j})}}};c.each(function(){d(a(this)),a(this).addClass("with-offsets")})},onePageMenu:function(){var b=function(b){var d=a("#"+b);if(!(d.length<1)){var e=d.offset().top;a("html, body").animate({scrollTop:e-woodmart_settings.one_page_menu_offset},800),setTimeout(function(){c(b)},800)}},c=function(b){var c;a(".onepage-link").each(function(){(c=a(this).find("> a").attr("href").split("#")[1])==b&&(a(".onepage-link").removeClass("current-menu-item"),a(this).addClass("current-menu-item"))})};if(a("body").on("click",".onepage-link > a",function(c){var d=a(this),e=d.attr("href").split("#")[1];a("#"+e).length<1||(c.preventDefault(),b(e),a(".woodmart-close-side").trigger("click"),a(".full-screen-close-icon").trigger("click"),console.log(123))}),a(".onepage-link").length>0){a(".entry-content > .vc_section, .entry-content > .vc_row").waypoint(function(){var b=a(this).attr("id");c(b)},{offset:150});var d=window.location.hash.split("#")[1];window.location.hash.length>1&&setTimeout(function(){b(d)},500)}},mobileNavigation:function(){function b(){e.addClass("act-mobile-menu"),g.addClass("woodmart-close-side-opened")}function c(){e.removeClass("act-mobile-menu"),g.removeClass("woodmart-close-side-opened"),a(".mobile-nav .searchform input[type=text]").blur()}var d=a("body"),e=a(".mobile-nav"),f=(a(".website-wrapper"),a(".mobile-nav .site-mobile-menu .menu-item-has-children")),g=(a(".icon-sub-menu"),a(".woodmart-close-side"));f.append(''),e.on("click",".icon-sub-menu",function(b){b.preventDefault(),a(this).parent().hasClass("opener-page")?(a(this).parent().removeClass("opener-page").find("> ul").slideUp(200),a(this).parent().removeClass("opener-page").find(".sub-menu-dropdown .container > ul, .sub-menu-dropdown > ul").slideUp(200),a(this).parent().find("> .icon-sub-menu").removeClass("up-icon")):(a(this).parent().addClass("opener-page").find("> ul").slideDown(200),a(this).parent().addClass("opener-page").find(".sub-menu-dropdown .container > ul, .sub-menu-dropdown > ul").slideDown(200),a(this).parent().find("> .icon-sub-menu").addClass("up-icon"))}),e.on("click",".mobile-nav-tabs li",function(){if(!a(this).hasClass("active")){var b=a(this).data("menu");a(this).parent().find(".active").removeClass("active"),a(this).addClass("active"),a(".mobile-menu-tab").removeClass("active"),a(".mobile-"+b+"-menu").addClass("active")}}),d.on("click",".mobile-nav-icon > a",function(a){a.preventDefault(),e.hasClass("act-mobile-menu")?c():b()}),d.on("click touchstart",".woodmart-close-side",function(){c()}),d.on("click",".mobile-nav .login-side-opener",function(){c()})},simpleDropdown:function(){a(".input-dropdown-inner").each(function(){function b(){e.addClass("dd-shown"),h.slideDown(100),void 0!==a.fn.devbridgeAutocomplete&&e.parent().siblings('[type="text"]').devbridgeAutocomplete("hide"),setTimeout(function(){woodmartThemeModule.nanoScroller()},300)}function c(){e.removeClass("dd-shown"),h.slideUp(100)}function d(){if(!(a(window).width()<=768)){var b=e.innerWidth()+e.parent().siblings(".searchsubmit").innerWidth()+17,c="padding-right";a("body").hasClass("rtl")&&(c="padding-left"),e.parent().parent().find(".s").css(c,b)}}var e=a(this),f=e.find("> a"),g=e.find("> input"),h=e.find("> .list-wrapper");d(),a(document).on("click",function(b){var d=b.target;if(e.hasClass("dd-shown")&&!a(d).is(".input-dropdown-inner")&&!a(d).parents().is(".input-dropdown-inner"))return c(),!1}),f.on("click",function(a){return a.preventDefault(),e.hasClass("dd-shown")?c():b(),!1}),h.on("click","a",function(b){b.preventDefault();var e=a(this).data("val"),i=a(this).text();h.find(".current-item").removeClass("current-item"),a(this).parent().addClass("current-item"),0!=e?h.find("ul:not(.children) > li:first-child").show():0==e&&h.find("ul:not(.children) > li:first-child").hide(),f.text(i),g.val(e).trigger("cat_selected"),c(),d()})})},equalizeColumns:function(){a.fn.woodmart_equlize=function(b){var c=a.extend({child:""},b),d=this;""!=c.child&&(d=this.find(c.child));var e=function(){var b=0;d.each(function(){a(this).attr("style",""),a(window).width()>767&&a(this).outerHeight()>b&&(b=a(this).outerHeight())}),d.each(function(){a(this).css({minHeight:b})})};a(window).on("resize",function(){e()}),setTimeout(function(){e()},200),setTimeout(function(){e()},500),setTimeout(function(){e()},800)},a(".equal-columns").each(function(){a(this).woodmart_equlize({child:"> [class*=col-]"})})},blogMasonry:function(){if(void 0!==a.fn.isotope&&void 0!==a.fn.imagesLoaded){var b=a(".masonry-container");b.imagesLoaded(function(){b.isotope({gutter:0,isOriginLeft:!a("body").hasClass("rtl"),itemSelector:".blog-design-masonry, .blog-design-mask, .masonry-item"})}),a(".masonry-filter").on("click","a",function(b){b.preventDefault(),setTimeout(function(){jQuery(document).trigger("wood-images-loaded")},300),a(".masonry-filter").find(".filter-active").removeClass("filter-active"),a(this).addClass("filter-active");var c=a(this).attr("data-filter");a(this).parents(".portfolio-filter").next(".masonry-container.woodmart-portfolio-holder").isotope({filter:c})})}},clickOnScrollButton:function(b,c,d){if("function"==typeof a.waypoints){var e=a(b);c&&e.waypoint("destroy"),d||(d=0),e.waypoint(function(){e.trigger("click")},{offset:function(){return a(window).outerHeight()+parseInt(d)}})}},blogLoadMore:function(){var b=".woodmart-blog-load-more.load-on-scroll",c=!1;woodmartThemeModule.clickOnScrollButton(b,!1,!1),a(".woodmart-blog-load-more").on("click",function(d){if(d.preventDefault(),!c&&!a(this).hasClass("no-more-posts")){c=!0;var e=a(this),f=e.parent().siblings(".woodmart-blog-holder"),g=f.data("source"),h="woodmart_get_blog_"+g,i=woodmart_settings.ajaxurl,j="json",k="POST",l=f.data("atts"),m=f.data("paged");e.addClass("loading");var n={atts:l,paged:m,action:h};"main_loop"==g&&(i=a(this).attr("href"),k="GET",n={}),a.ajax({url:i,data:n,dataType:j,method:k,success:function(c){var d=a(c.items);d&&(f.hasClass("masonry-container")?(f.append(d).isotope("appended",d),f.imagesLoaded().progress(function(){f.isotope("layout"),woodmartThemeModule.clickOnScrollButton(b,!0,!1)})):(f.append(d),woodmartThemeModule.clickOnScrollButton(b,!0,!1)),f.data("paged",m+1),"main_loop"==g&&(e.attr("href",c.nextPage),"no-more-posts"==c.status&&e.hide().remove())),"no-more-posts"==c.status&&(e.addClass("no-more-posts"),e.hide())},error:function(a){console.log("ajax error")},complete:function(){e.removeClass("loading"),c=!1}})}})},portfolioLoadMore:function(){if("function"==typeof a.waypoints){var b=a(".woodmart-portfolio-load-more.load-on-scroll").waypoint(function(){a(".woodmart-portfolio-load-more.load-on-scroll").trigger("click")},{offset:"100%"}),c=!1;a(".woodmart-portfolio-load-more").on("click",function(d){if(d.preventDefault(),!c&&!a(this).hasClass("no-more-posts")){c=!0;var e,f=a(this),g=f.parent().parent().find(".woodmart-portfolio-holder"),h=g.data("source"),i="woodmart_get_portfolio_"+h,j=woodmart_settings.ajaxurl,k="json",l="POST",m=g.data("atts"),n=g.data("paged");f.addClass("loading");var o={atts:m,paged:n,action:i};"main_loop"==h&&(j=a(this).attr("href"),l="GET",o={}),a.ajax({url:j,data:o,dataType:k,method:l,success:function(c){var d=a(c.items);d&&(g.hasClass("masonry-container")?(g.append(d).isotope("appended",d),g.imagesLoaded().progress(function(){g.isotope("layout"),clearTimeout(e),e=setTimeout(function(){a(".woodmart-portfolio-load-more.load-on-scroll").waypoint("destroy"), b=a(".woodmart-portfolio-load-more.load-on-scroll").waypoint(function(){a(".woodmart-portfolio-load-more.load-on-scroll").trigger("click")},{offset:"100%"})},1e3)})):g.append(d),g.data("paged",n+1),f.attr("href",c.nextPage)),woodmartThemeModule.mfpPopup(),woodmartThemeModule.portfolioEffects(),"no-more-posts"==c.status&&(f.addClass("no-more-posts"),f.hide())},error:function(a){console.log("ajax error")},complete:function(){f.removeClass("loading"),c=!1}})}})}},sidebarMenu:function(){var b=a(".widget_nav_mega_menu #menu-categories").height(),c=a(".categories-menu-dropdown").height(),d=a(".widget_nav_mega_menu ul > li.menu-item-design-sized > .sub-menu-dropdown, .widget_nav_mega_menu ul > li.menu-item-design-full-width > .sub-menu-dropdown"),e=a(".categories-menu-dropdown ul > li.menu-item-design-sized > .sub-menu-dropdown, .categories-menu-dropdown ul > li.menu-item-design-full-width > .sub-menu-dropdown");d.css("min-height",b+"px"),e.css("min-height",c+"px")},widgetsHidable:function(){a(document).on("click",".widget-hidable .widget-title",function(){var b=a(this).siblings("ul, div, form, label, select");a(this).parent().toggleClass("widget-hidden"),b.stop().slideToggle(200)})},stickyColumn:function(){a(".woodmart-sticky-column").each(function(){var b=a(this),c=0;(a("body").hasClass("enable-sticky-header")||a(".whb-sticky-row").length>0||a(".whb-sticky-header").length>0)&&(c=150),b.find(" > .vc_column-inner > .wpb_wrapper").stick_in_parent({offset_top:c})}),a(".wd-elementor-sticky-column").each(function(){for(var b=a(this),c=150,d=b.attr("class").split(" "),e=0;e=0){var f=d[e].split("_");c=parseInt(f[3])}var g=b.find("> .elementor-column-wrap > .elementor-widget-wrap");g.length<=0&&(g=b.find("> .elementor-widget-wrap")),g.stick_in_parent({offset_top:c})})},mfpPopup:function(){a(".gallery").magnificPopup({delegate:" > a",type:"image",removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass=b.popupEffect}},image:{verticalFit:!0},gallery:{enabled:!0,navigateByImgClick:!0}}),a('[data-rel="mfp"]').magnificPopup({type:"image",removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass=b.popupEffect}},image:{verticalFit:!0},gallery:{enabled:!1,navigateByImgClick:!1}}),a(document).on("click",".mfp-img",function(){var a=jQuery.magnificPopup.instance;a.st.image.verticalFit=!a.st.image.verticalFit,a.currItem.img.removeAttr("style"),a.updateSize()})},parallax:function(){a(window).width()<=1024||(a(".parallax-yes").each(function(){var b=a(this);a(window).scroll(function(){var c=-a(window).scrollTop()/b.data("speed"),d="center "+c+"px";b.css({backgroundPosition:d})})}),a(".woodmart-parallax").each(function(){var b=a(this);b.hasClass("wpb_column")?b.find("> .vc_column-inner").parallax("50%",.3):b.parallax("50%",.3)}))},scrollTop:function(){a(window).scroll(function(){a(this).scrollTop()>100?a(".scrollToTop").addClass("button-show"):a(".scrollToTop").removeClass("button-show")}),a(".scrollToTop").on("click",function(){return a("html, body").animate({scrollTop:0},800),!1})},btnsToolTips:function(){var c=a('.woodmart-css-tooltip, .woodmart-buttons[class*="wd-pos-r"] div > a'),d=a(b.bootstrapTooltips);c.each(function(){!a(this).hasClass("wd-add-img-msg")&&a(window).width()<=1024||(a(this).find(".woodmart-tooltip-label").remove(),a(this).addClass("woodmart-tltp").prepend(''+a(this).text()+""),a(this).find(".woodmart-tooltip-label").trigger("mouseover"))}).off("mouseover.tooltips").on("mouseover.tooltips",function(){var b=a(this).find(".woodmart-tooltip-label"),c=b.outerWidth();a(this).hasClass("woodmart-tltp-top")&&b.css({marginLeft:-parseInt(c/2)})}),a(window).width()<=1024||d.tooltip({animation:!1,container:"body",trigger:"hover",title:function(){return a(this).find(".added_to_cart").length>0?a(this).find(".add_to_cart_button").text():a(this).text()}})},stickyFooter:function(){if(a("body").hasClass("sticky-footer-on")&&!(a(window).width()<=1024)){var b=a(".footer-container"),c=a(".main-page-wrapper"),d=a(window);a(".woodmart-prefooter").length>0&&(c=a(".woodmart-prefooter"));var e=function(){c.css({marginBottom:b.outerHeight()})};d.on("resize",e),b.imagesLoaded(function(){e()});var f=function(){if(a("html").hasClass("browser-Safari")){var c=d.scrollTop();a(document).outerHeight()-b.outerHeight()0&&(k+="&number="+e),k+="&post_type="+j,i.on("click",".view-all-results",function(){d.submit()}),h.length&&""!==h.val()&&(k+="&product_cat="+h.val()),d.find('[type="text"]').devbridgeAutocomplete({serviceUrl:k,appendTo:i,minChars:g,onSelect:function(a){a.permalink.length>0&&(window.location.href=a.permalink)},onSearchStart:function(a){d.addClass("search-loading")},beforeRender:function(b){a(b).find(".suggestion-divider-text").parent().addClass("suggestion-divider"),b[0].childElementCount>2&&a(b).append('
'+woodmart_settings.all_results+"
")},onSearchComplete:function(c,e){d.removeClass("search-loading"),a(window).width()>=1024&&!b.disableNanoScrollerWebkit&&"disable"!=woodmart_settings.disable_nanoscroller&&a(".woodmart-scroll").nanoScroller({paneClass:"woodmart-scroll-pane",sliderClass:"woodmart-scroll-slider",contentClass:"woodmart-scroll-content",preventPageScrolling:!1}),a(document).trigger("wood-images-loaded")},formatResult:function(a,b){"&"==b&&(b="&");var d="("+c(b)+")",e="";return a.divider&&(e+='
'+a.divider+"
"),f&&a.thumbnail&&(e+='
'+a.thumbnail+"
"),a.value&&(e+='

'+a.value.replace(new RegExp(d,"gi"),"$1").replace(/<(\/?strong)>/g,"<$1>")+"

"),a.no_found&&(e='
'+a.value+"
"),m&&a.sku&&(e+='
'+a.sku+"
"),l&&a.price&&(e+='
'+a.price+"
"),e}}),h.length){var n=d.find('[type="text"]').devbridgeAutocomplete(),o=woodmart_settings.ajaxurl+"?action=woodmart_ajax_search";e>0&&(o+="&number="+e),o+="&post_type="+j,h.on("cat_selected",function(){""!=h.val()?n.setOptions({serviceUrl:o+"&product_cat="+h.val()}):n.setOptions({serviceUrl:o}),n.hide(),n.onValueChange()})}a(document).on("click",function(b){var c=b.target;a(c).is(".woodmart-search-form")||a(c).parents().is(".woodmart-search-form")||d.find('[type="text"]').devbridgeAutocomplete("hide")}),a(".woodmart-search-results").on("click",function(a){a.stopPropagation()})})}},searchFullScreen:function(){var b=a("body"),c=a(".woodmart-search-full-screen");b.on("click",".search-button:not(.mobile-search-icon) > a",function(c){c.preventDefault(),a(this).parent().find(".woodmart-search-dropdown").length>0||b.hasClass("global-search-dropdown")||a(window).width()<1024||(g()?e():setTimeout(function(){f()},10))}),b.on("click",".woodmart-close-search, .main-page-wrapper, .header-banner",function(b){!a(b.target).is(".woodmart-close-search")&&a(b.target).closest(".woodmart-search-full-screen").length||g()&&e()});var d=function(a){27===a.keyCode&&(e(),b.unbind("keyup",d))},e=function(){a("body").removeClass("woodmart-search-opened"),c.removeClass("search-overlap")},f=function(){var f=a("#wpadminbar").outerHeight(),h=0;a(".whb-sticked").length>0?h=a(".whb-clone").length>0?a(".whb-sticked").outerHeight()+f:a(".whb-main-header").outerHeight()+f:(h=a(".whb-main-header").outerHeight()+f,a("body").hasClass("header-banner-display")&&(h+=a(".header-banner").outerHeight())),c.css("top",h),b.on("keyup",d),a("body").addClass("woodmart-search-opened"),c.addClass("search-overlap"),setTimeout(function(){c.find('input[type="text"]').focus(),a(window).one("scroll",function(){g()&&e()})},300)},g=function(){return a("body").hasClass("woodmart-search-opened")}},countDownTimer:function(){a(".woodmart-timer").each(function(){var b=moment.tz(a(this).data("end-date"),a(this).data("timezone"));a(this).countdown(b.toDate(),function(b){a(this).html(b.strftime('%-D '+woodmart_settings.countdown_days+' %H '+woodmart_settings.countdown_hours+' %M '+woodmart_settings.countdown_mins+' %S '+woodmart_settings.countdown_sec+""))})})},nanoScroller:function(){a(window).width()<1024||"webkit"==woodmart_settings.disable_nanoscroller&&("Chrome"==jscd.browser||"Opera"==jscd.browser||"Safari"==jscd.browser)||"disable"==woodmart_settings.disable_nanoscroller||(a(".woodmart-scroll").nanoScroller({paneClass:"woodmart-scroll-pane",sliderClass:"woodmart-scroll-slider",contentClass:"woodmart-scroll-content",preventPageScrolling:!1}),a("body").on("wc_fragments_refreshed wc_fragments_loaded added_to_cart",function(){a(".widget_shopping_cart .woodmart-scroll").nanoScroller({paneClass:"woodmart-scroll-pane",sliderClass:"woodmart-scroll-slider",contentClass:"woodmart-scroll-content",preventPageScrolling:!1}),a(".widget_shopping_cart .woodmart-scroll-content").scroll(function(){a(document).trigger("wood-images-loaded")})}))},gradientShift:function(){a(".woodmart_gradient").each(function(){var b=a(this),c=b.prev();c.css("position","relative"),c.prepend(b)})},lazyLoading:function(){function b(){f=f||setTimeout(function(){f=null,c()},100)}function c(){g.length&&requestAnimationFrame(function(){for(var a,b,c,f=parseInt(woodmart_settings.lazy_loading_offset),h=window.pageYOffset,i=h+window.innerHeight+f,j=0;jb&&!g[j].loaded?d(g[j],j):j++;e=g.length})}function d(a,b){function c(){requestAnimationFrame(function(){a.classList.add("woodmart-loaded");var b=jQuery(a).parents(".view-masonry .gallery-images, .grid-masonry, .masonry-container");b.length>0&&b.isotope("layout");var c=jQuery(a).parents(".categories-masonry");c.length>0&&c.packery()})}a.onload=c,a.src=a.dataset.woodSrc,void 0!==a.dataset.srcset&&(a.srcset=a.dataset.srcset),a.loaded=!0}if(window.addEventListener&&window.requestAnimationFrame&&document.getElementsByClassName){var e,f,g=document.getElementsByClassName("woodmart-lazy-load");if(a(document).on("wood-images-loaded added_to_cart",function(){c()}),a(".woodmart-scroll-content, .woodmart-sidebar-content").scroll(function(){a(document).trigger("wood-images-loaded")}),a(".wc-tabs > li").on("click",function(){a(document).trigger("wood-images-loaded")}),window.addEventListener("scroll",b,!1),window.addEventListener("resize",b,!1),MutationObserver){new MutationObserver(function(){g.length!==e&&c()}).observe(document.body,{subtree:!0,childList:!0,attributes:!0,characterData:!0})}c()}}}}()}(jQuery),jQuery(window).load(function(){jQuery(".wd-preloader").delay(parseInt(woodmart_settings.preloader_delay)).addClass("preloader-hide"),jQuery(".wd-preloader-style").remove(),setTimeout(function(){jQuery(".wd-preloader").remove()},200)}),jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&("enabled"===woodmart_settings.elementor_no_gap&&(elementorFrontend.hooks.addAction("frontend/element_ready/section",function(a,b){var c=a.data("model-cid");if(void 0!==elementorFrontend.config.elements.data[c]){elementorFrontend.config.elements.data[c].attributes.content_width.size||a.addClass("wd-negative-gap")}}),elementor.channels.editor.on("change:section",function(a){var b=a.elementSettingsModel.changed;if(void 0!==b.content_width){var c=a._parent.model.id,d=jQuery(".elementor-element-"+c);b.content_width.size?d.removeClass("wd-negative-gap"):d.addClass("wd-negative-gap")}})),elementorFrontend.hooks.addAction("frontend/element_ready/wd_blog.default",function(a,b){woodmartThemeModule.blogMasonry(),woodmartThemeModule.blogLoadMore(),woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_images_gallery.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.imagesGalleryMasonry(),woodmartThemeModule.imagesGalleryJustified()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_product_categories.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_slider.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_banner_carousel.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.bannersHover()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_banner.default",function(a,b){woodmartThemeModule.lazyLoading(),woodmartThemeModule.bannersHover()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_infobox_carousel.default",function(a,b){woodmartThemeModule.infoboxSvg(),woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_infobox.default",function(a,b){woodmartThemeModule.infoboxSvg()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_instagram.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_testimonials.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_3d_view.default",function(a,b){woodmartThemeModule.view3d()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_search.default",function(a,b){woodmartThemeModule.ajaxSearch()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_counter.default",function(a,b){woodmartThemeModule.visibleElements()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_countdown_timer.default",function(a,b){woodmartThemeModule.countDownTimer()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_google_map.default",function(a,b){woodmartThemeModule.googleMapInit(),woodmartThemeModule.googleMap()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_image_hotspot.default",function(a,b){woodmartThemeModule.imageHotspot()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_popup.default",function(a,b){woodmartThemeModule.contentPopup()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_portfolio.default",function(a,b){woodmartThemeModule.portfolioEffects(),woodmartThemeModule.portfolioLoadMore(),woodmartThemeModule.portfolioPhotoSwipe(),woodmartThemeModule.blogMasonry()}),elementorFrontend.hooks.addAction("frontend/element_ready/global",function(a,b){a.attr("style")&&0===a.attr("style").indexOf("transform:translate3d")&&!a.hasClass("wd-parallax-on-scroll")&&a.attr("style","")}),elementorFrontend.hooks.addAction("frontend/element_ready/column",function(a,b){a.attr("style")&&0===a.attr("style").indexOf("transform:translate3d")&&!a.hasClass("wd-parallax-on-scroll")&&a.attr("style",""),setTimeout(function(){woodmartThemeModule.stickyColumn()},100)}))}),jQuery(document).ready(function(){wooFile||woodmartThemeModule.init()});var wooFile=!0;!function(a){"use strict";var b={popupEffect:"mfp-move-horizontal",supports_html5_storage:!1,shopLoadMoreBtn:".woodmart-products-load-more.load-on-scroll",ajaxLinks:".woodmart-product-categories a, .widget_product_categories a, .widget_layered_nav_filters a, .woocommerce-widget-layered-nav a, .filters-area:not(.custom-content) a, body.post-type-archive-product:not(.woocommerce-account) .woocommerce-pagination a, body.tax-product_cat:not(.woocommerce-account) .woocommerce-pagination a, .woodmart-shop-tools a, .woodmart-woocommerce-layered-nav a, .woodmart-price-filter a, .woodmart-clear-filters-wrapp a, .woodmart-woocommerce-sort-by a, .woocommerce-widget-layered-nav-list a, .wd-widget-stock-status a",mainCarouselArg:{rtl:a("body").hasClass("rtl"),items:"centered"==woodmart_settings.product_gallery.thumbs_slider.position?2:1,autoplay:woodmart_settings.product_slider_autoplay,autoplayTimeout:3e3,loop:woodmart_settings.product_slider_autoplay,center:"centered"==woodmart_settings.product_gallery.thumbs_slider.position,startPosition:"centered"==woodmart_settings.product_gallery.thumbs_slider.position?woodmart_settings.centered_gallery_start:0,dots:!1,nav:!0,autoHeight:"yes"==woodmart_settings.product_slider_auto_height,navText:!1,onRefreshed:function(){a(window).resize()}}};try{b.supports_html5_storage="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("woodmart","test"),window.sessionStorage.removeItem("woodmart")}catch(c){b.supports_html5_storage=!1}woodmartThemeModule.categoriesDropdowns=function(){a(".dropdown_product_cat").change(function(){if(""!=a(this).val()){var b="",c=woodmart_settings.home_url;b=c.indexOf("?")>0?c+"&product_cat="+jQuery(this).val():c+"?product_cat="+jQuery(this).val(),location.href=b}else location.href=woodmart_settings.shop_url}),a(".widget_product_categories").each(function(){var b=a(this).find("select");a().selectWoo&&b.selectWoo({minimumResultsForSearch:5,width:"100%",allowClear:!0,placeholder:woodmart_settings.product_categories_placeholder,language:{noResults:function(){return woodmart_settings.product_categories_no_results}}})})},woodmartThemeModule.miniCartQuantity=function(){var c;a(document).on("change input",".woocommerce-mini-cart .quantity .qty",function(){var d=a(this),e=d.val(),f=d.parents(".woocommerce-mini-cart-item").data("key"),g=woodmart_settings.cart_hash_key,h=woodmart_settings.fragment_name;clearTimeout(c),c=setTimeout(function(){d.parents(".mini_cart_item").addClass("wd-loading"),a.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_cart_item",item_id:f,qty:e},success:function(c){c&&c.fragments&&(a.each(c.fragments,function(b,c){a(b).replaceWith(c)}),b.supports_html5_storage&&(sessionStorage.setItem(h,JSON.stringify(c.fragments)),localStorage.setItem(g,c.cart_hash),sessionStorage.setItem(g,c.cart_hash),c.cart_hash&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())))},dataType:"json",method:"GET"})},500)})},woodmartThemeModule.swatchesLimit=function(){a(".wd-swatches-divider").on("click",function(){a(this).parent().find(".woodmart-swatch").removeClass("wd-hidden"),a(this).parent().addClass("wd-all-shown")})},woodmartThemeModule.gridQuantity=function(){a(".product-grid-item").on("change input",".quantity .qty",function(){var b=a(this).parent().parent().find(".add_to_cart_button");b.attr("data-quantity",a(this).val()),b.attr("href","?add-to-cart="+b.attr("data-product_id")+"&quantity="+a(this).val())})},woodmartThemeModule.wcTabsHoverFix=function(){a(".wc-tabs > li").on("click",function(){woodmartThemeModule.productHover()})},woodmartThemeModule.commentImage=function(){a("form.comment-form").attr("enctype","multipart/form-data")},woodmartThemeModule.commentImagesUploadValidation=function(){function b(a){c.prepend('")}var c=a(".comment-form"),d=c.find("#wd-add-img-btn"),e=[];0!==d.length&&(a.each(woodmart_settings.comment_images_upload_mimes,function(a,b){e.push(String(b))}),c.find("#wd-add-img-btn").on("change",function(a){c.find(".wd-add-img-count").text(woodmart_settings.comment_images_added_count_text.replace("%s",this.files.length))}),c.on("submit",function(f){c.find(".woocommerce-error").remove();var g=!1,h=!1;d[0].files.length>woodmart_settings.comment_images_count&&(b(woodmart_settings.comment_images_count_text),f.preventDefault()),Array.prototype.forEach.call(d[0].files,function(b){var c=b.size,d=String(b.type);c>woodmart_settings.comment_images_upload_size&&(g=!0),a.inArray(d,e)<0&&(h=!0)}),g&&(b(woodmart_settings.comment_images_upload_size_text),f.preventDefault()),h&&(b(woodmart_settings.comment_images_upload_mimes_text),f.preventDefault())}))},woodmartThemeModule.singleProductTabsCommentsFix=function(){var b=window.location.href,c=window.location.hash,d=a("body").find(".wc-tabs, ul.tabs").first();a(".single-product-page").hasClass("reviews-location-separate")&&(c.toLowerCase().indexOf("comment-")>=0||"#reviews"===c||"#tab-reviews"===c?d.find("li:first a").click():(b.indexOf("comment-page-")>0||b.indexOf("cpage=")>0)&&d.find("li:first a").click())},woodmartThemeModule.singleProductTabsAccordion=function(){a(window).width()>1024||(a(".woocommerce-tabs").removeClass("tabs-layout-tabs").addClass("tabs-layout-accordion"),a(".single-product-page").removeClass("tabs-type-tabs").addClass("tabs-type-accordion"))},woodmartThemeModule.wishlist=function(){function b(b){d.length>0&&d.find(".wishlist-count").text(b.count),a(".woodmart-wishlist-content").length>0&&!a(".woodmart-wishlist-content").hasClass("woodmart-wishlist-preview")&&a(".woodmart-wishlist-content").replaceWith(b.wishlist_content),woodmartThemeModule.swatchesVariations(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.productHover(),woodmartThemeModule.countDownTimer(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity()}var c="woodmart_wishlist_count";a("body").hasClass("logged-in")&&(c+="_logged"),woodmart_settings.is_multisite&&(c+="_"+woodmart_settings.current_blog_id);var d=a(".woodmart-wishlist-info-widget"),e=Cookies.get(c);if(d.length>0&&void 0!==e)try{var f=JSON.parse(e);d.find(".wishlist-count").text(f)}catch(g){console.log("cant parse cookies json")}a("body").on("click",".woodmart-wishlist-btn a",function(c){var d=a(this),e=d.data("product-id"),f=d.data("added-text"),g=d.data("key");if(d.hasClass("added"))return!0;c.preventDefault(),d.addClass("loading"),a.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_wishlist",product_id:e,key:g},dataType:"json",method:"GET",success:function(c){c?(d.addClass("added"),a(document).trigger("added_to_wishlist"),c.wishlist_content&&b(c),d.find("span").length>0?d.find("span").text(f):d.text(f)):console.log("something wrong loading wishlist data ",c)},error:function(a){console.log("We cant add to wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("loading")}})}),a("body").on("click",".woodmart-wishlist-remove",function(c){var d=a(this),e=d.data("product-id"),f=d.data("key");if(d.hasClass("added"))return!0;c.preventDefault(),d.addClass("loading"),a.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_wishlist",product_id:e,key:f},dataType:"json",method:"GET",success:function(a){a.wishlist_content?b(a):console.log("something wrong loading wishlist data ",a)},error:function(a){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("loading")}})})},woodmartThemeModule.variationsPrice=function(){"no"!==woodmart_settings.single_product_variations_price&&a(".variations_form").each(function(){var b=a(this),c=b.parent().find("> .price").first(),d=c.html();b.on("show_variation",function(a,b,d){b.price_html.length>1&&c.html(b.price_html)}),b.on("hide_variation",function(){c.html(d)})})},woodmartThemeModule.productFilters=function(){var b=function(a,b){if(0!=a.length){var c=a.val();c.indexOf(",")>0?a.val(c.replace(","+b,"").replace(b+",","")):a.val(c.replace(b,""))}};a(".woodmart-pf-checkboxes li > .pf-value").on("click",function(c){c.preventDefault();var d=a(this),e=d.parent(),f=d.parents(".woodmart-pf-checkboxes"),g=f.find(".result-input"),h=f.find(".woodmart-pf-results"),i=f.hasClass("multi_select"),j=g.val(),k=d.data("title"),l=d.data("val");i?e.hasClass("pf-active")?(b(g,l),h.find('li[data-title="'+l+'"]').remove(),e.removeClass("pf-active")):(""==j?g.val(l):g.val(j+","+l),h.prepend('
  • '+k+"
  • "),e.addClass("pf-active")):e.hasClass("pf-active")?(g.val(""),h.find(".selected-value").remove(),e.removeClass("pf-active")):(g.val(l),h.find(".selected-value").remove(),h.prepend('
  • '+k+"
  • "),e.parents(".woodmart-scroll-content").find(".pf-active").removeClass("pf-active"),e.addClass("pf-active"))}),a(".woodmart-pf-checkboxes").on("click",".selected-value",function(){var c=a(this),d=c.parents(".woodmart-pf-checkboxes"),e=d.find(".result-input"),f=c.data("title");if("price-filter"==f){var g=c.data("min"),h=c.data("max"),i=d.find(".price_slider_widget");return i.slider("values",0,g),i.slider("values",1,h),d.find(".min_price").val(""),d.find(".max_price").val(""),void a(document.body).trigger("filter_price_slider_slide",[g,h,g,h,i])}b(e,f),d.find('.pf-value[data-val="'+f+'"]').parent().removeClass("pf-active"),c.remove()}),a(".woodmart-pf-checkboxes").each(function(){var b=a(this),c=b.find(".woodmart-pf-title"),d=c.siblings(".woodmart-pf-dropdown"),e=b.hasClass("multi_select");c.on("click",function(e){var g=e.target;a(g).is(c.find(".selected-value"))||(b.hasClass("opened")?f():(b.addClass("opened"),d.slideDown(100),setTimeout(function(){woodmartThemeModule.nanoScroller()},300)))}),a(document).on("click",function(d){var g=d.target;(b.hasClass("opened")&&e&&!a(g).is(b)&&!a(g).parents().is(b)||!e&&!a(g).is(c)&&!a(g).parents().is(c))&&f()});var f=function(){b.removeClass("opened"),d.slideUp(100)}});var c=function(b){b.find(".woodmart-pf-checkboxes").each(function(){a(this).find('input[type="hidden"]').val()||a(this).find('input[type="hidden"]').remove()})},d=function(a){var b=a.find(".woodmart-pf-categories .pf-active .pf-value");b.length>0&&a.attr("action",b.attr("href"))};a(document.body).on("filter_price_slider_create filter_price_slider_slide",function(b,c,d,e,f,g){var h=accounting.formatMoney(c,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format}),i=accounting.formatMoney(d,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format});g.siblings(".filter_price_slider_amount").find("span.from").html(h),g.siblings(".filter_price_slider_amount").find("span.to").html(i);var j=g.parents(".woodmart-pf-checkboxes").find(".woodmart-pf-results"),k=j.find(".selected-value");c==e&&d==f?k.remove():0==k.length?j.prepend('
  • '+h+" - "+i+"
  • "):k.html(h+" - "+i),a(document.body).trigger("price_slider_updated",[c,d])}),a(".woodmart-pf-price-range .price_slider_widget").each(function(){var b=a(this),c=b.siblings(".filter_price_slider_amount").find(".min_price"),d=b.siblings(".filter_price_slider_amount").find(".max_price"),e=parseInt(c.data("min")),f=parseInt(d.data("max")),g=parseInt(c.val()),h=parseInt(d.val());a(".price_slider_widget, .price_label").show(),b.slider({range:!0,animate:!0,min:e,max:f,values:[g,h],create:function(){g==e&&h==f&&(c.val(""),d.val("")),a(document.body).trigger("filter_price_slider_create",[g,h,e,f,b])},slide:function(g,h){h.values[0]==e&&h.values[1]==f?(c.val(""),d.val("")):(c.val(h.values[0]),d.val(h.values[1])),a(document.body).trigger("filter_price_slider_slide",[h.values[0],h.values[1],e,f,b])},change:function(b,c){a(document.body).trigger("price_slider_change",[c.values[0],c.values[1]])}})}),a(".woodmart-product-filters").one("click",".woodmart-pf-btn button",function(b){var e=a(this).parents(".woodmart-product-filters");c(e),d(e),a("body").hasClass("woodmart-ajax-shop-on")&&void 0!==a.fn.pjax&&e.hasClass("with-ajax")&&(a.pjax({container:".main-page-wrapper",timeout:woodmart_settings.pjax_timeout,url:e.attr("action"),data:e.serialize(),scrollTo:!1}),a(this).prop("disabled",!0))}),a(".woodmart-pf-checkboxes .pf-active > .pf-value").each(function(){a(this).parents(".woodmart-pf-checkboxes").find(".woodmart-pf-results").prepend('
  • '+a(this).data("title")+"
  • ")})},woodmartThemeModule.stickySidebarBtn=function(){var b=a(".woodmart-show-sidebar-btn"),c=a(".shop-sidebar-opener:not(.toolbar)");if(!(c.length<=0||b.length<=0||a(window).width()>=1024)){var d=function(){b.offset().top+b.outerHeight()b)&&(c.removeClass("woodmart-sticky-btn-shown"),e.removeClass("woodmart-sticky-btn-shown"))};f(),a(window).scroll(f),a(".woodmart-sticky-add-to-cart").on("click",function(b){b.preventDefault(),a("html, body").animate({scrollTop:a(".summary-inner").offset().top},800)}),a(".woodmart-sticky-btn .woodmart-wishlist-btn a").on("click",function(b){a(this).hasClass("added")||b.preventDefault(), a(".summary-inner > .woodmart-wishlist-btn a").trigger("click")}),a(document).on("added_to_wishlist",function(){a(".woodmart-sticky-btn .woodmart-wishlist-btn a").addClass("added")}),a(".woodmart-sticky-btn .woodmart-compare-btn a").on("click",function(b){a(this).hasClass("added")||b.preventDefault(),a(".summary-inner > .woodmart-compare-btn a").trigger("click")}),a(document).on("added_to_compare",function(){a(".woodmart-sticky-btn .woodmart-compare-btn a").addClass("added")}),a(".woodmart-sticky-btn-cart .qty").on("change",function(){a(".summary-inner .qty").val(a(this).val())}),a(".summary-inner .qty").on("change",function(){a(".woodmart-sticky-btn-cart .qty").val(a(this).val())})}},woodmartThemeModule.loginDropdown=function(){a(window).width()<=1024||a(".menu-item-register").each(function(){var b=a(this),c=b.find(".login-dropdown-inner");c.find('input[id="username"]').on("click",function(){b.addClass("wd-active-login").removeClass("wd-active-link")}),c.find('input[id="username"]').on("input",function(){b.hasClass("wd-active-login")&&b.removeClass("wd-active-login").addClass("wd-active-link")}),c.find("input").not('[id="username"]').on("click",function(){b.removeClass("wd-active-login").removeClass("wd-active-link")}),a(document).click(function(a){void 0!==a.target.className.length&&-1==a.target.className.indexOf("menu-item-register")&&-1==a.target.className.indexOf("input-text")&&b.removeClass("wd-active-login").removeClass("wd-active-link")}),a(".menu-item-register").on("mouseout",function(a){b.hasClass("wd-active-link")&&b.removeClass("wd-active-link")}).on("mouseleave",function(){b.hasClass("wd-active-link")&&b.removeClass("wd-active-link")})})},woodmartThemeModule.loginSidebar=function(){var b=a("body"),c=a(".login-form-side"),d=a(".woodmart-close-side");a(".login-side-opener").on("click",function(a){a.preventDefault(),g()?e():setTimeout(function(){f()},10)}),b.on("click touchstart",".woodmart-close-side",function(){g()&&e()}),b.on("click",".close-side-widget",function(a){a.preventDefault(),g()&&e()}),a(document).keyup(function(a){27===a.keyCode&&g()&&e()});var e=function(){c.removeClass("woodmart-login-side-opened"),d.removeClass("woodmart-close-side-opened")},f=function(){c.addClass("woodmart-login-side-opened"),d.addClass("woodmart-close-side-opened")},g=function(){return c.hasClass("woodmart-login-side-opened")}},woodmartThemeModule.shopLoader=function(){var b=".woodmart-shop-loader",c='.products[data-source="main_loop"]',d=".area-sidebar-shop",e="sidebar-left",f="hidden-loader",g="hidden-from-top",h="hidden-from-bottom",i=function(){var d=a(c),e=d.parent().find(b);if(!(d.length<1)){var i=a(window).height()/2,j=a(window).scrollTop(),k=d.offset().top-i,l=d.height(),m=k+l-130;jm?e.addClass(f+" "+h):e.removeClass(f+" "+g+" "+h)}},j=function(){var f=a(c),g=a(d),h=f.parent().find(b),i=g.outerWidth();f.length<1||(i>0&&g.hasClass(e)?a("body").hasClass("rtl")?h.css({marginLeft:-i/2-15}):h.css({marginLeft:i/2-15}):i>0&&(a("body").hasClass("rtl")?h.css({marginLeft:i/2-15}):h.css({marginLeft:-i/2-15})))};a(window).off("scroll.loaderVerticalPosition"),a(window).off("loaderHorizontalPosition"),a(window).on("scroll.loaderVerticalPosition",i),a(window).on("resize.loaderHorizontalPosition",j),i(),j()},woodmartThemeModule.sortByWidget=function(){a("body").hasClass("woodmart-ajax-shop-on")&&void 0!==a.fn.pjax&&(a(".woocommerce-ordering").on("change","select.orderby",function(){var b=a(this).closest("form");b.find('[name="_pjax"]').remove(),a.pjax({container:".main-page-wrapper",timeout:woodmart_settings.pjax_timeout,url:"?"+b.serialize(),scrollTo:!1})}),a(".woocommerce-ordering").submit(function(a){a.preventDefault(a)}))},woodmartThemeModule.filterDropdowns=function(){function b(b){var c=b.parent(".woodmart-widget-layered-nav-dropdown-form");a("body").hasClass("woodmart-ajax-shop-on")&&void 0!==a.fn.pjax&&a.pjax({container:".main-page-wrapper",timeout:woodmart_settings.pjax_timeout,url:c.attr("action"),data:c.serialize(),scrollTo:!1})}a(".woodmart-widget-layered-nav-dropdown-form").each(function(){var b=a(this),c=b.find("select"),d=c.data("slug");c.change(function(){var b=a(this).val();a("input[name=filter_"+d+"]").val(b)}),a().selectWoo&&c.selectWoo({placeholder:c.data("placeholder"),minimumResultsForSearch:5,width:"100%",allowClear:!c.attr("multiple"),language:{noResults:function(){return c.data("noResults")}}}).on("select2:unselecting",function(){a(this).data("unselecting",!0)}).on("select2:opening",function(b){a(this).data("unselecting")&&(a(this).removeData("unselecting"),b.preventDefault())})}),a(".woodmart-widget-layered-nav-dropdown__submit").on("click",function(c){a(this).siblings("select").attr("multiple")&&a("body").hasClass("woodmart-ajax-shop-on")&&(b(a(this)),a(this).prop("disabled",!0))}),a(".woodmart-widget-layered-nav-dropdown-form select").on("change",function(c){if(!a("body").hasClass("woodmart-ajax-shop-on"))return void a(this).parent().submit();a(this).attr("multiple")||b(a(this))})},woodmartThemeModule.stickyDetails=function(){if(a("body").hasClass("woodmart-product-sticky-on")&&!(a(window).width()<=1024)){a(".entry-summary").each(function(){var b=a(this),c=40,d=b.find(".summary-inner"),e=b.parent().find(".product-images-inner");(a("body").hasClass("enable-sticky-header")||a(".whb-sticky-row").length>0||a(".whb-sticky-header").length>0)&&(c=parseInt(woodmart_settings.sticky_product_details_offset)),e.imagesLoaded(function(){var b=d.outerHeight()-e.outerHeight();b<-100?d.stick_in_parent({offset_top:c}):b>100&&e.stick_in_parent({offset_top:c}),a(window).resize(function(){a(window).width()<=1024?(d.trigger("sticky_kit:detach"),e.trigger("sticky_kit:detach")):d.outerHeight()=0||"#reviews"===d||"#tab-reviews"===d?b.find(".tab-title-reviews").addClass("active"):e.indexOf("comment-page-")>0||e.indexOf("cpage=")>0?b.find(".tab-title-reviews").addClass("active"):b.find(".woodmart-accordion-title").first().addClass("active"),a(".woocommerce-review-link").on("click",function(){a(".woodmart-accordion-title.tab-title-reviews").click()}),b.on("click",".woodmart-accordion-title",function(d){d.preventDefault();var e=a(this),f=e.siblings(".woocommerce-Tabs-panel"),g=e.parent().index(),h=e.parent().siblings().find(".active").parent(".woodmart-tab-wrapper").index();e.hasClass("active")?(h=g,e.removeClass("active"),f.stop().slideUp(c)):(b.find(".woodmart-accordion-title").removeClass("active"),b.find(".woocommerce-Tabs-panel").slideUp(),e.addClass("active"),f.stop().slideDown(c)),-1==h&&(h=g),a(window).resize(),setTimeout(function(){a(window).resize(),a(window).width()<1024&&g>h&&a("html, body").animate({scrollTop:e.offset().top-e.outerHeight()-a(".sticky-header").outerHeight()-50},500)},c),a(document).trigger("wood-images-loaded")})},woodmartThemeModule.productImagesGallery=function(){function c(){g.trigger("destroy.owl.carousel"),g.addClass("owl-carousel").owlCarousel(b.mainCarouselArg),a(document).trigger("wood-images-loaded")}function d(){var b="";g.find(".woocommerce-product-gallery__image").each(function(){var c=a(this).data("thumb"),d=a(this).find("a > img").attr("alt"),e=a(this).find("a > img").attr("title");b+='
    '+d+'
    '}),h.hasClass("slick-slider")?h.slick("unslick"):h.hasClass("owl-carousel")&&h.trigger("destroy.owl.carousel"),h.empty(),h.append(b)}function e(){h.slick({slidesToShow:woodmart_settings.product_gallery.thumbs_slider.items.vertical_items,slidesToScroll:woodmart_settings.product_gallery.thumbs_slider.items.vertical_items,vertical:!0,verticalSwiping:!0,infinite:!1}),h.on("click",".product-image-thumbnail",function(b){var c=a(this).index();i.trigger("to.owl.carousel",c)}),i.on("changed.owl.carousel",function(a){var b=a.item.index;h.slick("slickGoTo",b),h.find(".active-thumb").removeClass("active-thumb"),h.find(".product-image-thumbnail").eq(b).addClass("active-thumb")}),h.find(".product-image-thumbnail").eq(0).addClass("active-thumb")}function f(){h.addClass("owl-carousel").owlCarousel({rtl:a("body").hasClass("rtl"),items:woodmart_settings.product_gallery.thumbs_slider.items.desktop,responsive:{1025:{items:woodmart_settings.product_gallery.thumbs_slider.items.desktop},769:{items:woodmart_settings.product_gallery.thumbs_slider.items.tablet_landscape},577:{items:woodmart_settings.product_gallery.thumbs_slider.items.tablet},0:{items:woodmart_settings.product_gallery.thumbs_slider.items.mobile}},dots:!1,nav:!0,navText:!1});var b=h.owlCarousel();h.on("mouseup",".owl-item",function(c){var d=a(this).index();b.trigger("to.owl.carousel",d),i.trigger("to.owl.carousel",d)}),i.on("changed.owl.carousel",function(a){var c=a.item.index;b.trigger("to.owl.carousel",c),h.find(".active-thumb").removeClass("active-thumb"),h.find(".product-image-thumbnail").eq(c).addClass("active-thumb")}),h.find(".product-image-thumbnail").eq(0).addClass("active-thumb")}var g=a(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)"),h=a(".images .thumbnails"),i=a(".woocommerce-product-gallery__wrapper"),j=woodmart_settings.product_gallery.thumbs_slider.position;woodmart_settings.product_gallery.images_slider?"yes"==woodmart_settings.product_slider_auto_height?a(".product-images").imagesLoaded(function(){c()}):c():jQuery(window).width()<=1024&&("bottom_combined"==j||"bottom_column"==j||"bottom_grid"==j)&&c(),woodmart_settings.product_gallery.thumbs_slider.enabled&&woodmart_settings.product_gallery.images_slider&&(d(),"left"==woodmart_settings.product_gallery.thumbs_slider.position&&jQuery(window).width()>1024&&void 0!==a.fn.slick?e():f())},woodmartThemeModule.addToCart=function(){var c,d=this,e=0;d.addToCartAllTypes(),a("body").on("added_to_cart",function(c,g,h){if("popup"==woodmart_settings.add_to_cart_action){var i=['
    ',"

    "+woodmart_settings.added_to_cart+"

    ",''+woodmart_settings.continue_shopping+"",''+woodmart_settings.view_cart+"","
    "].join("");a.magnificPopup.open({removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.mainClass=b.popupEffect+" cart-popup-wrapper"}},items:{src:'",type:"inline"}}),a(".white-popup").on("click",".close-popup",function(b){b.preventDefault(),a.magnificPopup.close()}),f()}else"widget"==woodmart_settings.add_to_cart_action&&(clearTimeout(e),a(".act-scroll .woodmart-shopping-cart, .whb-sticked .woodmart-shopping-cart").length>0?a(".act-scroll .woodmart-shopping-cart, .whb-sticked .woodmart-shopping-cart").addClass("display-widget"):a(".whb-header .woodmart-shopping-cart").addClass("display-widget"),a(".cart-widget-opener").length>0&&a(".cart-widget-opener").first().trigger("click"),e=setTimeout(function(){a(".display-widget").removeClass("display-widget")},3500),f());d.btnsToolTips()});var f=function(){if("yes"!==woodmart_settings.add_to_cart_action_timeout)return!1;clearTimeout(c),c=setTimeout(function(){a(".woodmart-close-side").trigger("click"),a.magnificPopup.close()},1e3*parseInt(woodmart_settings.add_to_cart_action_timeout_number))}},woodmartThemeModule.addToCartAllTypes=function(){0!=woodmart_settings.ajax_add_to_cart&&a("body").on("submit","form.cart",function(b){var c=a(this).parents(".single-product-page");if(!c.hasClass("product-type-external")&&!c.hasClass("product-type-zakeke")){b.preventDefault();var d=a(this),e=d.find(".single_add_to_cart_button"),f=d.serialize();f+="&action=woodmart_ajax_add_to_cart",e.val()&&(f+="&add-to-cart="+e.val()),e.removeClass("added not-added"),e.addClass("loading"),a(document.body).trigger("adding_to_cart",[e,f]),a.ajax({url:woodmart_settings.ajaxurl,data:f,method:"POST",success:function(b){if(b){var c=window.location.toString();if(c=c.replace("add-to-cart","added-to-cart"),b.error&&b.product_url)return void(window.location=b.product_url);if("yes"===woodmart_settings.cart_redirect_after_add)return void(window.location=woodmart_settings.cart_url);e.removeClass("loading");var d=b.fragments,f=b.cart_hash;d&&a.each(d,function(b){a(b).addClass("updating")}),d&&a.each(d,function(b,c){a(b).replaceWith(c)}),b.notices.indexOf("error")>0?(a("body").append(b.notices),e.addClass("not-added")):("widget"==woodmart_settings.add_to_cart_action&&a.magnificPopup.close(),e.addClass("added"),a(document.body).trigger("added_to_cart",[d,f,e]))}},error:function(){console.log("ajax adding to cart error")},complete:function(){}})}})},woodmartThemeModule.quickShop=function(){function b(a){a.find(".variations_form").wc_variation_form().find(".variations select:eq(0)").change(),a.find(".variations_form").trigger("wc_variation_form")}if("no"!==woodmart_settings.quick_shop){a(document).on("click",".product-grid-item.product-type-variable .add_to_cart_button",function(c){c.preventDefault();var d=a(this),e=d.parents(".product").first(),f=e.find(".quick-shop-form"),g=e.data("id"),h="btn-loading";if(!d.hasClass(h)){if(e.hasClass("quick-shop-loaded"))return void e.addClass("quick-shop-shown");d.addClass(h),e.addClass("wd-loading-quick-shop"),a.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_quick_shop",id:g},method:"get",success:function(c){f.append(c),b(e),a("body").trigger("woodmart-quick-view-displayed"),woodmartThemeModule.swatchesVariations(),woodmartThemeModule.btnsToolTips()},complete:function(){setTimeout(function(){d.removeClass(h),e.removeClass("wd-loading-quick-shop"),e.addClass("quick-shop-shown quick-shop-loaded")},100)},error:function(){}})}}).on("click",".quick-shop-close",function(){a(this).parents(".product").removeClass("quick-shop-shown")}),a(document.body).on("added_to_cart",function(){a(".product").removeClass("quick-shop-shown")})}},woodmartThemeModule.quickViewInit=function(){a(document).on("click",".open-quick-view",function(b){if(b.preventDefault(),a(".open-quick-view").hasClass("loading"))return!0;var c=a(this).data("id"),d=a(this).data("loop-name"),e=(woodmart_settings.close,woodmart_settings.loading,a(this).data("loop")),f="",g="",h=a(".quick-view").find('[data-loop-name="'+d+'"]'),i=a(this);i.addClass("loading"),void 0!==h[e-1]&&(f=h.eq(e-1).addClass("quick-view-prev"),f=a("
    ").append(f.clone()).html()),void 0!==h[e+1]&&(g=h.eq(e+1).addClass("quick-view-next"),g=a("
    ").append(g.clone()).html()),woodmartThemeModule.quickViewLoad(c,i,f,g)})},woodmartThemeModule.quickViewCarousel=function(){a(".product-quick-view .woocommerce-product-gallery__wrapper").trigger("destroy.owl.carousel"),a(".product-quick-view .woocommerce-product-gallery__wrapper").addClass("owl-carousel").owlCarousel({rtl:a("body").hasClass("rtl"),items:1,dots:!1,nav:!0,navText:!1})},woodmartThemeModule.quickViewLoad=function(c,d,e,f){var g={id:c,action:"woodmart_quick_view"},h=function(c){a.magnificPopup.open({items:{src:'",type:"inline"},tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass=b.popupEffect+" quick-view-wrapper"},open:function(){a(".variations_form").each(function(){a(this).wc_variation_form().find(".variations select:eq(0)").change()}),a(".variations_form").trigger("wc_variation_form"),a("body").trigger("woodmart-quick-view-displayed"),woodmartThemeModule.swatchesVariations(),woodmartThemeModule.btnsToolTips(),setTimeout(function(){woodmartThemeModule.nanoScroller()},300),woodmartThemeModule.quickViewCarousel()}}})};a.ajax({url:woodmart_settings.ajaxurl,data:g,method:"get",success:function(b){woodmart_settings.quickview_in_popup_fix?(a.magnificPopup.close(),setTimeout(function(){h(b)},500)):h(b)},complete:function(){d.removeClass("loading")},error:function(){}})},woodmartThemeModule.swatchesVariations=function(){var c=a(".variations_form"),d=!1,e=!1;a(".variations_form .label").on("click",function(b){a(this).siblings(".value").hasClass("with-swatches")&&b.preventDefault()}),c.each(function(){var c=a(this);c.data("swatches")||(c.data("swatches",!0),c.data("product_variations")||c.find(".swatches-select").find("> div").addClass("swatch-enabled"),a(".swatches-select > div").hasClass("active-swatch")&&c.addClass("variation-swatch-selected"),c.on("click",".swatches-select > div",function(){var b=a(this).data("value"),d=a(this).parent().data("id"),e=a(this).data("title");f(c),a(this).hasClass("active-swatch")||a(this).hasClass("swatch-disabled")||(c.find("select#"+d).val(b).trigger("change"),a(this).parent().find(".active-swatch").removeClass("active-swatch"),a(this).addClass("active-swatch"),f(c),("yes"===woodmart_settings.swatches_labels_name&&a(window).width()>=769||a(window).width()<=768)&&a(this).parents("tr").find(".wd-attr-selected").html(e))}).on("click",".reset_variations",function(b){c.find(".active-swatch").removeClass("active-swatch"),("yes"===woodmart_settings.swatches_labels_name&&a(window).width()>=769||a(window).width()<=768)&&c.find(".wd-attr-selected").html("")}).on("reset_data",function(){var e=!0,h=!1;c.find(".variations select").each(function(){a(this).data("attribute_name")||a(this).attr("name");0===(a(this).val()||"").length?e=!1:h=!0}),e&&a(this).parent().find(".active-swatch").removeClass("active-swatch"),c.removeClass("variation-swatch-selected");var j=a(".woocommerce-product-gallery__wrapper.owl-carousel");if(f(c),n("default",c),j.hasClass("owl-carousel")){"yes"==woodmart_settings.product_slider_auto_height?(!g()&&i("default",c)&&d&&j.trigger("destroy.owl.carousel"),a(".product-images").imagesLoaded(function(){j=j.owlCarousel(b.mainCarouselArg),j.trigger("refresh.owl.carousel")})):(j=j.owlCarousel(b.mainCarouselArg),j.trigger("refresh.owl.carousel"));var k="centered"==woodmart_settings.product_gallery.thumbs_slider.position?woodmart_settings.centered_gallery_start:0;g()&&(k=0),j.trigger("to.owl.carousel",k)}}).on("reset_image",function(){var b=a(".thumbnails .product-image-thumbnail img").first();g()||h(c)||b.wc_reset_variation_attr("src")}).on("show_variation",function(f,j,k){if(("yes"===woodmart_settings.swatches_labels_name&&a(window).width()>=769||a(window).width()<=768)&&!e&&(c.find(".active-swatch").each(function(){var b=a(this).data("title");a(this).parents("tr").find(".wd-attr-selected").html(b)}),e=!0),j.image.src){var m=c.parents(".single-product-content").find('.thumbnails .product-image-thumbnail img[data-o_src="'+j.image.thumb_src+'"]').length>0,o=c.parents(".single-product-content").find(".thumbnails .product-image-thumbnail img").first();m&&o.wc_reset_variation_attr("src"),h(c)||n(j.variation_id,c)||(o.attr("src")!=j.image.thumb_src&&o.wc_set_variation_attr("src",j.image.src),woodmartThemeModule.initZoom()),c.addClass("variation-swatch-selected"),h(c)||g()||l();var p=a(".woocommerce-product-gallery__wrapper.owl-carousel");if(p.hasClass("owl-carousel")){"yes"==woodmart_settings.product_slider_auto_height?(!g()&&i(j.variation_id,c)&&d&&p.trigger("destroy.owl.carousel"),a(".product-images").imagesLoaded(function(){p=p.owlCarousel(b.mainCarouselArg),p.trigger("refresh.owl.carousel")})):(p=p.owlCarousel(b.mainCarouselArg),p.trigger("refresh.owl.carousel"));var q=a(".images .thumbnails");p.trigger("to.owl.carousel",0),q.hasClass("owl-carousel")?(q.owlCarousel().trigger("to.owl.carousel",0),q.find(".active-thumb").removeClass("active-thumb"),q.find(".product-image-thumbnail").eq(0).addClass("active-thumb")):q.hasClass("slick-slider")&&(q.slick("slickGoTo",0),q.find(".product-image-thumbnail").eq(0).hasClass("active-thumb")||(q.find(".active-thumb").removeClass("active-thumb"),q.find(".product-image-thumbnail").eq(0).addClass("active-thumb")))}}}))});var f=function(b){b.data("product_variations")&&b.find(".variations select").each(function(){var b=a(this),c=b.parent().find(".swatches-select"),d=b.html();d=a(d),c.find("> div").removeClass("swatch-enabled").addClass("swatch-disabled"),d.each(function(b){var d=a(this).val();a(this).hasClass("enabled")?c.find('div[data-value="'+d+'"]').removeClass("swatch-disabled").addClass("swatch-enabled"):c.find('div[data-value="'+d+'"]').addClass("swatch-disabled").removeClass("swatch-enabled")})})},g=function(){return a(".single-product-content").hasClass("product-quick-view")},h=function(a){return a.parent().hasClass("quick-shop-form")},i=function(a,b){return"old"===woodmart_settings.variation_gallery_storage_method?j(a):k(a,b)},j=function(a){if("undefined"!=typeof woodmart_variation_gallery_data||"undefined"!=typeof woodmart_qv_variation_gallery_data){var b=g()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data;return void 0!==b&&b&&b[a]}},k=function(a,b){var c=m(b);return void 0!==c&&c&&c[a]&&c[a].length>1},l=function(){if(1==woodmart_settings.swatches_scroll_top_desktop&&a(window).width()>=1024||1==woodmart_settings.swatches_scroll_top_mobile&&a(window).width()<=1024){var b=a("html, body");b.stop(!0),a(window).on("mousedown wheel DOMMouseScroll mousewheel keyup touchmove",function(){b.stop(!0)}),b.animate({scrollTop:a(".product-image-summary").offset().top-150},800),a(".woodmart-swatch").tooltip("hide")}},m=function(a){var b=a.data("product_variations"),c=[];return b?(b.forEach(function(a){c[a.variation_id]=a.additional_variation_images,c.default=a.additional_variation_images_default}),c):c},n=function(b,c){if("old"===woodmart_settings.variation_gallery_storage_method){if(!i(b,c)||h(c)||"default"===b&&!d)return!1;o(b,c)}else{if(!i(b,c)||h(c)||"default"===b&&!d)return!1;var e=m(c);p(e[b],c)}return woodmartThemeModule.productImagesGallery(),woodmartThemeModule.quickViewCarousel(),a(window).trigger("main_gallery_replaced"),a(".woocommerce-product-gallery__image").trigger("zoom.destroy"),g()||woodmartThemeModule.initZoom(),d="default"!==b,a(window).resize(),!0},o=function(a,b){var c=g()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data,d=c[a],e=b.parents(".single-product-content").find(".woocommerce-product-gallery__wrapper");e.empty();for(var f=0;f';g()||(h+=''),h+=d[f].image,g()||(h+=""),h+="
    ",e.append(h)}},p=function(a,b){var c=b.parents(".single-product-content").find(".woocommerce-product-gallery__wrapper");c.empty();for(var d in a){var e='",c.append(e)}}},woodmartThemeModule.swatchesOnGrid=function(){a("body").on("click",".swatch-on-grid",function(){var b,c,d,e=a(this).data("image-src"),f=a(this).data("image-srcset"),g=a(this).data("image-sizes");if(void 0!==e&&""!==e){var h=a(this).parents(".product-grid-item"),i=h.find(".product-image-link > img"),j=i.data("original-src"),k=i.data("original-srcset"),l=i.data("original-sizes");void 0===j&&i.data("original-src",i.attr("src")),void 0===k&&i.data("original-srcset",i.attr("srcset")),void 0===l&&i.data("original-sizes",i.attr("sizes")),a(this).hasClass("active-swatch")?(b=j,c=k,d=l,a(this).removeClass("active-swatch"),h.removeClass("product-swatched")):(a(this).parent().find(".active-swatch").removeClass("active-swatch"),a(this).addClass("active-swatch"),h.addClass("product-swatched"),b=e,c=f,d=g),i.attr("src")!=b&&(h.addClass("wd-loading-image"),i.attr("src",b).attr("srcset",c).attr("image_sizes",d).one("load",function(){h.removeClass("wd-loading-image")}))}})},woodmartThemeModule.productsTabs=function(){var b=!1;a(".woodmart-products-tabs").each(function(){var d=a(this),e=d.find(".woodmart-tab-content"),f=[];e.find(".owl-carousel").length<1&&(f[0]={html:e.html()}),d.find(".products-tabs-title li").on("click",function(d){d.preventDefault();var g=a(this),h=g.data("atts"),i=g.index();b||g.hasClass("active-tab-title")||(b=!0,c(h,i,e,g,f,function(b){b.html&&(e.html(b.html),a(document).trigger("wood-images-loaded"),a(document).trigger("wood-products-tabs-loaded"),woodmartThemeModule.productHover(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.shopMasonry(),woodmartThemeModule.countDownTimer(),woodmartThemeModule.productLoaderPosition(),woodmartThemeModule.productsLoadMore(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity())}))});var g=d.find(".tabs-navigation-wrapper"),h=g.find("ul");g.on("click",".open-title-menu",function(){var b=a(this);h.hasClass("list-shown")?(b.removeClass("toggle-active"),h.stop().slideUp(300).removeClass("list-shown")):(b.addClass("toggle-active"),h.addClass("list-shown"),setTimeout(function(){a("body").one("click",function(c){var d=c.target;if(!a(d).is(".tabs-navigation-wrapper")&&!a(d).parents().is(".tabs-navigation-wrapper"))return b.removeClass("toggle-active"),h.removeClass("list-shown"),!1})},10))}).on("click","li",function(){var b=g.find(".open-title-menu"),c=a(this).text();h.hasClass("list-shown")&&(b.removeClass("toggle-active").text(c),h.removeClass("list-shown"))})});var c=function(c,d,e,f,g,h){if(f.parent().find(".active-tab-title").removeClass("active-tab-title"),f.addClass("active-tab-title"),g[d])return e.addClass("loading"),void setTimeout(function(){h(g[d]),e.removeClass("loading"),b=!1},300);e.addClass("loading").parent().addClass("element-loading"),f.addClass("loading"),a.ajax({url:woodmart_settings.ajaxurl,data:{atts:c,action:"woodmart_get_products_tab_shortcode"},dataType:"json",method:"POST",success:function(a){g[d]=a,h(a)},error:function(a){console.log("ajax error")},complete:function(){e.removeClass("loading").parent().removeClass("element-loading"),f.removeClass("loading"),b=!1,woodmartThemeModule.compare()}})}},woodmartThemeModule.productsLoadMore=function(){var c,d=!1;a(".woodmart-products-element").each(function(){function b(){r=a(window).height()/2,s=a(window).outerWidth(!0),p=f.outerWidth(!0),j=a(window).scrollTop(),k=f.offset().top-r,l=f.offset().left-z,m=p+f.offset().left+z-x.outerWidth(),q=w.outerHeight(),o=f.height()-q,n=k+o,a(window).width()<=1024&&(l+=35,m-=35),w.css({left:l+"px"}),x.css({left:m+"px"}),jn?(v.removeClass("show-arrow"),y.addClass("hidden-loader")):(v.addClass("show-arrow"),y.removeClass("hidden-loader"))}var f=a(this),g=[],h=f.find(".woodmart-products-holder"),i=h.data("atts");if(h.hasClass("pagination-arrows")){g[1]={items:h.html(),status:"have-posts"},f.on("recalc",function(){t()}),a(window).resize(function(){t()});var j,k,l,m,n,o,p,q,r,s,t=function(){var a=h.outerHeight();i.elementor&&(a-=parseInt(i.spacing)),f.stop().css({minHeight:a})},u=a("body"),v=f.find(".products-footer"),w=v.find(".woodmart-products-load-prev"),x=v.find(".woodmart-products-load-next"),y=f.find(".woodmart-products-loader"),z=50;u.hasClass("rtl")&&(w=x,x=v.find(".woodmart-products-load-prev")),a(window).scroll(function(){b()}),setTimeout(function(){b()},500),f.find(".woodmart-products-load-prev, .woodmart-products-load-next").off("click").on("click",function(b){if(b.preventDefault(),!d&&!a(this).hasClass("disabled")){d=!0,clearInterval(c);var f=a(this),h=f.parent().parent().prev(),i=f.parent().find(".woodmart-products-load-next"),j=f.parent().find(".woodmart-products-load-prev"),k=h.data("atts"),l="woodmart_get_products_shortcode",m=woodmart_settings.ajaxurl,n="json",o="POST",p=h.attr("data-paged");if(p++,f.hasClass("woodmart-products-load-prev")){if(p<2)return;p-=2}e("arrows",k,m,l,n,o,p,h,f,g,function(b){var d=h.hasClass("products-bordered-grid");if(d||h.addClass("woodmart-animated-products"),b.items&&(h.html(b.items).attr("data-paged",p),h.imagesLoaded().progress(function(){h.parent().trigger("recalc")}),a(document).trigger("wood-images-loaded"),woodmartThemeModule.productHover(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity()),a(window).width()<768&&a("html, body").stop().animate({scrollTop:h.offset().top-150},400),!d){var e=0;c=setInterval(function(){h.find(".product-grid-item").eq(e).addClass("woodmart-animated"),e++},100)}p>1?j.removeClass("disabled"):j.addClass("disabled"),"no-more-posts"==b.status?i.addClass("disabled"):i.removeClass("disabled")})}})}}),woodmartThemeModule.clickOnScrollButton(b.shopLoadMoreBtn,!1,woodmart_settings.infinit_scroll_offset),a(document).off("click",".woodmart-products-load-more").on("click",".woodmart-products-load-more",function(c){if(c.preventDefault(),!d){d=!0;var g=a(this),h=g.parent().siblings(".woodmart-products-holder"),i=h.data("source"),j="woodmart_get_products_"+i,k=woodmart_settings.ajaxurl,l="POST",m=h.data("atts"),n=h.data("paged");n++,"main_loop"==i&&(k=a(this).attr("href"),l="GET"),e("load-more",m,k,j,"json",l,n,h,g,[],function(c){c.items&&(h.hasClass("grid-masonry")?f(h,c.items):h.append(c.items),h.imagesLoaded().progress(function(){woodmartThemeModule.clickOnScrollButton(b.shopLoadMoreBtn,!0,woodmart_settings.infinit_scroll_offset)}),a(document).trigger("wood-images-loaded"),h.data("paged",n),woodmartThemeModule.productHover(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity()),"main_loop"==i&&(g.attr("href",c.nextPage),"no-more-posts"==c.status&&g.hide().remove()),"no-more-posts"==c.status&&g.hide()})}});var e=function(b,c,e,f,g,h,i,j,k,l,m){var n={atts:c,paged:i,action:f,woo_ajax:1};if(l[i])return j.addClass("loading"),void setTimeout(function(){m(l[i]),j.removeClass("loading"),d=!1},300);if("arrows"==b&&j.addClass("loading").parent().addClass("element-loading"),k.addClass("loading"),"woodmart_get_products_main_loop"==f){n={loop:j.find(".product").last().data("loop"),woo_ajax:1}}a.ajax({url:e,data:n,dataType:g,method:h,success:function(a){l[i]=a,m(a)},error:function(a){console.log("ajax error")},complete:function(){"arrows"==b&&j.removeClass("loading").parent().removeClass("element-loading"),k.removeClass("loading"),d=!1,woodmartThemeModule.compare(),woodmartThemeModule.productHover(),woodmartThemeModule.countDownTimer(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity()}})},f=function(b,c){var c=a(c);b.append(c).isotope("appended",c),b.imagesLoaded().progress(function(){b.isotope("layout")})}},woodmartThemeModule.compare=function(){var b=a("body"),c=a("a.compare");b.on("click","a.compare",function(){a(this).addClass("loading")}),b.on("yith_woocompare_open_popup",function(){c.removeClass("loading"),b.addClass("compare-opened")}),b.on("click","#cboxClose, #cboxOverlay",function(){b.removeClass("compare-opened")})},woodmartThemeModule.woodmartCompare=function(){function b(b){e.length>0&&e.find(".compare-count").text(b.count),a(".woodmart-compare-table").length>0&&a(".woodmart-compare-table").replaceWith(b.table)}var c="woodmart_compare_list";woodmart_settings.is_multisite&&(c+="_"+woodmart_settings.current_blog_id);var d=a("body"),e=a(".woodmart-compare-info-widget"),f=Cookies.get(c);if(e.length>0&&void 0!==f)try{var g=JSON.parse(f);e.find(".compare-count").text(g.length)}catch(h){console.log("cant parse cookies json")}d.on("click",".woodmart-compare-btn a",function(c){ var d=a(this),e=d.data("id"),f=d.data("added-text");if(d.hasClass("added"))return!0;c.preventDefault(),d.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_compare",id:e},dataType:"json",method:"GET",success:function(c){c.table?(b(c),a(document).trigger("added_to_compare")):console.log("something wrong loading compare data ",c)},error:function(a){console.log("We cant add to compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("loading").addClass("added"),d.find("span").length>0?d.find("span").text(f):d.text(f)}})}),d.on("click",".woodmart-compare-remove",function(c){c.preventDefault();var d=a(this),e=d.data("id");d.addClass("loading"),jQuery.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_compare",id:e},dataType:"json",method:"GET",success:function(a){a.table?b(a):console.log("something wrong loading compare data ",a)},error:function(a){console.log("We cant remove product compare. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.addClass("loading")}})})},woodmartThemeModule.wishList=function(){a("body").on("click",".add_to_wishlist",function(){a(this).parent().addClass("feid-in")})},woodmartThemeModule.product360Button=function(){a(".product-360-button a").magnificPopup({type:"inline",mainClass:"mfp-fade",preloader:!1,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,fixedContentPos:!1,callbacks:{open:function(){a(window).resize()}}})},woodmartThemeModule.productVideo=function(){a(".product-video-button a").magnificPopup({tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,type:"iframe",iframe:{patterns:{youtube:{index:"youtube.com/",id:"v=",src:"//www.youtube.com/embed/%id%?rel=0&autoplay=1"}}},preloader:!1,fixedContentPos:!1})},woodmartThemeModule.loginTabs=function(){var b=a(".woodmart-register-tabs"),c=b.find(".woodmart-switch-to-register"),d=a(".col-register-text h2"),e=(b.find(".col-login"),b.find(".login-info")),f=(b.find(".col-register"),"active-register"),g=c.data("login"),h=c.data("register"),i=c.data("login-title"),j=c.data("reg-title");c.on("click",function(c){c.preventDefault(),m()?l():k();a(".main-page-wrapper").offset().top;a(window).width()<768&&a("html, body").stop().animate({scrollTop:b.offset().top-90},400)});var k=function(){b.addClass(f),c.text(g),e.length>0&&d.text(i)},l=function(){b.removeClass(f),c.text(h),e.length>0&&d.text(j)},m=function(){return b.hasClass(f)}},woodmartThemeModule.headerCategoriesMenu=function(){if(!(a(window).width()>1024)){var b=a(".header-categories-nav"),c=b.find(".categories-menu-dropdown"),d=b.find(".menu-item-has-children"),e=b.find(".menu-opener"),f=200;d.find("> a").before(''),c.on("click",".drop-category",function(){var b=a(this).parent().find("> .sub-menu-dropdown, >.sub-sub-menu");b.hasClass("child-open")?(a(this).removeClass("act-icon"),b.slideUp(f).removeClass("child-open")):(a(this).addClass("act-icon"),b.slideDown(f).addClass("child-open"))}),b.on("click",".menu-opener",function(a){a.preventDefault(),g()?i():h()}),c.on("click","a",function(a){i(),c.stop().attr("style","")});var g=function(){return c.hasClass("categories-opened")},h=function(){c.addClass("categories-opened").stop().slideDown(f),e.addClass("button-open")},i=function(){c.removeClass("categories-opened").stop().slideUp(f),e.removeClass("button-open")}}},woodmartThemeModule.categoriesMenu=function(){if(!(a(window).width()>1024)){var b=a(".woodmart-product-categories"),c=(b.find("li > ul"),a(".woodmart-show-categories"),200);a("body").on("click",".icon-drop-category",function(b){b.preventDefault(),a(this).closest(".has-sub").find("> ul").hasClass("child-open")?a(this).removeClass("woodmart-act-icon").closest(".has-sub").find("> ul").slideUp(c).removeClass("child-open"):a(this).addClass("woodmart-act-icon").closest(".has-sub").find("> ul").slideDown(c).addClass("child-open")}),a("body").on("click",".woodmart-show-categories",function(a){a.preventDefault(),d()?f():e()}),a("body").on("click",".woodmart-product-categories a",function(c){a(c.target).hasClass("icon-drop-category")||(f(),b.stop().attr("style",""))});var d=function(){return a(".woodmart-product-categories").hasClass("categories-opened")},e=function(){a(".woodmart-product-categories").addClass("categories-opened").stop().slideDown(c),a(".woodmart-show-categories").addClass("button-open")},f=function(){a(".woodmart-product-categories").removeClass("categories-opened").stop().slideUp(c),a(".woodmart-show-categories").removeClass("button-open")}}},woodmartThemeModule.categoriesMenuBtns=function(){if(!(a(window).width()>1024)){var b=a(".woodmart-product-categories"),c=b.find("li > ul");b.addClass("responsive-cateogires"),c.parent().addClass("has-sub").find("> .category-nav-link").prepend('')}},woodmartThemeModule.filtersArea=function(){var c=a(".filters-area"),d=(a(".open-filters"),200);a("body").on("click",".open-filters",function(a){a.preventDefault(),e()?f():(woodmartThemeModule.openFilters(d),setTimeout(function(){woodmartThemeModule.shopLoader()},d))}),"no"==woodmart_settings.shop_filters_close&&a("body").on("click",b.ajaxLinks,function(){e()&&f()});var e=function(){return c=a(".filters-area"),c.hasClass("filters-opened")},f=function(){c=a(".filters-area"),c.removeClass("filters-opened"),c.stop().slideUp(d),a(".open-filters").removeClass("btn-opened")}},woodmartThemeModule.openFilters=function(b){var c=a(".filters-area");c.stop().slideDown(b),a(".open-filters").addClass("btn-opened"),setTimeout(function(){c.addClass("filters-opened"),a("body").removeClass("body-filters-opened"),woodmartThemeModule.nanoScroller(),a(document).trigger("wood-images-loaded")},b)},woodmartThemeModule.shopPageInit=function(){woodmartThemeModule.shopMasonry(),woodmartThemeModule.ajaxSearch(),woodmartThemeModule.productHover(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.compare(),woodmartThemeModule.filterDropdowns(),woodmartThemeModule.sortByWidget(),woodmartThemeModule.categoriesMenuBtns(),woodmartThemeModule.categoriesAccordion(),woodmartThemeModule.woocommercePriceSlider(),woodmartThemeModule.countDownTimer(),woodmartThemeModule.nanoScroller(),woodmartThemeModule.shopLoader(),woodmartThemeModule.stickySidebarBtn(),woodmartThemeModule.productFilters(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity(),woodmartThemeModule.swatchesLimit(),woodmartThemeModule.categoriesDropdowns(),woodmartThemeModule.clickOnScrollButton(b.shopLoadMoreBtn,!1,woodmart_settings.infinit_scroll_offset),a("body > .tooltip").remove(),a(document.body).on("updated_wc_div",function(){a(document).trigger("wood-images-loaded")}),a(document).trigger("resize.vcRowBehaviour")},woodmartThemeModule.ajaxFilters=function(){if(a("body").hasClass("woodmart-ajax-shop-on")&&void 0!==a.fn.pjax&&!a("body").hasClass("single-product")){var c=this,d=!1;a(".products");a("body").on("click",".post-type-archive-product .products-footer .woocommerce-pagination a",function(a){e(!0)}),a(document).pjax(b.ajaxLinks,".main-page-wrapper",{timeout:woodmart_settings.pjax_timeout,scrollTo:!1}),"click"==woodmart_settings.price_filter_action?a(document).on("click",".widget_price_filter form .button",function(){var b=a(".widget_price_filter form");return a.pjax({container:".main-page-wrapper",timeout:woodmart_settings.pjax_timeout,url:b.attr("action"),data:b.serialize(),scrollTo:!1}),!1}):"submit"==woodmart_settings.price_filter_action&&a(document).on("submit",".widget_price_filter form",function(b){var c=a(".main-page-wrapper");a.pjax.submit(b,c)}),a(document).on("pjax:error",function(a,b,c,d){console.log("pjax error "+c)}),a(document).on("pjax:start",function(b,c){a(".site-content").removeClass("ajax-loaded"),a(".site-content").addClass("ajax-loading"),woodmartThemeModule.hideShopSidebar()}),a(document).on("pjax:complete",function(b,d,f){c.shopPageInit(),e(!1),a(document).trigger("wood-images-loaded"),a(".woodmart-sidebar-content").scroll(function(){a(document).trigger("wood-images-loaded")}),a(".site-content").removeClass("ajax-loading"),"undefined"!=typeof woodmart_wpml_js_data&&woodmart_wpml_js_data.languages&&a.each(woodmart_wpml_js_data.languages,function(b,c){a(".wpml-ls-item-"+c.code+" .wpml-ls-link").attr("href",c.url)})}),a(document).on("pjax:beforeReplace",function(b,c){a(".filters-area").hasClass("filters-opened")&&"yes"==woodmart_settings.shop_filters_close&&(d=!0,a("body").addClass("body-filters-opened"))}),a(document).on("pjax:end",function(b,c,e){d&&(a(".filters-area").css("display","block"),woodmartThemeModule.openFilters(200),d=!1),a(".site-content").removeClass("ajax-loading"),a(".site-content").addClass("ajax-loaded")});var e=function(b){if("no"==woodmart_settings.ajax_scroll&&0==b)return!1;var c=a(woodmart_settings.ajax_scroll_class),d=c.offset().top-woodmart_settings.ajax_scroll_offset;a("html, body").stop().animate({scrollTop:d},400)}}},woodmartThemeModule.cartWidget=function(){var b=a(".cart-widget-opener"),c=(b.find("a"),a("body")),d=a(".cart-widget-side"),e=a(".woodmart-close-side");b.on("click",function(a){i()||j()||a.preventDefault(),h()?f():setTimeout(function(){g()},10)}),c.on("click touchstart",".woodmart-close-side",function(){h()&&f()}),c.on("click",".close-side-widget",function(a){a.preventDefault(),h()&&f()}),a(document).keyup(function(a){27===a.keyCode&&h()&&f()});var f=function(){d.removeClass("woodmart-cart-opened"),e.removeClass("woodmart-close-side-opened")},g=function(){if(i()||j())return!1;d.addClass("woodmart-cart-opened"),e.addClass("woodmart-close-side-opened")},h=function(){return d.hasClass("woodmart-cart-opened")},i=function(){return a("body").hasClass("woocommerce-cart")},j=function(){return a("body").hasClass("woocommerce-checkout")}},woodmartThemeModule.woocommerceQuantity=function(){String.prototype.getDecimals||(String.prototype.getDecimals=function(){var a=this,b=(""+a).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0}),a(document).on("click",".plus, .minus",function(){var b=a(this).closest(".quantity").find(".qty"),c=parseFloat(b.val()),d=parseFloat(b.attr("max")),e=parseFloat(b.attr("min")),f=b.attr("step");c&&""!==c&&"NaN"!==c||(c=0),""!==d&&"NaN"!==d||(d=""),""!==e&&"NaN"!==e||(e=0),"any"!==f&&""!==f&&void 0!==f&&"NaN"!==parseFloat(f)||(f="1"),a(this).is(".plus")?d&&c>=d?b.val(d):b.val((c+parseFloat(f)).toFixed(f.getDecimals())):e&&c<=e?b.val(e):c>0&&b.val((c-parseFloat(f)).toFixed(f.getDecimals())),b.trigger("change")})},woodmartThemeModule.onRemoveFromCart=function(){a(document).on("click",".widget_shopping_cart .remove",function(b){b.preventDefault(),a(this).parent().addClass("removing-process")})},woodmartThemeModule.woocommerceComments=function(){var b=window.location.hash,c=window.location.href;(b.toLowerCase().indexOf("comment-")>=0||"#reviews"===b||"#tab-reviews"===b||c.indexOf("comment-page-")>0||c.indexOf("cpage=")>0)&&(setTimeout(function(){window.scrollTo(0,0)},1),setTimeout(function(){a(b).length>0&&a("html, body").stop().animate({scrollTop:a(b).offset().top-100},400)},10))},woodmartThemeModule.woocommerceWrappTable=function(){a(".shop_table:not(.shop_table_responsive):not(.woocommerce-checkout-review-order-table)").wrap("
    ")},woodmartThemeModule.productLoaderPosition=function(){var b=function(){a(".woodmart-products-loader").each(function(){var b=a(this),c=b.parent();0!=b.length&&b.css("left",c.offset().left+c.outerWidth()/2)})};a(window).on("resize",b),b()},woodmartThemeModule.initZoom=function(){function b(a){a.find("img").data("large_image_width")>a.width()&&(a.trigger("zoom.destroy"),a.zoom(d))}var c=a(".woocommerce-product-gallery__wrapper:not(.quick-view-gallery)");if("yes"!=woodmart_settings.zoom_enable)return!1;var d={touch:!1};"ontouchstart"in window&&(d.on="click"),a(".woocommerce-product-gallery").hasClass("thumbs-position-bottom")||a(".woocommerce-product-gallery").hasClass("thumbs-position-left")?c.on("changed.owl.carousel",function(a){b(c.find(".product-image-wrap").eq(a.item.index).find(".woocommerce-product-gallery__image"))}):c.find(".product-image-wrap").each(function(){b(a(this).find(".woocommerce-product-gallery__image"))})},woodmartThemeModule.productMoreDescription=function(){a(".woodmart-more-desc").each(function(){var b=a(this),c=b.find(".woodmart-more-desc-inner"),d=b.outerHeight(),e=c.outerHeight(),f=e-d;b.hasClass("woodmart-more-desc-active")||(f>30?(b.addClass("woodmart-more-desc-active"),b.append('more')):f>0&&b.css("height",d+f))}),a("body").on("click",".woodmart-more-desc-btn",function(b){b.preventDefault(),a(this).parent().addClass("woodmart-more-desc-full"),woodmartThemeModule.productHoverRecalc(a(this).parents(".woodmart-hover-base"))})},woodmartThemeModule.productHoverRecalc=function(a){if(!a.hasClass("product-in-carousel")){var b=a.find(".fade-in-block").outerHeight();a.find(".content-product-imagin").css({marginBottom:-b}),a.addClass("hover-ready")}},woodmartThemeModule.productHover=function(){a(".woodmart-hover-base").each(function(){var b=a(this);b.imagesLoaded(function(){woodmartThemeModule.productHoverRecalc(b)})}),a(window).width()<=1024&&(a(".woodmart-hover-base").on("click",function(b){var c="state-hover";a(this).hasClass(c)||"no"!=woodmart_settings.base_hover_mobile_click||(b.preventDefault(),a("."+c).removeClass(c),a(this).addClass(c))}),a(document).on("click touchstart",function(b){0==a(b.target).closest(".state-hover").length&&a(".state-hover").removeClass("state-hover")})),a(".woodmart-hover-base").each(function(){var b=a(this),c=b.find(".woodmart-add-btn"),d=b.outerWidth();woodmart_settings.hover_width_small&&(d<255||a(window).width()<=1024?(b.addClass("add-small-content"),b.hasClass("woodmart-hover-base")&&c.addClass("wd-action-btn wd-add-cart-btn wd-style-icon")):b.hasClass("woodmart-hover-base")&&(a("body").hasClass("catalog-mode-on")||a("body").hasClass("login-see-prices"))&&b.find(".wd-bottom-actions .wd-action-btn").removeClass("wd-style-icon").addClass("wd-style-text"))})},woodmartThemeModule.shopMasonry=function(){if(void 0!==a.fn.isotope&&void 0!==a.fn.packery&&void 0!==a.fn.imagesLoaded){var b=a(".elements-grid.grid-masonry");b.imagesLoaded(function(){b.isotope({isOriginLeft:!a("body").hasClass("rtl"),itemSelector:".category-grid-item, .product-grid-item"})}),a(window).resize(function(){var b=a(".categories-masonry"),c=b.hasClass("categories-style-masonry")?".category-grid-item":".col-lg-3.category-grid-item";b.imagesLoaded(function(){b.packery({resizable:!1,isOriginLeft:!a("body").hasClass("rtl"),packery:{gutter:0,columnWidth:c},itemSelector:".category-grid-item"})})})}},woodmartThemeModule.categoriesAccordion=function(){if("no"!=woodmart_settings.categories_toggle){var b=a(".widget_product_categories"),c=b.find(".product-categories"),d=300;c.find(".cat-parent").each(function(){a(this).find(" > .woodmart-cats-toggle").length>0||0!=a(this).find(" > .children").length&&0!=a(this).find(" > .children > *").length&&a(this).append('
    ')}),c.on("click",".woodmart-cats-toggle",function(){var b=a(this),c=b.prev();c.hasClass("list-shown")?(b.removeClass("toggle-active"),c.stop().slideUp(d).removeClass("list-shown")):(c.parent().parent().find("> li > .list-shown").slideUp().removeClass("list-shown"),c.parent().parent().find("> li > .toggle-active").removeClass("toggle-active"),b.addClass("toggle-active"),c.stop().slideDown(d).addClass("list-shown"))}),c.find("li.current-cat.cat-parent, li.current-cat-parent").length>0&&c.find("li.current-cat.cat-parent, li.current-cat-parent").find("> .woodmart-cats-toggle").click()}},woodmartThemeModule.woocommercePriceSlider=function(){if("undefined"==typeof woocommerce_price_slider_params||a(".price_slider_amount #min_price").length<1||!a.fn.slider)return!1;var b=a(".price_slider");if(void 0===b.slider("instance")){a("input#min_price, input#max_price").hide(),a(".price_slider, .price_label").show();var c=a(".price_slider_amount #min_price").data("min"),d=a(".price_slider_amount #max_price").data("max"),e=parseInt(c,10),f=parseInt(d,10);a(".products").attr("data-min_price")&&a(".products").attr("data-min_price").length>0&&(e=parseInt(a(".products").attr("data-min_price"),10)),a(".products").attr("data-max_price")&&a(".products").attr("data-max_price").length>0&&(f=parseInt(a(".products").attr("data-max_price"),10)),b.slider({range:!0,animate:!0,min:c,max:d,values:[e,f],create:function(){a(".price_slider_amount #min_price").val(e),a(".price_slider_amount #max_price").val(f),a(document.body).trigger("price_slider_create",[e,f])},slide:function(b,c){a("input#min_price").val(c.values[0]),a("input#max_price").val(c.values[1]),a(document.body).trigger("price_slider_slide",[c.values[0],c.values[1]])},change:function(b,c){a(document.body).trigger("price_slider_change",[c.values[0],c.values[1]])}}),setTimeout(function(){a(document.body).trigger("price_slider_create",[e,f]),b.find(".ui-slider-range").length>1&&b.find(".ui-slider-range").first().remove()},10)}}}(jQuery),jQuery(window).on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&(elementorFrontend.hooks.addAction("frontend/element_ready/wd_products.default",function(a,b){woodmartThemeModule.swatchesOnGrid(),woodmartThemeModule.quickViewInit(),woodmartThemeModule.quickShop(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.countDownTimer(),woodmartThemeModule.addToCart(),woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productHover(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity(),woodmartThemeModule.shopMasonry(),woodmartThemeModule.productsLoadMore()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_products_tabs.default",function(a,b){woodmartThemeModule.productsTabs(),woodmartThemeModule.swatchesOnGrid(),woodmartThemeModule.quickViewInit(),woodmartThemeModule.quickShop(),woodmartThemeModule.btnsToolTips(),woodmartThemeModule.countDownTimer(),woodmartThemeModule.addToCart(),woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.productHover(),woodmartThemeModule.productMoreDescription(),woodmartThemeModule.gridQuantity(),woodmartThemeModule.shopMasonry(),woodmartThemeModule.productsLoadMore()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_product_categories.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_products_brands.default",function(a,b){woodmartThemeModule.owlCarouselInit(),woodmartThemeModule.lazyLoading(),woodmartThemeModule.shopMasonry()}),elementorFrontend.hooks.addAction("frontend/element_ready/wd_product_filters.default",function(a,b){woodmartThemeModule.productFilters()}))}),jQuery(document).ready(function(){woodmartThemeModule.init()});