(function($){window.OpenWarrantyPopup=function(){var $descriptionPopUpLayer=$("#u-popup-warranty-description");$descriptionPopUpLayer.find(".wp--price").html(WarrantySelector.warranty().fee);$descriptionPopUpLayer.uPopUp()};(function(){function getOfferPopUp(){if(!getOfferPopUp.uPopUpInstance){var offerPopUp=$offerPopUpLayer.uPopUp("getInstance");try{var addToCartPopUp=$("#u-popup-add-to-cart").uPopUp("getInstance");var resizeOfferPopUp=function(){if(offerPopUp.content.css("display")==="table")offerPopUp.content.height(addToCartPopUp.content.height());
else offerPopUp.content.height("")};offerPopUp.on("resized",resizeOfferPopUp);resizeOfferPopUp()}catch(e){window.console.info("AddToCart PopUp is missing")}offerPopUp.on("close",no);$offerPopUpLayer.find(".wp--add-to-cart-button").on("click",function(){yes();offerPopUp.down()});$offerPopUpLayer.find(".wp--cancel-button \x3e a").on("click",function(){no();offerPopUp.down();return false});getOfferPopUp.uPopUpInstance=offerPopUp}return getOfferPopUp.uPopUpInstance}var $offerPopUpLayer=$("#u-popup-warranty-offer");
if(!$offerPopUpLayer.length)return;var yes=$.noop;var no=$.noop;window.OpenWarrantyOfferPopup=function(yesCallback,noCallback){yes=yesCallback||$.noop;no=noCallback||$.noop;$offerPopUpLayer.find(".wp--price").html(WarrantySelector.warranty().price);getOfferPopUp().up()}})()})(jQuery);