jQuery.fn.serializeArrayAll=function(){var e=/\r?\n/g;return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this}).map(function(t,r){var a=jQuery(this).val();return null===a?null===a:"checkbox"===this.type&&!1===this.checked?{name:this.name,value:this.checked?this.value:""}:"radio"!==this.type?jQuery.isArray(a)?jQuery.map(a,function(t,a){return{name:r.name,value:t.replace(e,"\r\n")}}):{name:r.name,value:a.replace(e,"\r\n")}:this.checked?{name:this.name,value:this.checked?this.value:""}:void 0}).get()},jQuery(document).ready(function(){jQuery(document.body).on("click",".single_add_to_cart_button:not(.disabled)",function(e){var t=jQuery(this),r=t.closest("form.cart"),a=r.find('input:not([name="product_id"]), select, button, textarea').serializeArrayAll()||0,n=-1!==r.attr("action").indexOf("?")?r.attr("action")+"&wc-ajax=get_refreshed_fragments":r.attr("action")+"?wc-ajax=get_refreshed_fragments";e.preventDefault(),t.find("span").length||t.wrapInner("<span></span>"),jQuery(document.body).trigger("adding_to_cart",[t,a]),jQuery.ajax({type:"POST",url:n,data:a,beforeSend:function(){t.removeClass("added").addClass("loading")},complete:function(){t.addClass("added").removeClass("loading")},success:function(e){e.error&&e.product_url?window.location=e.product_url:(void 0!==e.fragments.awb_woo_notices&&jQuery(e.fragments.awb_woo_notices).hasClass("woocommerce-notices-wrapper")&&jQuery(".woocommerce-notices-wrapper").each(function(t){jQuery(this).replaceWith(jQuery(e.fragments.awb_woo_notices).eq(t))}),jQuery(document.body).trigger("added_to_cart",[e.fragments,e.cart_hash,t]))}})}).on("added_to_cart",function(e){var t,r,a=0;jQuery(".woocommerce-notices-wrapper").length&&(t=fusion.getAdminbarHeight(),r=jQuery(".fusion-header-wrapper").find("div"),a=0,r.each(function(){"fixed"===jQuery(this).css("position")&&(a=jQuery(this).height())}),jQuery("html, body").stop(),jQuery("html, body").animate({scrollTop:jQuery(".woocommerce-notices-wrapper").offset().top-t-a-10},500))})});