jQuery(window).on("load",(function(){jQuery(".product-images").each((function(){!jQuery(this).find("img").length&&jQuery(this).find(".onsale").length&&jQuery(this).css("min-height","45px")}))})),jQuery(document).ready((function(){var t,e,a,r;for(jQuery("body").on("click",".add_to_cart_button.ajax_add_to_cart:not(.disabled), .add_to_cart_button.ajax_variation_add_to_cart:not(.disabled)",(function(){var t=jQuery(this).closest(".product, li, .swiper-slide"),e=t.find(".cart-loading"),a=!!t.hasClass("post-card")&&t.find(".fusion-image-wrapper");a&&a.addClass("hover"),e.find("i").removeClass("awb-icon-shopping-cart").addClass("awb-icon-spinner"),e.fadeIn(),setTimeout((function(){e.find("i").hide().removeClass("awb-icon-spinner").addClass("awb-icon-shopping-cart").fadeIn(),e.closest(".fusion-clean-product-image-wrapper, li").addClass("fusion-item-in-cart"),a&&a.removeClass("hover")}),2e3)})).on("click",".add_to_cart_button.ajax_variation_add_to_cart:not(.disabled)",(function(t){var e=jQuery(this),a=e.closest("form.cart"),r=a.find('input:not([name="product_id"]), select, button, textarea').serializeArray()||0,i=-1!==a.attr("action").indexOf("?")?a.attr("action")+"&wc-ajax=get_refreshed_fragments":a.attr("action")+"?wc-ajax=get_refreshed_fragments";t.preventDefault(),e.hasClass("disabled_ajax_add_to_cart")?a.trigger("submit"):(jQuery(document.body).trigger("adding_to_cart",[e,r]),jQuery.ajax({type:"POST",url:i,data:r,success:function(t){t.error&&t.product_url?window.location=t.product_url:jQuery(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,e])}}))})),jQuery("body").on("should_send_ajax_request.adding_to_cart",(function(t,e){return!jQuery(e).hasClass("disabled")})),jQuery("body").on("mouseenter mouseleave",".products .product, .fusion-woo-slider .swiper-slide, .post-card.product",(function(t){var e=jQuery(this).find(".cart-loading");e.find("i").hasClass("awb-icon-shopping-cart")&&("mouseenter"===t.type?e.fadeIn():e.fadeOut())})),t=avadaWooCommerceVars.title_style_type.split(" "),e="","",a="title-heading-left",r=0;r<t.length;r++)e+=" sep-"+t[r];e.indexOf("underline"),jQuery("body").hasClass("rtl")&&(a="title-heading-right"),jQuery(".woocommerce.single-product .related.products > h2").each((function(){jQuery(this).replaceWith((function(){return'<div class="fusion-title title'+e+'"><h'+avadaWooCommerceVars.related_products_heading_size+' class="'+a+'">'+jQuery(this).html()+"</h"+avadaWooCommerceVars.related_products_heading_size+'><span class="awb-title-spacer"></span><div class="title-sep-container"><div class="title-sep'+e+' "></div></div></div>'}))})),jQuery(".woocommerce.single-product .upsells.products > h2").each((function(){jQuery(this).replaceWith((function(){return'<div class="fusion-title title'+e+'"><h3 class="'+a+'">'+jQuery(this).html()+'</h3><span class="awb-title-spacer"></span><div class="title-sep-container"><div class="title-sep'+e+' "></div></div></div>'}))})),jQuery(".products-6 li, .products-5 li, .products-4 li, .products-3 li, .products-2 li").removeClass("last"),jQuery(document).on("change",".fusion-post-card-cart .qty",(function(t){void 0!==this.value&&jQuery(t.target).closest(".fusion-post-card-cart").find(".ajax_add_to_cart").attr("data-quantity",this.value)}))})),jQuery(window).on("wcpf_after_ajax_filtering",(function(){var t=new URLSearchParams(window.location.search);jQuery(".catalog-ordering").find("a").each((function(){var e,a=jQuery(this).attr("href");if(void 0!==a){for(e of t.entries())-1===a.indexOf(e[0])&&(a+="&"+e[0]+"="+e[1]);jQuery(this).attr("href",a)}}))}));