!function(a){woodmartThemeModule.stickyAddToCart=function(){var o,d,t,e=a("form.cart, .out-of-stock"),n=a(".wd-sticky-btn");n.length<=0||e.length<=0||woodmartThemeModule.$window.width()<=768&&!woodmartThemeModule.$body.hasClass("wd-sticky-btn-on-mb")||((t=function(){woodmartThemeModule.$window.width()<=768&&woodmartThemeModule.$body.hasClass("wd-sticky-btn-on-mb")?n.addClass("wd-quantity-overlap"):n.removeClass("wd-quantity-overlap")})(),woodmartThemeModule.$window.on("resize",t),o=e.offset().top+e.outerHeight(),d=a(".scrollToTop"),(t=function(){var t=woodmartThemeModule.$window.scrollTop();o<t?(n.addClass("wd-sticky-btn-shown"),d.addClass("wd-sticky-btn-shown")):t<o&&(n.removeClass("wd-sticky-btn-shown"),d.removeClass("wd-sticky-btn-shown"))})(),woodmartThemeModule.$window.on("scroll",t),a(".wd-sticky-add-to-cart, .wd-sticky-btn .wd-buy-now-btn").on("click",function(t){t.preventDefault(),a("html, body").animate({scrollTop:a(".elementor-widget-woocommerce-product-title,.summary-inner .product_title,.elementor-widget-wd_single_product_title, .wd-single-title").offset().top},800)}),a(".wd-sticky-btn .wd-wishlist-btn a").on("click",function(t){a(this).hasClass("added")||t.preventDefault(),a(".summary-inner > .wd-wishlist-btn a").trigger("click")}),woodmartThemeModule.$document.on("added_to_wishlist",function(){a(".wd-sticky-btn .wd-wishlist-btn a").addClass("added")}),a(".wd-sticky-btn .wd-compare-btn a").on("click",function(t){a(this).hasClass("added")||t.preventDefault(),a(".summary-inner > .wd-compare-btn a").trigger("click")}),woodmartThemeModule.$document.on("added_to_compare",function(){a(".wd-sticky-btn .wd-compare-btn a").addClass("added")}),a(".wd-sticky-btn-cart .qty").on("change",function(){a(".summary-inner .qty").val(a(this).val())}),a(".summary-inner .qty").on("change",function(){a(".wd-sticky-btn-cart .qty").val(a(this).val())}))},a(document).ready(function(){woodmartThemeModule.stickyAddToCart()})}(jQuery);