var site=site||{};site.myAccount=site.myAccount||{},function(e){e(document).ready((function(){site.myAccount.initAddToBag(e(".js-add-to-bag").not(".js-add-to-bag.refillable")),site.myAccount.replenishmentInit(),e(".product-item").not(".device-mobile .product-item").each((function(){var t=e(this);e("#alter_replenishment",t).length>0&&e("#alter_replenishment",t).change((function(n){n.preventDefault(),e(".js-add-to-bag",t).attr("data-freq",e(n.target).val())}))}))})),site.myAccount.replenishmentInit=function(){e(".alter_replenishment_form").each((function(){e(this).change((function(t){t.preventDefault();var n=e(this).find('input[name="SKU_BASE_ID"]').val();e(".replenishment__product__add__SKU"+n).find(".js-add-to-bag").attr("data-freq",e(t.target).val())}))})),e(".js-replenishment-content").click((function(){var t=e(".replenishment-service__learn_more");e(t).toggle(),e.colorbox.resize()})),e(".js-add-to-bag.refillable").off("click").on("click",(function(){site.myAccount.overlayLaunched=1;var t=e(this).parent().find("div.js-replenishment_popover").show(),n=e("html,body").scrollTop(),i=e(document.activeElement);generic.overlay.launch({href:t,inline:!0,cssStyle:{width:480,height:"auto",fixed:!0,onCleanup:function(){t.hide(),e("html,body").scrollTop(n),site.restrict_navigation(t)},onClosed:function(){i.focus()}}})}))},site.myAccount.initAddToBag=function(t){t.unbind(),t.once().bind("click",(function(t){t.preventDefault();var n=e(this),i=e(this).siblings(".add-progress");i.length&&(n.hide(),i.show(),e(document).one("addToCart.success addToCart.failure",(function(){i.hide(),n.show()})));var a=n.attr("data-freq"),o={skuBaseId:n.attr("data-sku-base-id")};void 0!==a&&!1!==a&&(Drupal.settings.globals_variables&&Drupal.settings.globals_variables.enable_auto_replenish_spp&&(o.REPLENISHMENT_FREQ=a,o.itemType="replenishment"),o.add_to_cart=1),prodcat.ui.addToCart(o),site.myAccount.overlayLaunched&&generic.overlay.hide()}))}}(jQuery); //# sourceMappingURL=sku_partial.min.js.map