");t&&(AjaxMultiAddToCart.usepopupnotifications===!0?displayPopupNotification(t,"success",!0):displayBarNotification(t,"success",3500));let i=u.join("
");return i&&(AjaxMultiAddToCart.usepopupnotifications===!0?displayPopupNotification(i,"error",!0):displayBarNotification(i,"error",0)),!1},resetLoadWaiting:function(){AjaxMultiAddToCart.setLoadWaiting(!1)},ajaxFailure:function(){alert(this.localized_data.AjaxCartFailure)},getSelection:function(n,t){let i={};i=jQuery.extend({},n.data("attributeIds"));var r=parseFloat(n.find(".attribute-combination_quantity").val());if(r>0){if(i["addtocart_1577.EnteredQuantity"]=r,t&&window.ProductPersonalizationInstance){const n=window.ProductPersonalizationInstance.GetSelectedData();if(n&&n.length>0){let t=JSON.stringify(n);i.aodaci_productpersonalization_1577=t}}}else i["addtocart_1577.EnteredQuantity"]=0;return addAntiForgeryToken(i),i}};$(function(){AjaxMultiAddToCart.init("/addproducttocart/details/1577/1",!1,".header-links .cart-qty","#flyout-cart",{AjaxCartFailure:"Das Produkt konnte nicht hinzugefügt werden. Bitte aktualisieren Sie die Seite und versuchen Sie es noch einmal."},!1);let n=$("#multi-add-to-cart");$(".attribute-combinations .attribute-combination_quantity","#multi-add-to-cart").on("focus",function(){let n=$(this).closest(".attribute-combination");attribute_change_handler_1577(n)});$(".attribute-combinations .attribute-combination_quantity","#multi-add-to-cart").on("input paste",function(){let n=0;$(".attribute-combinations .attribute-combination_quantity","#multi-add-to-cart").each(function(){n+=parseFloat(this.value)});$("#product_enteredQuantity_1577").val(n).trigger("change");let t=$(this).closest(".attribute-combination");attribute_change_handler_1577(t);focusAttributeCombination(t);var i={productId:1577,quantity:n};$(document).trigger({type:"product_quantity_changed",changedData:i})});$("#product_enteredQuantity_1577").on("input paste",function(){$(".attribute-combinations .attribute-combination.attribute-combination_selected .attribute-combination_quantity").val($(this).val()).trigger("input")});$(".attribute-combination_select").on("change",function(){let t=$(this).closest(".attribute-combination"),i=$("#"+$(this).attr("id")+"_qty");if(this.checked){let r=parseFloat(i.val());r<1&&i.val(0).trigger("change");t.addClass("attribute-combination_selected selected-value");$("#product_enteredQuantity_1577").attr("readonly",!1);n.addClass("multi-add-to-cart_hasselection")}else{i.val(0).trigger("change");t.removeClass("attribute-combination_selected selected-value");let r=n.find(".attribute-combinations .attribute-combination.attribute-combination_selected");if(r.length==0)$("#product_enteredQuantity_1577").attr("readonly",!0),n.removeClass("multi-add-to-cart_hasselection");else if(r.length>0){let n=[...r.slice(-1)].pop();if(n){let t=$(n).find(".attribute-combination_select");selectAttributeCombination(t,!0)}}}attribute_change_handler_1577(t)});$(".attribute-combinations .qty-box .minus").off("click.multiaddtocart").on("click.multiaddtocart",function(){let t=$(this).closest(".attribute-combination"),n=t.find(".attribute-combination_select"),i=$("#"+n.attr("id")+"_qty"),r=parseFloat(i.val());r<=1&&selectAttributeCombination(n,!1)});$(".attribute-combinations .attribute-square").on("click",function(){let t=$(this).closest("li").find(".attribute-combination_select");if(selectAttributeCombination(t,!0),n.hasClass("multi-add-to-cart-inline")){let i=n.find(".attribute-combinations .attribute-combination_select").not(t);i.each(function(){selectAttributeCombination($(this),!1)})}});$(".attribute-combination-add-more > a").click(function(){n.hasClass("multi-add-to-cart-inline")&&n.removeClass("multi-add-to-cart-inline");$(".attribute-combination-add-more").hide()});let t=$(".attribute-combination_select:checked");if(t&&t.length>0)t.each(function(){$(this).prop("checked",!0).trigger("change")});else{let n=$(".attribute-combination_select").eq(0);n&&n.prop("checked",!0).trigger("change")}$("#personalization-button-1577").click(function(){$("html, body").scrollTop($(".product-personalization-wrapper").offset().top);setTimeout(window.ProductPersonalizationInstance.Personalize(),250)})})