/*! codekit-project 2024-11-15 */
!function(a){"use strict";function s(t){a(t).on("click",e,this.close)}var e='[data-dismiss="alert"]';s.VERSION="3.3.7",s.TRANSITION_DURATION=150,s.prototype.close=function(t){var e=a(this),o=(o=e.attr("data-target"))||(o=e.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,""),i=a("#"===o?[]:o);function n(){i.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),(i=i.length?i:e.closest(".alert")).trigger(t=a.Event("close.bs.alert")),t.isDefaultPrevented()||(i.removeClass("in"),a.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(s.TRANSITION_DURATION):n())};var t=a.fn.alert;a.fn.alert=function(o){return this.each(function(){var t=a(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new s(this)),"string"==typeof o&&e[o].call(t)})},a.fn.alert.Constructor=s,a.fn.alert.noConflict=function(){return a.fn.alert=t,this},a(document).on("click.bs.alert.data-api",e,s.prototype.close)}(jQuery),function(n){"use strict";function a(t,e){this.$element=n(t),this.options=n.extend({},a.DEFAULTS,e),this.$trigger=n('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()}function o(t){t=t.attr("data-target")||(t=t.attr("href"))&&t.replace(/.*(?=#[^\s]+$)/,"");return n(t)}function s(i){return this.each(function(){var t=n(this),e=t.data("bs.collapse"),o=n.extend({},a.DEFAULTS,t.data(),"object"==typeof i&&i);!e&&o.toggle&&/show|hide/.test(i)&&(o.toggle=!1),e||t.data("bs.collapse",e=new a(this,o)),"string"==typeof i&&e[i]()})}a.VERSION="3.3.7",a.TRANSITION_DURATION=350,a.DEFAULTS={toggle:!0},a.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},a.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(t&&t.length&&(i=t.data("bs.collapse"))&&i.transitioning)){var e=n.Event("show.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){t&&t.length&&(s.call(t,"hide"),i||t.data("bs.collapse",null));var o=this.dimension(),e=(this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")});if(!n.support.transition)return e.call(this);var i=n.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",n.proxy(e,this)).emulateTransitionEnd(a.TRANSITION_DURATION)[o](this.$element[0][i])}}}},a.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=n.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var t=this.dimension(),e=(this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")});if(!n.support.transition)return e.call(this);this.$element[t](0).one("bsTransitionEnd",n.proxy(e,this)).emulateTransitionEnd(a.TRANSITION_DURATION)}}},a.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},a.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,e){e=n(e);this.addAriaAndCollapsedClass(o(e),e)},this)).end()},a.prototype.addAriaAndCollapsedClass=function(t,e){var o=t.hasClass("in");t.attr("aria-expanded",o),e.toggleClass("collapsed",!o).attr("aria-expanded",o)};var t=n.fn.collapse;n.fn.collapse=s,n.fn.collapse.Constructor=a,n.fn.collapse.noConflict=function(){return n.fn.collapse=t,this},n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=n(this),t=(e.attr("data-target")||t.preventDefault(),o(e)),e=t.data("bs.collapse")?"toggle":e.data();s.call(t,e)})}(jQuery),function(l){"use strict";function d(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)}d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},d.prototype.init=function(t,e,o){if(this.enabled=!0,this.type=t,this.$element=l(e),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&l(l.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),n=i.length;n--;){var a,s=i[n];"click"==s?this.$element.on("click."+this.type,this.options.selector,l.proxy(this.toggle,this)):"manual"!=s&&(a="hover"==s?"mouseleave":"focusout",this.$element.on(("hover"==s?"mouseenter":"focusin")+"."+this.type,this.options.selector,l.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,l.proxy(this.leave,this)))}this.options.selector?this._options=l.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.getOptions=function(t){return(t=l.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},d.prototype.getDelegateOptions=function(){var o={},i=this.getDefaults();return this._options&&l.each(this._options,function(t,e){i[t]!=e&&(o[t]=e)}),o},d.prototype.enter=function(t){var e=t instanceof this.constructor?t:l(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),l(t.currentTarget).data("bs."+this.type,e)),t instanceof l.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},d.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},d.prototype.leave=function(t){var e=t instanceof this.constructor?t:l(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),l(t.currentTarget).data("bs."+this.type,e)),t instanceof l.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},d.prototype.show=function(){var e,t,o,i,n,a,s,r=l.Event("show.bs."+this.type);this.hasContent()&&this.enabled&&(this.$element.trigger(r),n=l.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),!r.isDefaultPrevented()&&n&&(r=(e=this).tip(),n=this.getUID(this.type),this.setContent(),r.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&r.addClass("fade"),n="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,(s=(t=/\s?auto?\s?/i).test(n))&&(n=n.replace(t,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(n).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type),t=this.getPosition(),o=r[0].offsetWidth,i=r[0].offsetHeight,s&&(s=n,a=this.getPosition(this.$viewport),n="bottom"==n&&t.bottom+i>a.bottom?"top":"top"==n&&t.top-i<a.top?"bottom":"right"==n&&t.right+o>a.width?"left":"left"==n&&t.left-o<a.left?"right":n,r.removeClass(s).addClass(n)),a=this.getCalculatedOffset(n,t,o,i),this.applyPlacement(a,n),s=function(){var t=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==t&&e.leave(e)},l.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",s).emulateTransitionEnd(d.TRANSITION_DURATION):s()))},d.prototype.applyPlacement=function(t,e){var o=this.tip(),i=o[0].offsetWidth,n=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),s=parseInt(o.css("margin-left"),10),a=(isNaN(a)&&(a=0),isNaN(s)&&(s=0),t.top+=a,t.left+=s,l.offset.setOffset(o[0],l.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),o.addClass("in"),o[0].offsetWidth),s=o[0].offsetHeight,r=("top"==e&&s!=n&&(t.top=t.top+n-s),this.getViewportAdjustedDelta(e,t,a,s)),e=(r.left?t.left+=r.left:t.top+=r.top,/top|bottom/.test(e)),i=e?2*r.left-i+a:2*r.top-n+s,a=e?"offsetWidth":"offsetHeight";o.offset(t),this.replaceArrow(i,o[0][a],e)},d.prototype.replaceArrow=function(t,e,o){this.arrow().css(o?"left":"top",50*(1-t/e)+"%").css(o?"top":"left","")},d.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},d.prototype.hide=function(t){var e=this,o=l(this.$tip),i=l.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&o.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(i),!i.isDefaultPrevented())return o.removeClass("in"),l.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(d.TRANSITION_DURATION):n(),this.hoverState=null,this},d.prototype.fixTitle=function(){var t=this.$element;!t.attr("title")&&"string"==typeof t.attr("data-original-title")||t.attr("data-original-title",t.attr("title")||"").attr("title","")},d.prototype.hasContent=function(){return this.getTitle()},d.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],o="BODY"==e.tagName,i=e.getBoundingClientRect(),e=(null==i.width&&(i=l.extend({},i,{width:i.right-i.left,height:i.bottom-i.top})),window.SVGElement&&e instanceof window.SVGElement),e=o?{top:0,left:0}:e?null:t.offset(),t={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},o=o?{width:l(window).width(),height:l(window).height()}:null;return l.extend({},i,t,o,e)},d.prototype.getCalculatedOffset=function(t,e,o,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-o/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-o/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-o}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},d.prototype.getViewportAdjustedDelta=function(t,e,o,i){var n={top:0,left:0};if(!this.$viewport)return n;var a=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);return/right|left/.test(t)?(t=e.top-a-s.scroll,i=e.top+a-s.scroll+i,t<s.top?n.top=s.top-t:i>s.top+s.height&&(n.top=s.top+s.height-i)):(t=e.left-a,i=e.left+a+o,t<s.left?n.left=s.left-t:i>s.right&&(n.left=s.left+s.width-i)),n},d.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},d.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},d.prototype.tip=function(){if(!this.$tip&&(this.$tip=l(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},d.prototype.enable=function(){this.enabled=!0},d.prototype.disable=function(){this.enabled=!1},d.prototype.toggleEnabled=function(){this.enabled=!this.enabled},d.prototype.toggle=function(t){var e=this;t&&((e=l(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),l(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},d.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var t=l.fn.tooltip;l.fn.tooltip=function(i){return this.each(function(){var t=l(this),e=t.data("bs.tooltip"),o="object"==typeof i&&i;!e&&/destroy|hide/.test(i)||(e||t.data("bs.tooltip",e=new d(this,o)),"string"==typeof i&&e[i]())})},l.fn.tooltip.Constructor=d,l.fn.tooltip.noConflict=function(){return l.fn.tooltip=t,this}}(jQuery);const inViewport=(t,e)=>{t.forEach(t=>{t.target.classList.toggle("in-viewport",t.isIntersecting)})},Obs=new IntersectionObserver(inViewport),obsOptions={};function matomoTrackEvent(t,e,o,i){fetch("/client-data.html?modus=TrackEvent&cc="+t+"&ca="+e+"&cn="+encodeURIComponent(o)+"&cv="+i)}function isTouchDevice(){return"ontouchstart"in window||0<navigator.MaxTouchPoints||0<navigator.msMaxTouchPoints}function addslashes(t){return(t+"").replace(/[\\"']/g,"\\$&").replace(/u0000/g,"\\0")}document.querySelectorAll("[data-inviewport]").forEach(t=>{Obs.observe(t,obsOptions)}),document.querySelectorAll(".nav-col a").forEach(t=>{t.addEventListener("click",function(){matomoTrackEvent("Navigation","klickNavigationModal","DropdownNav "+t.text.replace(" ","_")+" ("+t.href.replace("https://www.delinat.com","")+")","")})}),document.querySelectorAll("#navbar-main .toggle-modal > a").forEach(e=>{e.addEventListener("click",function(){let t=e.text;matomoTrackEvent("Navigation","klickNavigationMain",t="MainNav "+(t=e.dataset.linkname?e.dataset.linkname:t)+" ("+e.href.replace("https://www.delinat.com","")+")","")})}),document.querySelectorAll("#nav-top-bar a").forEach(t=>{t.addEventListener("click",function(){matomoTrackEvent("Navigation","klickNavigationTop","TopNav "+t.text.replace(" ","_")+" ("+t.href.replace("https://www.delinat.com","")+")","")})}),document.querySelectorAll("footer a").forEach(t=>{t.addEventListener("click",function(){matomoTrackEvent("Navigation","klickNavigationFooter","Footer "+t.text.replace(" ","_")+" ("+t.href.replace("https://www.delinat.com","")+")","")})}),document.querySelectorAll(".btn-nl0").forEach(t=>{t.addEventListener("click",function(){matomoTrackEvent("Newsletter","submitEmail","Klick zur Anmeldung Footer","")})});var isInViewport=function(t){t=document.querySelector(t).getBoundingClientRect();return 0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)};function initAkk(o,i,n=!1){document.querySelectorAll(o+" .akk-btn").forEach(e=>{if(document.querySelector(e.dataset.target)){"LABEL"===e.tagName&&e.lastElementChild.addEventListener("click",function(t){t.stopPropagation()});let t=document.querySelector(o+" "+e.dataset.target);e.addEventListener("click",function(){t.classList.contains("active")?(n&&document.querySelector(".dropdown-backdrop").classList.remove("in"),e.classList.remove("active"),t.classList.remove("active")):(n&&document.querySelector(".dropdown-backdrop").classList.add("in"),!0===i&&document.querySelectorAll(o+" .akk-btn").forEach(t=>{t.classList.remove("active");let e=document.querySelector(o+" "+t.dataset.target);e.classList.remove("active")}),e.classList.add("active"),t.classList.add("active"))})}})}function showModalLogout(t,e){var o=new Date,i=o.getHours(),n=o.getMinutes(),a=o.getSeconds(),s=i+":"+n+":"+a;console.log("t1: "+s),1===t&&setTimeout(function(){$("#modal-inaktiv").modal("show"),o=new Date,i=o.getHours(),n=o.getMinutes(),a=o.getSeconds(),s=i+":"+n+":"+a,console.log("t2: "+s)},e)}function showLoadingSpinner(t,e="15px",o="15px",i="8px auto"){document.querySelector(t).innerHTML=document.querySelector("#spinner-tpl").innerHTML,document.querySelector(t+" .loading-spinner").style.display="block",document.querySelector(t+" .sk-circle").style.cssText="width: "+e+"; height: "+o+"; margin: "+i+";"}function loadArtikelliste(e,o,i,n,a){console.log("elSelector",e),showLoadingSpinner("#"+e+"-wrapper","25px","25px","50px auto"),new IntersectionObserver(function(t){!0===t[0].isIntersecting&&fetch("/artikelliste.html?elSelector="+e+"&Artikelliste8="+o+"&maxArtikel="+i+"&modus="+n).then(t=>{t.text().then(t=>{document.querySelector("#"+e+"-wrapper").innerHTML=t,new Splide("#"+e,a).mount()})}).catch(t=>{document.querySelector(e).innerHTML=t})},{threshold:[0]}).observe(document.querySelector("#"+e+"-wrapper"))}document.querySelectorAll(".btn.btn-anim").forEach(e=>{e.addEventListener("click",function(t){e.classList.add("btn-loading")})}),document.querySelectorAll(".reload").forEach(e=>{e.addEventListener("click",function(t){"reload"==e.dataset.action&&window.location.reload()})});const bootstrapDetectBreakpoint=function(){if(!this.breakpointValues){this.breakpointNames=["lg","md","sm","xs"],this.breakpointValues=[];for(const e of this.breakpointNames)this.breakpointValues[e]=window.getComputedStyle(document.documentElement).getPropertyValue("--breakpoint-"+e)}let t=this.breakpointNames.length;for(const o of this.breakpointNames)if(t--,window.matchMedia("(min-width: "+this.breakpointValues[o]+")").matches)return{name:o,index:t};return null};var currentBreakpoint=bootstrapDetectBreakpoint();window.addEventListener("resize",function(){var t=bootstrapDetectBreakpoint();t!==currentBreakpoint&&(currentBreakpoint=t)}),window.addEventListener("load",function t(){window.removeEventListener("load",t,!1),currentBreakpoint.index<=2||document.querySelectorAll("#navbar-main .collapse").forEach(t=>{}),document.querySelectorAll(".toggle-modal a").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),document.querySelectorAll(".toggle-modal a").forEach(t=>{t.dataset.target!==e.dataset.target&&document.querySelector(t.dataset.target)&&($(t.dataset.target).modal("hide"),document.querySelector(t.dataset.target).classList.remove("active"))}),$(e.dataset.target).modal("show"),"#modal-search"===e.dataset.target&&document.querySelector("#suchtext").focus(),document.querySelector(e.dataset.target+" .modal-header").scrollIntoView(),e.classList.toggle("active")})}),currentBreakpoint.index<=2?(document.querySelector("#nav-weinabo-content").classList.remove("collapse"),$(".nav-cols .collapse").each(function(){var t=$(this);t.on("show.bs.collapse",function(){$(".collapse").each(function(){t!==$(this)&&$(this).collapse("hide")}),t.siblings("h2").addClass("open")}),t.on("hide.bs.collapse",function(){t.siblings("h2").removeClass("open")})})):document.querySelectorAll(".nav-cols .collapse").forEach(t=>{$(".nav-cols .collapse").collapse("show")}),1<=currentBreakpoint.index?(document.querySelectorAll(".footer-col .collapse").forEach(t=>{t.classList.remove("collapse")}),document.querySelectorAll(".footer-col h2 a").forEach(t=>{t.setAttribute("href","")})):$("footer.collapse").on("show.bs.collapse",function(){$(this).addClass("active")}),document.querySelectorAll(".form-land .click").forEach(e=>{e.addEventListener("click",function(){let t=document.querySelector(e.dataset.nav+" .form-land");t.Land8.value=e.dataset.country,t.submit()})}),document.querySelectorAll(".newwindow").forEach(t=>{t.addEventListener("click",function(t){t.preventDefault();let e=380,o=350;1<currentBreakpoint.index&&(e=0<this.dataset.width?this.dataset.width:600,o=0<this.dataset.height?this.dataset.height:500);var t=(screen.width-e)/2,i=(screen.width-o)/4;window.open(this.href,"newWin","width="+e+", height="+o+", top="+i+", left="+t+", toolbars=no,scrollbars=yes")})})},{passive:!0}),document.querySelectorAll(".box").forEach(o=>{o.dataset.url&&0<o.dataset.url.length&&(o.classList.add("box-link"),o.addEventListener("click",function(t){if(o.classList.contains("box-product")){const e=o.querySelector(".box-buy");e&&(e.contains(t.target)||(location.href=o.dataset.url))}else location.href=o.dataset.url}))}),$(document).ready(function(){function s(t,e,o,i){var n="#addToCart_"+t+" .menge-show .anzeige",a="#addToCart_"+t+" .menge-show .anzeige-default",s="#addToCart_"+t+" .menge-show .anzeige-"+o;Number(o)<=Number(e)&&0<Number(o)?($(n).hide(),$(s).length?$(s).show():($(a).html(o+" "+i),$(a).show()),($("#input_"+t).length?$("#input_"+t):$("#addToCart_"+t+" input")).val(o),"warenkorb"===$("#addToCart_"+t).data("form")&&($.ajax({type:"POST",data:{},url:"/warenkorb-box.html?modus=update&cmd=save&Auftrag8="+$("#addToCart_"+t+" input[name=Auftrag8]").val()+"&Artikel8="+$("#addToCart_"+t+" input[name=Artikel8]").val()+"&Menge="+o,success:function(t){location.reload()}}),showLoadingSpinner(".cart-form","25px","25px","50px auto")),$(".menge-input").fadeOut("slow"),$(".addToCart").attr("data-disabled",""),$(".addToCart").removeClass("disabled"),$("form#addToCart_"+t+" .help-block").html("")):Number(o)<1?$(".menge-input input").each(function(){$(this).val("")}):($(".addToCart").attr("data-disabled","Maximale Menge überschritten"),$(".addToCart").addClass("disabled"),$("form#addToCart_"+t+" .help-block").html("Sie können online maximal "+e+" "+i+' bestellen. Falls Sie mehr bestellen möchten, <a href="/kontaktformular">kontaktieren Sie bitte den Kundenservice</a>.'))}var t;$("#modal-cart").on("show.bs.modal",function(){var e;showLoadingSpinner(e="#modal-cart .modal-body .modal-body-cart","25px","25px","50px auto"),fetch(document.querySelector(e).dataset.url).then(t=>{t.text().then(t=>{document.querySelector(e).innerHTML=t})}).catch(t=>{document.querySelector(e).innerHTML=t})}),$("body").on("click",function(t){var e=$(t.target).data("artikelnummer");$(t.target).hasClass("menge-show-bottom")?($("form#addToCart-bottom_"+e+" .menge-select").fadeIn("slow"),$(".box-product .box-hover").hide()):$(t.target).hasClass("menge-show")?($("form#addToCart_"+e+" .menge-select").fadeIn("slow"),$(".menge-select li").on("click",function(){var t=$(this).data("redirect"),e=$(this).data("artikel8"),o=$(this).data("artikelnummer"),i=$(this).data("menge"),n=$("#addBasket_"+e).data("max"),a=$("#addBasket_"+e).data("einheit");0<Number(i)&&0<Number(e)&&($("#addBasket_"+e).val(i),s(o,n,i,a)),$(".menge-select").fadeOut("slow"),$(this).hasClass("andere")&&($("#input-"+e).fadeIn("slow"),$("#input-"+e+" input").focus())})):"INPUT"===t.target.tagName||($(t.target).hasClass("pos-delete")?$("#addToCart_"+e).action=$(this).data("redirect")+"?modal=cart":$(".menge-select").fadeOut("slow"))}),$(".menge-show").on("click",function(){}),$(".menge-input input").on("change",function(){var t=$(this).data("artikelnummer"),e=$(this).data("max"),o=$(this).data("einheit"),i=$(this).data("value");console.log("change input1"),console.log("intMenge",i),console.log("$(this).value",$(this).value),console.log("change input2"),s(t,e,event.target.value,o)}),$(".addToCart").bind("click",function(e){if(e.preventDefault(),navigator.cookieEnabled)if($(this).attr("data-disabled")&&0<$(this).data("disabled").length)window.alert($(this).data("disabled"));else{var e=$(this).data("artikel8"),o=0;if(0<$("#addBasket_"+e).val()?o=$("#addBasket_"+e).val():0<$(this).data("qty")&&(o=$(this).data("qty")),0!==o){let t="Produktseite";"kategorie"===$(this).data("cartsrc")&&(t="Kategorieseite");var i=$(this).data("name")+" ("+$(this).data("artikelnummer")+")",i=(matomoTrackEvent(t,"inDenWarenkorb",i,$(this).data("price")),"D"),i=(i="CHF"===$(this).data("currency")?"C":i)+"-"+$(this).data("id"),n=(dataLayer.push({ecommerce:null}),dataLayer.push({event:"addToCart",ecommerce:{currencyCode:$(this).data("currency"),add:{products:[{name:addslashes($(this).data("name")),id:i,price:$(this).data("price"),quantity:o}]}}}),$(this)),a=$(this).html(),s=$(this).data("action"),r=($(this).data("anzflaschen"),$(this).data("ds")),i="",l=(void 0!==$(this).data("sprachverzeichnis")&&(i=$(this).data("sprachverzeichnis")),"");$("#Promozuschlag").is(":checked")&&(l=$("#Promozuschlag").val()),$.ajax({type:"POST",data:{},url:i+"/addtocart.html?Artikel7="+e+"&Menge="+o+"&Promozuschlag="+l+"&cmd=save",success:function(t){$(".modal").each(function(){$(this).modal("hide")}),$("#modal-cartconfirm").modal("show"),$("#modal-cartconfirm .modal-body").html(t),$(".nav-top-cart .badge").show(),$(".nav-top-cart .badge").addClass("pulse"),setTimeout(function(){$(".nav-top-cart .badge").removeClass("pulse")},2e3);t=t.substr(t.indexOf('<span class="badge-content">'),t.indexOf("</span>"));$(".nav-top-cart .badge").show(),$(".nav-top-cart .badge").html(t),setTimeout(function(){$(".nav-top-cart .badge").removeClass("pulse")},2e3),"reload"===s?($("html, body").animate({scrollTop:0},20),$(".modal-body").html($("#loading-spinner").html()),location.reload()):($(n).removeClass("btn-loading"),$(n).html(a),void 0!==r&&($("#order-"+r).removeClass("active"),$("#order-"+r+" .qty").hide(),$("#order-"+r+" .select-ds p").hide(),$("#order-"+r+" .select-ds ul").hide(),$("#order-"+r+" .buy div").hide(),$("#order-"+r+" .buy div.ds-in-cart").fadeIn(),$("#order-"+r+" .buy div.ds-in-cart").html('<p class="show"><strong>Vielen Dank!</strong> Bestellen Sie jetzt ein weiteres Abo oder gehen Sie <a href="/warenkorb.html">zur Kasse</a>.'),$("#order-"+r+" .buy").removeClass("col-md-4"),$("#order-"+r+" .buy").addClass("col-md-8"),$("html, body").animate({scrollTop:$("#order-"+r).offset().top},"slow"))),$(".addedToCart").length&&$(".addedToCart").slideDown("slow")}})}}else window.alert("Bitte aktivieren Sie die Cookies in Ihrem Browser, um Artikel in den Warenkorb zu legen.")}),$(".dropdown.nav-top-merkliste").on("show.bs.dropdown",function(){$(".nav-top-merkliste .dropdown-menu").html($("#loading-spinner").html()),$.ajax({type:"POST",url:"/merkzettel-box.html",success:function(t){$(".nav-top-merkliste .dropdown-menu").html(t)}})}),ehiwidget_shopid="28dc153b2fa77d1cb71ad369ad403f5a",ehiwidget_config=[{mode:"block",blockID:"trust-ehi",prefereBEVH:1,logoSize:90,showCert:"1",responsiveBar:"0"}],ehiwidget_shopjs_url="//api2.ehi-siegel.de/api/public/de/widgets/"+ehiwidget_shopid+".js",(t=document.createElement("script")).setAttribute("type","text/javascript"),t.setAttribute("src",ehiwidget_shopjs_url),t.setAttribute("charset","utf-8"),t.setAttribute("async","true"),void 0!==t&&document.getElementsByTagName("head")[0].appendChild(t)}),$("#modal-select-land select").each(function(){for(var e=$(this),t=$(this).children("option").length,o="",i=(e.addClass("select-hidden"),e.wrap('<div class="select"></div>'),e.after('<div class="select-styled"></div>'),e.next("div.select-styled")),n=("selectLand8"===$(this).attr("id")&&(o='<img src="/img/global/flaggen/flag_'+e.children("option").eq(0).val()+'.svg" class="lazyload" width="20" height=""> '),i.html(o+e.children("option").eq(0).text()),$("<ul />",{class:"select-options"}).insertAfter(i)),a=0;a<t;a++)"selectLand8"===$(this).attr("id")&&(o='<img src="/img/global/flaggen/flag_'+e.children("option").eq(a).val()+'.svg" class="lazyload" width="20" height=""> '),$("<li />",{html:o+e.children("option").eq(a).text(),rel:e.children("option").eq(a).val()}).appendTo(n),e.children("option").eq(a).is(":selected")&&($('li[rel="'+e.children("option").eq(a).val()+'"]').addClass("is-selected"),i.html(o+e.children("option").eq(a).text()));var s=n.children("li");i.click(function(t){t.stopPropagation(),$("div.select-styled.active").not(this).each(function(){$(this).removeClass("active").next("ul.select-options").hide()}),$(this).toggleClass("active").next("ul.select-options").toggle()}),s.click(function(t){t.stopPropagation(),i.text($(this).text()).removeClass("active"),e.val($(this).attr("rel")),n.hide()}),$(document,".select-land").click(function(){i.removeClass("active"),n.hide()})}),function(n){"use strict";function i(t){n(t).on("click.bs.dropdown",this.toggle)}var a='[data-toggle="dropdown"]';function s(t){var e=t.attr("data-target"),e=(e=e||(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""))&&n(e);return e&&e.length?e:t.parent()}function r(i){i&&3===i.which||(n(".dropdown-backdrop").remove(),n(a).each(function(){var t=n(this),e=s(t),o={relatedTarget:this};e.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&n.contains(e[0],i.target)||(e.trigger(i=n.Event("hide.bs.dropdown",o)),i.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(n.Event("hidden.bs.dropdown",o)))))}))}i.VERSION="3.3.7",i.prototype.toggle=function(t){var e=n(this);if(!e.is(".disabled, :disabled")){var o=s(e),i=o.hasClass("open");if(r(),!i){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",r);i={relatedTarget:this};if(o.trigger(t=n.Event("show.bs.dropdown",i)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(n.Event("shown.bs.dropdown",i))}return!1}},i.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=n(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var o=s(e),i=o.hasClass("open");if(!i&&27!=t.which||i&&27==t.which)return 27==t.which&&o.find(a).trigger("focus"),e.trigger("click");i=o.find(".dropdown-menu li:not(.disabled):visible a");i.length&&(e=i.index(t.target),38==t.which&&0<e&&e--,40==t.which&&e<i.length-1&&e++,i.eq(e=~e?e:0).trigger("focus"))}}};var t=n.fn.dropdown;n.fn.dropdown=function(o){return this.each(function(){var t=n(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new i(this)),"string"==typeof o&&e[o].call(t)})},n.fn.dropdown.Constructor=i,n.fn.dropdown.noConflict=function(){return n.fn.dropdown=t,this},n(document).on("click.bs.dropdown.data-api",r).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",a,i.prototype.toggle).on("keydown.bs.dropdown.data-api",a,i.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",i.prototype.keydown)}(jQuery),function(a){"use strict";function s(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))}function n(i,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),o=a.extend({},s.DEFAULTS,t.data(),"object"==typeof i&&i);e||t.data("bs.modal",e=new s(this,o)),"string"==typeof i?e[i](n):o.show&&e.show(n)})}s.VERSION="3.3.7",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(o){var i=this,t=a.Event("show.bs.modal",{relatedTarget:o});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&i.$element.hasClass("fade"),e=(i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),t&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus(),a.Event("shown.bs.modal",{relatedTarget:o}));t?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):i.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e,o=this,i=this.$element.hasClass("fade")?"fade":"";this.isShown&&this.options.backdrop?(e=a.support.transition&&i,this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),t&&(e?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t())):!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),i=function(){o.removeBackdrop(),t&&t()},a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):i()):t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t,e=window.innerWidth;e||(e=(t=document.documentElement.getBoundingClientRect()).right-Math.abs(t.left)),this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},s.prototype.measureScrollbar=function(){var t=document.createElement("div"),e=(t.className="modal-scrollbar-measure",this.$body.append(t),t.offsetWidth-t.clientWidth);return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=n,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),o=e.attr("href"),i=a(e.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),o=i.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(o)&&o},i.data(),e.data());e.is("a")&&t.preventDefault(),i.one("show.bs.modal",function(t){t.isDefaultPrevented()||i.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),n.call(i,o,this)})}(jQuery);