jQuery(window).on("wc_cart_emptied",function(){!jQuery(".fusion-woo-cart_table .cart_item").length&&jQuery(".fusion-woo-cart-totals-wrapper").length&&jQuery(".fusion-woo-cart-totals-wrapper").remove()}),jQuery(window).on("updated_cart_totals",function(){const e=jQuery(".fusion-woo-cart-totals-wrapper .cart_totals");if(e.length){const t=e.find(".shipping"),o=t.children("th").html(),i=t.children("td"),r=i.children("ul").find("input");"2"!==i.attr("colspan")&&(t.children("th").remove(),i.attr("colspan","2").prepend('<div class="awb-shipping-heading">'+o+'</div><div class="awb-shipping-td"></div>'));let n={};r.each(function(){if(void 0!==jQuery(this).attr("checked"))return n=jQuery(this),!1}),n.length&&n.parent().addClass("awb-checked")}}),jQuery("body").on("click",".fusion-woo-cart-totals-wrapper .woocommerce-shipping-methods label",function(e){jQuery(this).closest(".woocommerce-shipping-methods").find("li").removeClass("awb-checked"),jQuery(this).closest("li").addClass("awb-checked")});