jQuery(function(o){o("form.cart").on("submit",function(a){a.preventDefault();var t=o(this);t.block({message:null,overlayCSS:{background:"#fff",opacity:.6}});a=new FormData(this);a.append("add-to-cart",t.find("[name=add-to-cart]").val()),o.ajax({url:wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","dina_add_to_cart"),data:a,type:"POST",processData:!1,contentType:!1,complete:function(a){var r;(a=a.responseJSON)&&(a.error&&a.product_url?window.location=a.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?(r=t.find(".single_add_to_cart_button"),o(document.body).trigger("added_to_cart",[a.fragments,a.cart_hash,r]),o("form.cart .added_to_cart").remove(),o(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove(),o(".woocommerce-notices-wrapper").html(a.fragments.notices_html),t.unblock()):window.location=wc_add_to_cart_params.cart_url)}})})});