!function(a){a.each(["frontend/element_ready/wd_products.default","frontend/element_ready/wd_products_tabs.default"],function(a,b){woodmartThemeModule.wdElementorAddAction(b,function(){woodmartThemeModule.addToCart()})}),woodmartThemeModule.addToCart=function(){var b,c=0;woodmartThemeModule.$body.on("added_to_cart",function(){if("popup"===woodmart_settings.add_to_cart_action){var b=['
"].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:'",type:"inline"}}),a(".white-popup").on("click",".close-popup",function(b){b.preventDefault(),a.magnificPopup.close()}),d()}else if("widget"===woodmart_settings.add_to_cart_action){clearTimeout(c);var e=a(".act-scroll .wd-header-cart .wd-dropdown-cart, .whb-sticked .wd-header-cart .wd-dropdown-cart");e.length>0?e.addClass("wd-opened"):a(".whb-header .wd-header-cart .wd-dropdown-cart").addClass("wd-opened");var f=a(".cart-widget-opener");f.length>0&&f.first().trigger("click"),c=setTimeout(function(){a(".wd-dropdown-cart").removeClass("wd-opened")},3500),d()}woodmartThemeModule.$document.trigger("wdActionAfterAddToCart")});var d=function(){if("yes"!==woodmart_settings.add_to_cart_action_timeout)return!1;clearTimeout(b),b=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);