jQuery(document).ready(function(r){r(".dina-accessory-checkbox").change(function(){var a=r(this).val(),c=r(this).data("min-quantity");r(".dina-product-accessories").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),r(this).is(":checked")?r.ajax({type:"POST",url:dina_accessory_params.ajax_url,data:{action:"woocommerce_add_to_cart",product_id:a,quantity:c},success:function(a){a.error&&a.product_url?window.location=a.product_url:(r(".dina-product-accessories").unblock(),r(document.body).trigger("wc_fragment_refresh"),r("#dinaSideCart").hasClass("dina-open-side")&&dinaOpenCart())}}):r.ajax({type:"POST",url:dina_accessory_params.ajax_url,data:{action:"dina_remove_from_cart",productid:a},success:function(a){a.success&&(r(".dina-product-accessories").unblock(),r(document.body).trigger("wc_fragment_refresh"),r("#dinaSideCart").hasClass("dina-open-side")&&dinaOpenCart())}})})});