").addClass("shipping-title").append($("").addClass("shipping-price-title").text("Shipping:")).append($("").addClass("shipping-loading"));$("#open-estimate-shipping-popup-142504").html(n)}},success:function(){var t=n.getActiveShippingOption();n.selectShippingOption(t);u=!0;n.settings.handlers.success=undefined},error:function(){n.selectShippingOption()},selectedOption:function(t){var i,u,r;t&&t.provider&&t.price&&n.validateAddress(t.address)?(i=$("#open-estimate-shipping-popup-142504"),u=$("
").addClass("shipping-title").append($("").addClass("shipping-price-title").text("Shipping:")).append($("").addClass("shipping-price").text(t.price)),i.html(u),r=$("").addClass("estimated-delivery").append($("").addClass("shipping-address").append($("").text("to "+t.address.countryName+", "+(t.address.stateProvinceName?t.address.stateProvinceName+", ":"")+(n.settings.useCity?t.address.city:t.address.zipPostalCode)+" via "+t.provider)).append($("").addClass("arrow-down"))),t.deliveryDate&&t.deliveryDate!=="-"&&r.append($("").addClass("shipping-date").text("Estimated Delivery on "+t.deliveryDate)),i.append(r)):$("#open-estimate-shipping-popup-142504").html($("").text("Please select the address you want to ship to")).append($("").addClass("arrow-down"))}}},e,i;n=createEstimateShippingPopUp(f);n.init();e=function(){var t=n.getShippingAddress();n.validateAddress(t)?n.getShippingOptions(t):n.selectShippingOption()};i=function(i){var f=i.changedData.productId,r,u;f===142504&&(n.params.selectedShippingOption?(r=n.params.selectedShippingOption.address,u=n.getShippingAddress(),n.addressesAreEqual(r,u)||(t=!0),n.getShippingOptions(r)):t=!0)};setTimeout(function(){$(document).on("product_attributes_changed",i)},500);$(document).on("product_quantity_changed",i);n.selectShippingOption()})