
!function(t){woodmartThemeModule.$document.on("wdShopPageInit wdUpdateWishlist wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdArrowsLoadProducts wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.productHover()}),woodmartThemeModule.wcTabsHoverFix=function(){t(".wc-tabs > li").on("click",function(){woodmartThemeModule.productHover()})},woodmartThemeModule.$document.on("wdProductMoreDescriptionOpen",function(o,e){woodmartThemeModule.productHoverRecalc(e)}),t.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(o,e){woodmartThemeModule.wdElementorAddAction(e,function(){woodmartThemeModule.productHover()})}),woodmartThemeModule.productHoverRecalc=function(o){var e;o.hasClass("wd-fade-off")||(e=o.find(".fade-in-block").outerHeight(),o.find(".content-product-imagin").css({marginBottom:-e}),o.addClass("hover-ready"))},woodmartThemeModule.productHover=function(){var o=t(".wd-hover-with-fade");function d(o){var e,d;o.data("column_width")||(e=o.outerWidth(),d=o.data("columns"),o.data("column_width",e/d))}woodmartThemeModule.windowWidth<=1024&&(o.hasClass("wd-hover-fw-button")&&o.addClass("wd-fade-off"),o.on("click",function(o){var e=t(this),d="state-hover";e.hasClass(d)||"no"!==woodmart_settings.base_hover_mobile_click||e.hasClass("wd-hover-fw-button")||(o.preventDefault(),t("."+d).removeClass(d),e.addClass(d))}),woodmartThemeModule.$document.on("click touchstart",function(o){0===t(o.target).closest(".state-hover").length&&t(".state-hover").removeClass("state-hover")})),o.on("mouseenter mousemove touchstart",function(){var o=t(this),e=o.find(".xts-more-desc");e.hasClass("wd-height-calculated")||(o.imagesLoaded(function(){woodmartThemeModule.productHoverRecalc(o)}),e.addClass("wd-height-calculated"))}),t(".wd-products-holder").on("mouseenter mousemove touchstart",function(){d(t(this))}),o.on("mouseenter mousemove touchstart",function(){var o,e;woodmart_settings.hover_width_small&&!(o=t(this)).hasClass("wd-hover-fw-button")&&(d(o.parent(".wd-products-holder")),e=o.parent(".wd-products-holder").data("column_width"))&&(e<255||woodmartThemeModule.windowWidth<=1024?(o.find(".wd-add-btn").parent().addClass("wd-add-small-btn"),o.find(".wd-add-btn").removeClass("wd-add-btn-replace").addClass("wd-action-btn wd-style-icon wd-add-cart-icon")):(woodmartThemeModule.$body.hasClass("catalog-mode-on")||woodmartThemeModule.$body.hasClass("login-see-prices"))&&o.find(".wd-bottom-actions .wd-action-btn").removeClass("wd-style-icon").addClass("wd-style-text"),woodmartThemeModule.$document.trigger("wdProductBaseHoverIconsResize"))})},t(document).ready(function(){woodmartThemeModule.productHover(),woodmartThemeModule.wcTabsHoverFix()}),window.addEventListener("popstate",function(){woodmartThemeModule.productHover()})}(jQuery);



!function(r){woodmartThemeModule.$document.on("wdShopPageInit wdLoadMoreLoadProducts wdArrowsLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdUpdateWishlist wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.productMoreDescription()}),r.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(e,d){woodmartThemeModule.wdElementorAddAction(d,function(){woodmartThemeModule.productMoreDescription()})}),woodmartThemeModule.productMoreDescription=function(){r(".wd-hover-with-fade, .wd-image-hotspot.hotspot-type-product").on("mouseenter touchstart",function(){var e,d=r(this).find(".wd-more-desc"),o=d.find(".wd-more-desc-inner"),t=d.find(".wd-more-desc-btn");d.hasClass("wd-more-desc-calculated")||(e=d.outerHeight(),30<(o=o.outerHeight()-e)?t.addClass("wd-shown"):0<o&&d.css("height",e+o),d.addClass("wd-more-desc-calculated"))}),woodmartThemeModule.$body.on("click",".wd-more-desc-btn",function(e){e.preventDefault();e=r(this);e.parent().addClass("wd-more-desc-full"),woodmartThemeModule.$document.trigger("wdProductMoreDescriptionOpen",[e.parents(".wd-hover-with-fade")])})},r(document).ready(function(){woodmartThemeModule.productMoreDescription()})}(jQuery);



!function(c){woodmartThemeModule.$document.on("wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdBackHistory wdRecentlyViewedProductLoaded",function(){woodmartThemeModule.updateWishlistButtonState()}),woodmartThemeModule.wishlist=function(){var d="woodmart_wishlist_count",i="woodmart_wishlist_products";if(woodmart_settings.is_multisite&&(d+="_"+woodmart_settings.current_blog_id,i+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies){var t=Cookies.get(d),e=0;if(void 0!==t)try{e=JSON.parse(t)}catch(t){console.log("cant parse cookies json")}void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded||a(e),woodmartThemeModule.$body.on("click",".wd-wishlist-btn a",function(t){var e=c(this);if(e.hasClass("added"))return!0;t.preventDefault();var o,t=e.data("product-id"),s=e.data("key");woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies?(e.addClass("loading"),void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded&&"disable"!==woodmart_settings.wishlist_show_popup&&woodmartThemeModule.$body.hasClass("logged-in")?woodmartThemeModule.$document.trigger("wdShowWishlistGroupPopup",[t,s]):n(t,"",s)):(s={},(s=void 0!==(o=Cookies.get(i))&&o&&(o=JSON.parse(o),Object.keys(o).length)?o:s)[t]={product_id:t},a(o=Object.keys(s).length),Cookies.set(i,JSON.stringify(s),{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),Cookies.set(d,o,{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),l(e))}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove",function(t){t.preventDefault();var e,o=c(this),t="";o.parents(".wd-wishlist-group").length&&(t=o.parents(".wd-wishlist-group").data("group-id")),o.addClass("loading"),woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies||1===o.parents(".products.elements-grid").find(".product-grid-item").length?r(o.data("product-id"),t,o.parents(".wd-products-holder"),function(){o.removeClass("loading")}):(o.parents(".product-grid-item").remove(),t={},void 0!==(e=Cookies.get(i))&&e&&(t=JSON.parse(e),Object.keys(t).length)&&delete t[o.data("product-id")],a(e=Object.keys(t).length),Cookies.set(i,JSON.stringify(t),{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}),Cookies.set(d,e,{expires:7,path:woodmart_settings.cookie_path,secure:woodmart_settings.cookie_secure_param}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-checkbox",function(t){var e=c(this),o=e.parents(".product-grid-item"),e=e.parents(".wd-products-element").siblings(".wd-wishlist-bulk-action"),s=e.find(".wd-wishlist-select-all");o.toggleClass("wd-current-product"),s.hasClass("wd-selected")&&e.hasClass("wd-visible")&&!o.hasClass("wd-current-product")&&s.removeClass("wd-selected"),o.siblings(".product").length===o.siblings(".wd-current-product").length&&o.hasClass("wd-current-product")&&s.addClass("wd-selected"),o.siblings(".wd-current-product").length||!e.hasClass("wd-visible")||o.hasClass("wd-current-product")?e.addClass("wd-visible"):e.removeClass("wd-visible")}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove-action > a",function(t){t.preventDefault();var e=c(this),t=e.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products"),o=t.find(".wd-current-product"),s=[],d="";o.length&&confirm(woodmart_settings.wishlist_remove_notice)&&(e.addClass("loading"),e.parents(".wd-wishlist-group").length&&(d=e.parents(".wd-wishlist-group").data("group-id")),o.each(function(){s.push(c(this).data("id"))}),r(s,d,t,function(){e.parents(".wd-wishlist-bulk-action").removeClass("wd-visible"),e.removeClass("loading")}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-select-all > a",function(t){t.preventDefault();var t=c(this).parent(),e=t.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products");t.hasClass("wd-selected")?(e.find(".product").removeClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!1),t.removeClass("wd-selected"),t.parents(".wd-wishlist-bulk-action").removeClass("wd-visible")):(e.find(".product").addClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!0),t.addClass("wd-selected"))}),woodmartThemeModule.$document.on("wdAddProductToWishlist",function(t,e,o,s,d){n(e,o,s,d)}),woodmartThemeModule.$document.on("wdRemoveProductToWishlist",function(t,e,o,s,d){r(e,o,s,d)}),woodmartThemeModule.$document.on("wdUpdateWishlistContent",function(t,e){var o;e=e,o=c(".wd-wishlist-content"),a(e.count),0<o.length&&!o.hasClass("wd-wishlist-preview")&&woodmartThemeModule.removeDuplicatedStylesFromHTML(e.wishlist_content,function(t){o.replaceWith(t),woodmartThemeModule.$document.trigger("wdUpdateWishlist")})})}function a(t){var e=c(".wd-header-wishlist");0<e.length&&e.find(".wd-tools-count").text(t)}function n(t,e,o,s=""){var d=c("a[data-product-id="+t+"]");c.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_add_to_wishlist",product_id:t,group:e,key:o},dataType:"json",method:"GET",success:function(t){t?(t.count&&a(t.count),t.fragments&&(woodmartThemeModule.$document.trigger("wdWishlistSaveFragments",[t.fragments,t.hash]),c.each(t.fragments,function(e,t){woodmartThemeModule.removeDuplicatedStylesFromHTML(t,function(t){c(e).replaceWith(t)})})),l(d)):console.log("something wrong loading wishlist data ",t),s&&s()},error:function(){console.log("We cant add to wishlist. Something wrong with AJAX response. Probably some PHP conflict.")},complete:function(){d.removeClass("loading")}})}function r(t,e,s,d=""){var o="";void 0!==s.data("atts")&&((o=s.data("atts")).ajax_page=s.attr("data-paged")),c.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_remove_from_wishlist",product_id:t,group_id:e,key:woodmart_settings.wishlist_page_nonce,atts:o},dataType:"json",method:"GET",success:function(t){var e,o;t.wishlist_content?(a(t.count),e=t,(o=s.parents(".wd-products-element")).length&&!c(".wd-wishlist-content").hasClass("wd-wishlist-preview")&&woodmartThemeModule.removeDuplicatedStylesFromHTML(e.wishlist_content,function(t){o.replaceWith(t),woodmartThemeModule.$document.trigger("wdUpdateWishlist")}),setTimeout(function(){var t=c(".wd-wishlist-content .wd-pagination").find("a.page-numbers");t.length&&t.each(function(){var t=c(this),e=t.attr("href").split("product-page=")[1],e=parseInt(e);t.attr("href",window.location.origin+window.location.pathname+"?product-page="+e)})},500)):console.log("something wrong loading wishlist data ",t),t.fragments&&woodmartThemeModule.$document.trigger("wdUpdateWishlistFragments",[t.fragments,t.hash]),d&&d()},error:function(){console.log("We cant remove from wishlist. Something wrong with AJAX response. Probably some PHP conflict.")}})}function l(t){var e=t.data("added-text");(0<t.find("span").length?t.find("span"):t).text(e),t.addClass("added"),woodmartThemeModule.$document.trigger("added_to_wishlist"),woodmartThemeModule.$document.trigger("wdUpdateTooltip",t)}},woodmartThemeModule.updateWishlistButtonState=function(){var t,e;void 0===woodmart_settings.wishlist_save_button_state||"yes"!==woodmart_settings.wishlist_save_button_state||"undefined"==typeof Cookies||woodmartThemeModule.$body.hasClass("logged-in")||(e="woodmart_wishlist_products",t={},woodmart_settings.is_multisite&&(e+="_"+woodmart_settings.current_blog_id),(t=void 0!==(e=Cookies.get(e))&&e?Object.values(JSON.parse(e)):t).length&&c.each(t,function(t,e){var o,e=c(".wd-wishlist-btn a[data-product-id="+e.product_id+"]");e.length&&!e.hasClass("added")&&(e.addClass("added"),o=e.data("added-text"),(0<e.find("span").length?e.find("span"):e).text(o))}))},c(document).ready(function(){woodmartThemeModule.wishlist(),woodmartThemeModule.updateWishlistButtonState()})}(jQuery);



!function(a){a.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(t,o){woodmartThemeModule.wdElementorAddAction(o,function(){woodmartThemeModule.addToCart()})}),woodmartThemeModule.addToCart=function(){var t,e=0,d=(woodmartThemeModule.$body.on("added_to_cart",function(t,o){if(o.stop_reload||o.e_manually_triggered)return!1;"popup"===woodmart_settings.add_to_cart_action?(o=['<div class="added-to-cart">',"<h3>"+woodmart_settings.added_to_cart+"</h3>",'<a href="#" class="btn btn-style-link btn-color-default close-popup">'+woodmart_settings.continue_shopping+"</a>",'<a href="'+woodmart_settings.cart_url+'" class="btn btn-color-primary view-cart">'+woodmart_settings.view_cart+"</a>","</div>"].join(""),a.magnificPopup.open({removalDelay:500,tClose:woodmart_settings.close,tLoading:woodmart_settings.loading,callbacks:{beforeOpen:function(){this.st.mainClass="mfp-move-horizontal cart-popup-wrapper"}},items:{src:'<div class="mfp-with-anim wd-popup popup-added_to_cart wd-close-btn-inset">'+o+"</div>",type:"inline"}}),a(".popup-added_to_cart").on("click",".close-popup",function(t){t.preventDefault(),a.magnificPopup.close()}),d()):"widget"===woodmart_settings.add_to_cart_action&&(clearTimeout(e),(0<(o=a(".act-scroll .wd-header-cart .wd-dropdown-cart, .whb-sticked .wd-header-cart .wd-dropdown-cart")).length?o:a(".whb-header .wd-header-cart .wd-dropdown-cart")).addClass("wd-opened"),0<(o=a(".cart-widget-opener")).length&&o.first().trigger("click"),e=setTimeout(function(){a(".wd-dropdown-cart").removeClass("wd-opened")},3500),d()),woodmartThemeModule.$document.trigger("wdActionAfterAddToCart")}),function(){if("yes"!==woodmart_settings.add_to_cart_action_timeout)return!1;clearTimeout(t),t=setTimeout(function(){a(".wd-close-side").trigger("click"),a.magnificPopup.close()},1e3*parseInt(woodmart_settings.add_to_cart_action_timeout_number))})},a(document).ready(function(){woodmartThemeModule.addToCart()})}(jQuery);



!function(d){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.widgetCollapse()}),woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){woodmartThemeModule.widgetCollapse()},300)),woodmartThemeModule.widgetCollapse=function(){var e=d(".main-footer .footer-widget");"yes"===woodmart_settings.collapse_footer_widgets&&0<e.length&&(woodmartThemeModule.$window.innerWidth()<=575?e.addClass("wd-widget-collapse"):(e.removeClass("wd-widget-collapse"),e.find("> *:not(.widget-title)").show())),d(".wd-widget-collapse .widget-title").off("click").on("click",function(){var e=d(this).parent(),o=e.find("> *:not(.widget-title)");e.hasClass("wd-opened")?(e.removeClass("wd-opened"),o.stop().slideUp(200)):(e.addClass("wd-opened"),o.stop().slideDown(200),woodmartThemeModule.$document.trigger("wood-images-loaded"))})},d(document).ready(function(){woodmartThemeModule.widgetCollapse()}),window.addEventListener("popstate",function(){woodmartThemeModule.widgetCollapse()})}(jQuery);



!function(l){woodmartThemeModule.scrollTop=function(){var o=l(".scrollToTop");woodmartThemeModule.$window.on("scroll",function(){100<l(this).scrollTop()?o.addClass("button-show"):o.removeClass("button-show")}),o.on("click",function(){return l("html, body").animate({scrollTop:0},800),!1})},l(document).ready(function(){woodmartThemeModule.scrollTop()})}(jQuery);



!function(n){woodmartThemeModule.$document.on("wdCloseMobileMenu",function(){woodmartThemeModule.closeMobileNavigation()}),woodmartThemeModule.mobileNavigation=function(){var e=woodmartThemeModule.$body,o=n(".mobile-nav"),d=n(".mobile-nav .wd-nav-mobile .menu-item-has-children"),a=n(".wd-close-side");d.append('<span class="wd-nav-opener"></span>'),o.on("click",".wd-nav-opener",function(e){e.preventDefault();e=n(this).parent();e.hasClass("opener-page")?(e.removeClass("opener-page").find("> ul, > .wd-sub-menu").slideUp(200),e.removeClass("opener-page").find(".wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul").slideUp(200),e.find("> .wd-nav-opener").removeClass("wd-active")):(e.addClass("opener-page").find("> ul, > .wd-sub-menu").slideDown(200),e.addClass("opener-page").find(".wd-dropdown-menu .container > ul, .wd-dropdown-menu > ul").slideDown(200),e.find("> .wd-nav-opener").addClass("wd-active")),woodmartThemeModule.$document.trigger("wood-images-loaded")}),o.on("click",".wd-nav-mob-tab li",function(e){e.preventDefault();var e=n(this),o=e.data("menu");e.hasClass("wd-active")||(e.parent().find(".wd-active").removeClass("wd-active"),e.addClass("wd-active"),n(".wd-nav-mobile").removeClass("wd-active"),n(".mobile-"+o+"-menu").addClass("wd-active"),woodmartThemeModule.$document.trigger("wood-images-loaded"))}),e.on("click",".wd-header-mobile-nav > a",function(e){e.preventDefault(),o.hasClass("wd-opened")?woodmartThemeModule.closeMobileNavigation():(n(this).parent().addClass("wd-opened"),o.addClass("wd-opened"),a.addClass("wd-close-side-opened"),woodmartThemeModule.$document.trigger("wood-images-loaded"))}),e.on("click touchstart",".wd-close-side",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()}),e.on("click",".mobile-nav .login-side-opener, .mobile-nav .close-side-widget",function(e){e.preventDefault(),woodmartThemeModule.closeMobileNavigation()})},woodmartThemeModule.closeMobileNavigation=function(){n(".wd-header-mobile-nav").removeClass("wd-opened"),n(".mobile-nav").removeClass("wd-opened"),n(".wd-close-side").removeClass("wd-close-side-opened"),n(".mobile-nav .searchform input[type=text]").blur()},n(document).ready(function(){woodmartThemeModule.mobileNavigation()})}(jQuery);



!function(s){woodmartThemeModule.cartWidget=function(){var e=woodmartThemeModule.$body,o=s(".cart-widget-side"),d=s(".wd-close-side"),t=(e.on("click",".cart-widget-opener",function(e){u()||r()||e.preventDefault(),c()?t():setTimeout(function(){n()},10)}),e.on("click touchstart",".wd-close-side",function(){c()&&t()}),e.on("click",".close-side-widget",function(e){e.preventDefault(),c()&&t()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&c()&&t()}),function(){o.removeClass("wd-opened"),d.removeClass("wd-close-side-opened")}),n=function(){if(u()||r())return!1;o.addClass("wd-opened"),d.addClass("wd-close-side-opened")},c=function(){return o.hasClass("wd-opened")},u=function(){return woodmartThemeModule.$body.hasClass("woocommerce-cart")},r=function(){return woodmartThemeModule.$body.hasClass("woocommerce-checkout")}},s(document).ready(function(){woodmartThemeModule.cartWidget()})}(jQuery);


