
/*!
	Colorbox 1.6.4
	license: MIT
	http://www.jacklmoore.com/colorbox
*/
(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in x[0]&&!x[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),x.focus())}function c(t){c.str!==t&&(x.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!U){U=$=!0,c(_.get("className")),x.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=Math.max((l!==!1?Math.min(h,a(l,"x")):h)-z-D,0),_.h=Math.max((f!==!1?Math.min(s,a(f,"y")):s)-N-j,0),I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),x.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){x||(V=!1,E=t(i),x=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),L=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),y=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=t('<button type="button"/>').attr({id:Z+"Slideshow"}),L),B=t('<button type="button"/>').attr({id:Z+"Close"}),y.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),M=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!x.parent().length&&t(e.body).append(v,x.append(y,M))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return x?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if($=!0,q=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){L.show()},100),_.get("inline")){var c=t(e).eq(0);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),q=_.get("createImg"),t(q).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(q.height=q.height/i.devicePixelRatio,q.width=q.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){q.height-=q.height*e,q.width-=q.width*e},_.mw&&q.width>_.mw&&(e=(q.width-_.mw)/q.width,o()),_.mh&&q.height>_.mh&&(e=(q.height-_.mh)/q.height,o())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(q.style.cursor="pointer",t(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",h(q)},1)}),q.src=e):e&&M.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,x,y,b,T,C,H,k,W,E,I,M,L,F,R,S,K,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),x.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),x.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),x.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(x[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(x[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=x.offset();if(E.unbind("resize."+Z),x.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,x.css({position:"fixed"})):(l=h,d=s,x.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),x.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||x.css(r),x.dequeue().animate(r,{duration:e||0,complete:function(){n(),$=!1,y[0].style.width=_.w+z+D+"px",y[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;U&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if(U){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(M.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),M.hide(),t(q).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&x[0].style.removeAttribute("filter")}var n,o,a=W.length;U&&(o=function(){clearTimeout(Q),L.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?x.fadeTo(g,1,i):i())},"fade"===_.get("transition")?x.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!$&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!$&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){U&&!G&&(G=!0,U=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),x.stop().fadeTo(_.get("fadeOut")||0,0,function(){x.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){x&&(x.stop(),t[Y].close(),x.stop(!1,!0).remove(),v.remove(),G=!1,x=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);
document.addEventListener('DOMContentLoaded', function () {
	const slickSliders = document.querySelectorAll('.slick-container');

	for (let i = 0; i < slickSliders.length; i++) {
		makeSlickSlider(slickSliders[i]);
	}

	function makeSlickSlider(container) {
		const flexform = JSON.parse(container.dataset.flexform);
		let rand;
		if (flexform['randomSlide'] === 'js') {
			const total = container.querySelectorAll('.slick-slider > *').length;
			rand = Math.floor(Math.random() * total);
		}
		const qsParams = (function(fullQueryString) {
			const result = {}, queryString = fullQueryString.substr(1);
			if (typeof queryString != 'string' || !queryString.length)
				return result;
			queryString.split("&").forEach(function (item) {
				const tmp = item.split("=");
				result[tmp[0]] = decodeURIComponent(tmp[1]);
			});
			return result;
		})(location.search);
		function getEmbeddingVideoUrl(linkUrl) {
			let matches;
			matches = linkUrl.match(/youtu\.be\/([A-Za-z0-9]+)|v=([A-Za-z0-9]+)/i);
			if (matches) {
				return '//www.youtube-nocookie.com/embed/' + (matches[1] || matches[2]) + '?rel=0&showinfo=0&autoplay=1';
			}
			matches = linkUrl.match(/vimeo\.com\/([A-Za-z0-9]+)/i);
			if (matches) {
				return '//player.vimeo.com/video/' + matches[1] + '?dnt=1';
			}
			return linkUrl;
		}
		function closest(element, selector) {
			do if (element.matches(selector)) return element;
			while ( (element = element.parentElement) );
			return null;
		}
		function initClickEnlarge(sliderIdentifier) {
			const eItems = slider.querySelectorAll('.slick-item');
			for (let i = 0; i < eItems.length; i++) {
				const eItem = eItems[i];
				const eFigure = eItem.querySelector('figure');
				if (!eFigure || eFigure.matches('.slick-cloned *')) {
					continue;
				}
				const eImage = eFigure.querySelector('img');
				if (!eImage) {
					continue;
				}
				const eLinkPopup = closest(eImage, '.linkpopup');
				let href;
				if (eLinkPopup) {
					href = getEmbeddingVideoUrl(eLinkPopup.href);
				} else {
					href = eImage.dataset.lazy || eImage.src;
				}
				const eFigCaption = eFigure.querySelector('figcaption');
				jQuery(eImage).colorbox({
					close: '&times;',
					current: "{current} von {total}",
					previous: "",
					next: "",
					fixed: true,
					rel: 'a7carousel-' + sliderIdentifier,
					title: eFigCaption ? eFigCaption.textContent : null,
					maxHeight: '95%',
					maxWidth: '95%',
					innerWidth: eLinkPopup !== null ? 1080 : void 0,
					innerHeight: eLinkPopup !== null? 720 : void 0,
					photo: true,
					href: href,
					iframe: eLinkPopup !== null,
					slideshow: true,
					slideshowAuto: false,
					slideshowStart: container.querySelector('.colorboxPlay').outerHTML,
					slideshowStop: container.querySelector('.colorboxStop').outerHTML,
					slideshowSpeed: 3500,
					createImg: function() {
						var img = new Image();
						setTimeout(function() {
							if(img.complete) {
								jQuery(img).trigger("load");
							}
						}, 0);
						return img;
					}
				})
			}
		}

		const slider = container.querySelector('.slick-slider');

		const initialSlideList = (flexform['initialSlide'] || '').split(',').reverse();
		let initialSlide = 0;
		for (let i = 0; i < initialSlideList.length; i++) {
			if (initialSlideList[i] === 'random') {
				initialSlide = rand;
			} else if (initialSlideList[i].charAt(0) === '&') {
				if (typeof qsParams[initialSlideList[i].substring(1)] !== 'undefined') {
					initialSlide = parseInt(qsParams[initialSlideList[i].substring(1)], 10);
				}
			} else {
				initialSlide = parseInt(initialSlideList[i]);
			}
		}


		const responsiveSettings = [];
		const responsiveSizes = [
			["md", container.dataset.settingsVpSmall],
			["sm", container.dataset.settingsVpTablet],
			["xs", container.dataset.settingsVpPhone],
		];
		for (let i = 0; i < responsiveSizes.length; i++) {
			const size = responsiveSizes[i][0];
			const settings = {
				"breakpoint": parseInt(responsiveSizes[i][1]),
			};
			if (flexform['slidesToShow-' + size])
				settings['slidesToShow'] = flexform['slidesToShow-' + size];
			if (flexform['slidesToScroll-' + size])
				settings['slidesToScroll'] = flexform['slidesToScroll-' + size];
			if (flexform['rows-' + size])
				settings['rows'] = flexform['rows-' + size];
			if (flexform['slidesPerRow-' + size])
				settings['slidesPerRow'] = flexform['slidesPerRow-' + size];
			if (flexform['arrows-' + size])
				settings['arrows'] = flexform['arrows-' + size] === '1';
			responsiveSettings.push(settings);
		}

		const sliderSettings = {
			"accessibility": flexform['accessibility'] === "1",
			"autoplay": flexform['autoplay'] === "1",
			"autoplaySpeed": parseInt(flexform['autoplaySpeed']),
			"centerMode": flexform['centerMode'] === "1",
			"centerPadding": flexform['centerPadding'],
			"cssEase": flexform['cssEase'],
			"dots": flexform['dots'] === "1",
			"dotsClass": flexform['dotsClass'],
			"draggable": flexform['draggable'] === '1',
			"edgeFriction": parseFloat(flexform['edgeFriction']),
			"fade": flexform['fade'] === '1',
			"mobileFirst": flexform['mobileFirst'] === '1',
			"infinite": flexform['infinite'] === '1',
			"lazyLoad": flexform['lazyLoad'] === 'off' ? 'ondemand' : flexform['lazyLoad'],
			"initialSlide": initialSlide,
			"pauseOnHover": flexform['pauseOnHover'] === '1',
			"asNavFor": flexform['asNavFor'] || null,
			"pauseOnDotsHover": flexform['pauseOnDotsHover'] === '1',
			"pauseOnFocus": flexform['pauseOnFocus'] === '1',
			"respondTo": flexform['respondTo'],
			"speed": parseInt(flexform['speed']),
			"swipe": flexform['swipe'] === '1',
			"swipeToSlide": flexform['swipeToSlide'] === '1',
			"touchMove": flexform['touchMove'] === '1',
			"focusOnSelect": flexform['focusOnSelect'] === '1',
			"useCSS": flexform['useCSS'] === '1',
			"variableWidth": flexform['variableWidth'] === '1',
			"vertical": flexform['vertical'] === '1',
			"verticalSwiping": flexform['verticalSwiping'] === '1',
			"rtl": flexform['rtl'] === '1',
			"waitForAnimate": flexform['waitForAnimate'] === '1',
			"zIndex": parseInt(flexform['zIndex']),
			"slidesToShow": parseInt(flexform['slidesToShow-lg'] || "4"),
			"slidesToScroll": parseInt(flexform['slidesToScroll-lg'] || "1"),
			"rows": parseInt(flexform['rows-lg'] || "1"),
			"slidesPerRow": parseInt(flexform['slidesPerRow-lg'] || "1"),
			"arrows": flexform['arrows-lg'] === '1',
			"useTransform": true,
			"touchThreshold": 25,
			"responsive": responsiveSettings,
		};
		jQuery(slider).slick(sliderSettings);
		const slickId = slider.id;

		const slick = jQuery(slider).slick('getSlick');
		if (flexform['stopOnArrowHover'] === '1') {
			jQuery(slider.querySelectorAll('.slick-next, .slick-prev'))
				.on('.mouseenter.slick', jQuery.proxy(slick.interrupt, slick, true))
				.on('.mouseleave.slick', jQuery.proxy(slick.interrupt, slick, false))
		}
		if (flexform['showPlayPauseButton'] === '1') {
			const ePlay = document.createElement('button');
			ePlay.classList.add('slick-play');
			ePlay.textContent = 'Play';
			const ePause = document.createElement('button');
			ePause.classList.add('slick-pause');
			ePause.textContent = 'Pause';
			let eCurrent;
			ePlay.addEventListener('click', function() {
				slick.slickPlay();
				const eOld = eCurrent;
				eCurrent = ePause.cloneNode(true);
				eOld.replaceWith(eCurrent);
			});
			ePause.addEventListener('click', function() {
				slick.slickPause();
				const eOld = eCurrent;
				eCurrent = ePlay.cloneNode(true);
				eOld.replaceWith(eCurrent);
			});
			eCurrent = ePause.cloneNode(true);
			const ePlayPauseContainer = document.createElement('div');
			ePlayPauseContainer.classList.add('play-pause-control');
			ePlayPauseContainer.appendChild(eCurrent);
		}

		if (flexform['clickenlarge'] === '1') {
			if (flexform['lazyLoad'] === 'off') {
				setTimeout(function() {
					initClickEnlarge(slickId);
				}, 0);
			} else {
				jQuery(slider).on('refreshed lazyLoaded', function() {
					initClickEnlarge(slickId);
				});
			}
		}

		const eMfpInsideClones = [].map.call(slider.querySelectorAll('.slick-cloned a.magnificpopup > img'), function (e) { return e.parentElement; });
		for (let i = 0; i < eMfpInsideClones.length; i++) {
			const eMfpLink = eMfpInsideClones[i];
			eMfpLink.classList.add('excludeFromMagnificpopup');
		}
	}
});

// Prepend this to all files, using the a7 object:
if (typeof window.a7 === 'undefined') {
	window.a7 = {};
}

// Mobile v3.0.0 (needed by some other scripts - has no effect by itself)
// Depends on:
//  - jQuery v1.7
a7.mobile = function (originalSettings) {
	var defaultSettings = {
		possibleResolutions : ['standard','mobile','tablet','phone']
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);
	var self = a7.mobile;

	var currentResolutions = [];
	self.evalMobile = function() {
		var prevRes = currentResolutions.slice(), i;
		currentResolutions = [];
		jQuery.each(settings.possibleResolutions, function(k, v) {
			if(jQuery('.resdetector.' + v + 'only').css('display') != 'none')
				currentResolutions.push(v);
		});
		var newResolutions = currentResolutions.filter(function(res) { return prevRes.indexOf(res) === -1; });
		var oldResolutions = prevRes.filter(function(res) { return currentResolutions.indexOf(res) === -1; });
		// it is intended that first the old resolutions are abandoned and only after that the new resolutions are handled
		for (i = 0; i < oldResolutions.length; i++)
			self.evalMobile.on[oldResolutions[i]].fire(false, oldResolutions[i]);
		for (i = 0; i < newResolutions.length; i++)
			self.evalMobile.on[newResolutions[i]].fire(true, newResolutions[i]);
	};
	self.initializeMobile = function() {
		jQuery.each(settings.possibleResolutions, function(k, v) {
			var jDetector = jQuery(document.createElement('div'));
			jDetector.addClass(v + 'only resdetector');
			jDetector.attr('id', v + 'detector');
			jDetector.append(document.createTextNode(' '));
			jQuery('body').append(jDetector);
		});
		self.evalMobile.on.initialize.fire();
		jQuery(window).on('resize', self.evalMobile);
		self.evalMobile();
		self.evalMobile.on.initialized.fire();
	};
	self.check = function(size) {
		return currentResolutions.indexOf(size) !== -1;
	};
	self.evalMobile.on = [];
	jQuery.each(settings.possibleResolutions, function(k, v) {
		self.evalMobile.on[v] = jQuery.Callbacks();
	});
	self.evalMobile.on.initialize = jQuery.Callbacks();
	self.evalMobile.on.initialized = jQuery.Callbacks();
	jQuery(window).ready(self.initializeMobile);
};

// GetQsParameters v3.0.0 (needed by some other scripts - has no effect by itself)
// Depends on:
//  - Mobile v3.0.0
a7.getQsParameters = function() {
	var self = a7.getQsParameters;
	self.fn = function(fullQueryString) {
		var result = {}, tmp = [], queryString = fullQueryString.substr(1);
		if(typeof queryString != 'string' || !queryString.length)
			return result;
		queryString.split("&").forEach(function (item) {
			tmp = item.split("=");
			result[tmp[0]] = decodeURIComponent(tmp[1]);
		});
		return result;
	}
};

// Replacer v3.0.0
a7.replacer = function() {
	var replacers = document.querySelectorAll(".replacer");
	replacers = [].slice.call(replacers);
	replacers.forEach(function(replacer) {
		var targetsQuery = replacer.dataset.replacementTargets;
		var targets = document.querySelectorAll(targetsQuery);
		targets = [].slice.call(targets);
		targets.forEach(function(target) {
			var clone = replacer.cloneNode(true);
			clone.classList.remove('replacer');
			clone.classList.add('replacement');
			target.parentNode.replaceChild(clone, target);
		});
	});
};

// Plus v3.0.0 (adds a plus icon into mobile menus)
// Depends on:
//  - GetQsParameters v3.0.0
//  - Mobile v3.0.0
//  - jQuery v1.8
a7.plus = function(originalSettings) {
	var defaultSettings = {
		liFilter : '*',
		resolutions : ['phone'],
		menue : '#menuehoch',
		getAjaxRequestModifications : null,
		subFilter : 'li.sub',
		autoSub : false,
		noAjaxMode : false,
		addPlusFunction : function(li) {
			var plus = jQuery(document.createElement('a')).text('+').addClass('plus');
			li.prepend(plus);
			return plus;
		}
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);
	a7.mobile.evalMobile.on.initialize.add(function() {
		var defaultQsParams = a7.getQsParameters.fn(location.search);
		defaultQsParams['type'] = 91;

		var mobileLoaded = false, mobileLoading = false;
		var jMenuehoch = null;
		jMenuehoch = jQuery(settings.menue);
		jMenuehoch = jMenuehoch.add(jMenuehoch.children('ul')).filter('ul');
		function plus(showPlus) {
			function onClick(ev) {
				jQuery(this).closest('li').children('ul.pluslist').toggleClass('inactive');
				if(jQuery(this).closest('li').children('ul.pluslist').is(':visible')) {
					jQuery(this).text('-').addClass('minus');
				} else {
					jQuery(this).text('+').removeClass('minus');
				}
			}
			function addPlus(li) {
				for(var i = 0; i < li.length; i++) {
					settings.addPlusFunction(li.eq(i)).on('click', onClick);
				}
			}
			if(!mobileLoaded && !mobileLoading && showPlus) {
				var originalRequest = {
					'url' : location.protocol + '//' + location.host + location.pathname,
					'type' : 'GET',
					'data' : defaultQsParams,
					//TODO: error handling
					'success' : function(data, status, xhr) {
						var newDom = jQuery.parseHTML(data);
						var jNewMenu = jQuery(newDom).add(jQuery(newDom).children('ul')).filter('ul');
						jNewMenu.find('>li').filter(settings.liFilter).each(function() {
							var jNli = jQuery(this).addClass('pluslist');
							var jOli = jMenuehoch.find('>li').filter(settings.liFilter).eq(jNli.index());
							var jNcul = jNli.children('ul');
							var jOcul = jOli.children('ul');
							var jNuls = jNcul.add(jNcul.find('ul'));
							// Add class "inactive" to all contained uls
							jNuls.addClass('inactive pluslist');
							jOcul.addClass('nonpluslist');
							if(jOli.length > 0) jOli.append(jNcul);
							else jMenuehoch.append(jNli);
						});
						var jLis, lis;
						if(settings.autoSub) {
							lis = [];
							jMenuehoch.find(settings.liFilter).each(function(idx, el) {
								if(jQuery(el).find('ul').length > 0) {
									lis.push(el);
								}
							});
							jLis = jQuery(lis);
						} else {
							jLis = jMenuehoch.find(settings.liFilter).filter(settings.subFilter);
						}
						addPlus(jLis);
						jLis.filter('.act, .cur').each(function(sk, sv) {
							onClick.call(jQuery(sv).children('.plus'), {});
						});
						mobileLoading = false;
						mobileLoaded = true;
					}
				}, request = originalRequest;
				if(typeof settings.getAjaxRequestModifications == 'function') {
					request = jQuery.extend(originalRequest, settings.getAjaxRequestModifications(originalRequest));
				}
				if(settings.noAjaxMode) {
					request.success(jMenuehoch.prop('outerHTML'));
				} else {
					jQuery.ajax(request);
				}
				mobileLoading = true;
			}
		}
		jQuery.each(settings.resolutions, function(k, v) {
			a7.mobile.evalMobile.on[v].add(plus);
		});
	});
};

// HtmlSwitcher v3.0.0 (moves HTML elements in specific resolutions to other locations)
// Depends on:
//  - Mobile v3.0.0
//  - jQuery
a7.htmlSwitcher = function(originalSettings) {
	var defaultSettings = {
		movements : []
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);
	a7.mobile.evalMobile.on.initialize.add(function() {
		// This variable serves only as template for cloning
		var jPlaceholder = jQuery(document.createElement('div'));
		jPlaceholder.addClass('htmlswitcher placeholder');
		// For each movement, ...
		jQuery.each(settings.movements, function(k, movement) {
			var jSources = jQuery(movement.source);
			// ... and each source of that movement, ...
			jSources.each(function() {
				// ... set jSource to a single source element ...
				var jSource = jQuery(this);
				// ... target to the target element of that source ...
				var target = movement.target;
				if(typeof target == 'function') {
					target = target(jSource);
				}
				var jTarget = jQuery(target);
				if(jTarget.length == 0) {
					return;
				}
				// ... and create a clone of the placeholder.
				var jThisPlaceholder = jPlaceholder.clone().addClass(movement.placeholderClass);
				// This function is called, once per active resolution.
				// The parameter `on` is true if the resolution is entered or false if the resolution is left.
				function doSwitch(on) {
					if(on) {
						jSource.before(jThisPlaceholder);
						switch(movement.insertionStrategy) {
							case 'after':
								jTarget.after(jSource);
								break;
							case 'before':
								jTarget.before(jSource);
								break;
						}
					} else {
						jThisPlaceholder.after(jSource);
						jThisPlaceholder.remove();
					}
				}
				jQuery.each(movement.resolutions, function(k, resolution) {
					a7.mobile.evalMobile.on[resolution].add(doSwitch);
				});
			});
		});
	});
};

// sidemenu v3.0.0 (toggles the 'openmenu' class of the html element when menuicon is clicked)
// Depends on:
//  - jQuery
a7.sidemenu = function(originalSettings) {
	var defaultSettings = {
		menuIcon : '.menuicon',
		backgroundElement : '#links',
		indicateClosedMenu : false
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);
	jQuery(document).ready(function() {
		var jMenuicon = jQuery(settings.menuIcon);
		var jBackgroundElement = jQuery(settings.backgroundElement);
		var jHtml = jQuery(document.documentElement);
		if(settings.indicateClosedMenu) {
			jHtml.addClass('closedmenu');
		}
		jMenuicon.on('click', function(e) {
			jHtml.toggleClass('openmenu');
			if(settings.indicateClosedMenu) {
				jHtml.removeClass('closedmenu');
			}
			e.preventDefault();
		});
		jBackgroundElement.on('click', function(e) {
			if(e.target == jBackgroundElement[0]) {
				jHtml.removeClass('openmenu');
				if(settings.indicateClosedMenu) {
					jHtml.addClass('closedmenu');
				}
			}
		});
	});
};

// TelefonnummernJS v3.0.0 (adds tel:-protocol links to .telefonnummer's in the phone view)
// Depends on:
//  - Mobile v3.0.0
a7.telefonnummern = function(originalSettings) {
	var defaultSettings = {
		resolutions : ['phone'],
		phoneNumerElements : '.telefonnummer'
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);

	var jEls = jQuery(settings.phoneNumerElements);
	function phoneNumbers(activate) {
		if(activate) {
			jEls.each(function() {
				var jEl = jQuery(this);
				var a = document.createElement('a');
				a.href = 'tel:'+jEl.text().replace(/\s*\(0\)\s*|\s+/g, ' ').replace(/^\s*\+\s*/g, '+');
				jEl.wrap(a);
			});
		} else {
			jEls.each(function() {
				var jEl = jQuery(this);
				if(jEl.parent().prop("tagName") == 'A') {
					jEl.unwrap();
				}
			});
		}
	}

	a7.mobile.evalMobile.on.initialize.add(function() {
		jQuery.each(settings.resolutions, function(k, resolution) {
			a7.mobile.evalMobile.on[resolution].add(phoneNumbers);
		});
	});
};

// Print v3.0.0
// Depends on:
//  - Mobile v3.0.0
a7.print = function(originalSettings) {
	var defaultSettings = {
		emptyChecks : [],
		printEmptyClass : 'a7printempty'
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);

	var printMq = window.matchMedia('print');
	function beforePrint() {
		var emptyCheck;
		var jEl;
		for(var i = 0; i < settings.emptyChecks.length; i++) {
			emptyCheck = settings.emptyChecks[i];
			jEl = jQuery(emptyCheck.target);
			jEl.each(function() {
				var jTarget = jQuery(this);
				var jDescendants = jTarget.find(emptyCheck.descendants);
				jDescendants = jDescendants.filter(':visible').not('.noprint').not('.nostandard');
				if(jDescendants.length == 0) {
					jTarget.addClass(settings.printEmptyClass);
				}
			});
		}
	}
	function afterPrint() {
		jQuery('.' + settings.printEmptyClass).removeClass(settings.printEmptyClass);
	}
	printMq.addListener(function() {
		if(printMq.matches) {
			beforePrint();
		} else {
			afterPrint();
		}
	});
	jQuery(window).on('beforeprint', beforePrint).on('afterprint', afterPrint);
};

// Accordion v3.1.3 (makes accordions work for elements of type .fulltext and .headeraccordion)
// Depends on:
// - jQuery 1.7
a7.accordion = function(originalSettings) {
	var defaultSettings = {
		emptyChecks : [],
		printEmptyClass : 'a7printempty',
		accordionOpenElementHtml : null,
		accordionCloseElementHtml : null,
		ignoreSelector : null,
		csc: '.csc',
		headerAccordionHeadSelector: '.csc-header h1, .csc-header h2, .csc-header h3, .csc-header h4, .csc-header h5, .csc-header h6',
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);
	var self = a7.accordion;
	document.addEventListener('DOMContentLoaded', function() {
		if (typeof self.fulltexts === 'undefined') self.fulltexts = [];
		function Fulltext(jFulltext) {
			var self = this;
			self.jFulltext = jFulltext.addClass('hidefulltext fulltext');
			self.jControlElements = jQuery([]);
			self.jAccordion = jQuery([]);
			self.createControlElement = function (jTemplate, actions) {
				var jEl = jTemplate.clone();
				self.convertToControlElement(jEl, actions);
				return jEl;
			};
			self.convertToControlElement = function (jEl, actions) {
				self.jControlElements = self.jControlElements.add(jEl);
				jEl.addClass('hidefulltext');
				var jClickables = jQuery([]);
				if ((actions & Fulltext.ACTION_OPEN) !== 0)
					jClickables = jClickables.add(jEl.find('.more').add(jEl.filter('.more')));
				if ((actions & Fulltext.ACTION_CLOSE) !== 0)
					jClickables = jClickables.add(jEl.find('.close').add(jEl.filter('.close')));
				jClickables.on('click', function () {
					var possibleActions = self.jFulltext.hasClass('showfulltext') ? Fulltext.ACTION_CLOSE : Fulltext.ACTION_OPEN;
					if (jQuery(this).hasClass('more') && (possibleActions & actions & Fulltext.ACTION_OPEN) !== 0)
						self.open();
					if (jQuery(this).hasClass('close') && (possibleActions & actions & Fulltext.ACTION_CLOSE) !== 0)
						self.close();
				});
			};
			self.close = function () {
				self.jFulltext.removeClass('showfulltext').addClass('hidefulltext');
				self.jControlElements.removeClass('showfulltext').addClass('hidefulltext');
				self.jAccordion.removeClass('accordionopened').addClass('accordionclosed');
				self.jFulltext.trigger('accordionclose', [self]);
			};
			self.open = function () {
				self.jFulltext.removeClass('hidefulltext').addClass('showfulltext');
				self.jControlElements.removeClass('hidefulltext').addClass('showfulltext');
				self.jAccordion.removeClass('accordionclosed').addClass('accordionopened');
				self.jFulltext.trigger('accordionopen', [self]);
			};
		}
		function getTemplate(eFulltext, classRegex, setting) {
			if (setting === null)
				return null;
			var classes = Array.prototype.slice.call(eFulltext.classList), i, matches, jTpls;
			jTpls = jQuery(setting);
			for (i = 0; i < classes.length; i++) {
				matches = classRegex.exec(classes[i]);
				if (matches !== null) {
					return jTpls.eq(parseInt(matches[1]));
				}
			}
			return jTpls.eq(0);
		}
		function getMoreTemplate(eFulltext) {
			return getTemplate(eFulltext, /^more(\d+)$/, settings.accordionOpenElementHtml);
		}
		function getCloseTemplate(eFulltext) {
			return getTemplate(eFulltext, /^close(\d+)$/, settings.accordionCloseElementHtml);
		}
		Fulltext.ACTION_OPEN = 0x01;
		Fulltext.ACTION_CLOSE = 0x02;
		self.Fulltext = Fulltext;
		var fulltext, i, jEl, jHeader, jContent, eFulltext, jSetMore, jFulltexts, jCloseElementTemplate, jOpenElementTemplate, jAccordionStandaloneElements, jClose, jMore, jParent, jAccordionContentElements ;
		if (settings.accordionOpenElementHtml !== null) {
			jFulltexts = jQuery('.fulltext');
			if (settings.ignoreSelector !== null)
				jFulltexts = jFulltexts.not(settings.ignoreSelector);
			for (i = 0; i < jFulltexts.length; i++) {
				eFulltext = jFulltexts[i];
				jOpenElementTemplate = getMoreTemplate(eFulltext);
				jCloseElementTemplate = getCloseTemplate(eFulltext);
				fulltext = new Fulltext(jFulltexts.eq(i));
				jSetMore = fulltext.jFulltext.closest(settings.csc).find('.setmore');
				if (jSetMore.length > 0) {
					jSetMore.addClass('more');
					fulltext.convertToControlElement(jSetMore, Fulltext.ACTION_OPEN);
				} else {
					fulltext.createControlElement(jOpenElementTemplate, Fulltext.ACTION_OPEN).insertAfter(fulltext.jFulltext);
				}
				if (fulltext.jFulltext.find('.close').length > 0) {
					fulltext.convertToControlElement(fulltext.jFulltext.find('.close'), Fulltext.ACTION_CLOSE);
				}
				if (jCloseElementTemplate !== null)
					fulltext.createControlElement(jCloseElementTemplate, Fulltext.ACTION_CLOSE).insertAfter(fulltext.jFulltext);
				self.fulltexts.push(fulltext);
			}
		}
		jAccordionStandaloneElements = jQuery('.dataaccordion');
		for (i = 0; i < jAccordionStandaloneElements.length; i++) {
			jEl = jAccordionStandaloneElements.eq(i);
			jParent = jEl.closest(jEl.data('parent'));
			jMore = jParent.find(jEl.data('more'));
			jClose = jParent.find(jEl.data('close'));
			fulltext = new Fulltext(jEl);
			if (jMore.is(jClose)) {
				fulltext.convertToControlElement(jMore, Fulltext.ACTION_OPEN | Fulltext.ACTION_CLOSE);
			} else {
				if (jMore.length > 0)
					fulltext.convertToControlElement(jMore, Fulltext.ACTION_OPEN);
				if (jClose.length > 0)
					fulltext.convertToControlElement(jClose, Fulltext.ACTION_CLOSE);
			}
			fulltext.jAccordion = jEl.addClass('accordionclosed');
			self.fulltexts.push(fulltext);
		}
		jAccordionContentElements = jQuery('.headeraccordion, .ceaccordion');
		for (i = 0; i < jAccordionContentElements.length; i++) {
			jEl = jAccordionContentElements.eq(i);
			jHeader = jEl.filter('.headeraccordion').find(settings.headerAccordionHeadSelector).first();
			jHeader = jHeader.add(jEl.filter('.ceaccordion').find('.csc').first());
			jHeader.addClass('more close');
			jContent = jEl.filter('.headeraccordion').find('.csc-header').parent().children().not('.csc-header');
			jContent = jContent.add(jEl.filter('.ceaccordion').find('.csc').not(jHeader));
			fulltext = new Fulltext(jContent);
			fulltext.convertToControlElement(jHeader, Fulltext.ACTION_OPEN | Fulltext.ACTION_CLOSE);
			fulltext.jAccordion = jEl.addClass('accordionclosed');
			self.fulltexts.push(fulltext);
		}
		setTimeout(function() {
			document.body.classList.add('animateaccordions');
		}, 1000);
	});
};

// ScrollTop v3.0.0 (adds the class 'scrolltop' to the body if the scroll position is on the very top)
// Depends on:
//  - jQuery v1.7
a7.scrollTop = function(originalSettings) {
	var defaultSettings = {
		classIfEnabled : null,
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);

	var oldPosIsTop = null;
	function updateScrollTopClass() {
		var pos = jQuery(window).scrollTop();
		var posIsTop = pos == 0;
		if(posIsTop === oldPosIsTop) {
			return;
		}
		if(posIsTop) {
			jQuery('body').addClass('scrolltop');
		} else {
			jQuery('body').removeClass('scrolltop');
		}
		oldPosIsTop = posIsTop;
		setTimeout(function() {
			if (settings.classIfEnabled !== null) {
				jQuery('body').addClass(settings.classIfEnabled)
			}
		}, 0);
	}
	jQuery(window).on('scroll', updateScrollTopClass);
	jQuery(window).ready(updateScrollTopClass);
};

// Prepend this to all files, using the a7 object:
if (typeof window.a7 === 'undefined') {
	window.a7 = {};
}

// Model v3.0.0
a7.model = function() {
	a7.mobile.evalMobile.on.initialize.add(function () {
		// .h100 means a max height of 100% - so the element being 100% heigh is actually not garanteed
		var jParentsH100 = jQuery('.hvp .slider-wrapper *, .h100 .slider-wrapper *').parents('.csc, .csc *').add('.hvp, .h100');
		var jParentsH50 = jQuery('.h50 .slider-wrapper *').parents('.csc, .csc *').add('.h50');
		var jParentsH33 = jQuery('.h33 .slider-wrapper *').parents('.csc, .csc *').add('.h33');
		var jH100 = jQuery('.hvp.vhforce, .h100.vhforce');
		var jH50 = jQuery('.h50.vhforce');
		var jH33 = jQuery('.h33.vhforce');
		var jFixo = jQuery('#fixo');
		var active = true;

		function correctHeight() {
			if (!active) {
				return;
			}
			var vpInnerHeight = jQuery(window).height();
			vpInnerHeight -= jFixo.height();
			var jVpInclude = jQuery('.vhinclude');
			jVpInclude.each(function () {
				vpInnerHeight -= jQuery(this).height();
			});
			jParentsH100.css('max-height', '' + vpInnerHeight + 'px');
			jH100.css('height', '' + (vpInnerHeight) + 'px');
			jParentsH50.css('max-height', '' + vpInnerHeight / 2 + 'px');
			jH50.css('height', '' + (vpInnerHeight / 2) + 'px');
			jParentsH33.css('max-height', '' + vpInnerHeight / 3 + 'px');
			jH33.css('height', '' + (vpInnerHeight / 3) + 'px');
		}

		a7.mobile.evalMobile.on.standard.add(function (isStandard) {
			active = isStandard;
			if (active) {
				jQuery(window).on('resize.a7.model', correctHeight);
				correctHeight();
			} else {
				jQuery(window).off('resize.a7.model');
				jParentsH100.css('max-height', '');
				jH100.css('height', '');
				jParentsH50.css('max-height', '');
				jH50.css('height', '');
				jParentsH33.css('max-height', '');
				jH33.css('height', '');
			}
		});
	});
};

// Prepend this to all files, using the a7 object:
if (typeof window.a7 === 'undefined') {
	window.a7 = {};
}

// AnchorJS v3.1.0
// a7MB, 25.06.15: Takes the hash of the current URI and sets the scroll position respecting the height of e.g. #fixo to an appropriate position.
a7.anchor = function (originalSettings) {
	var defaultSettings = {
		contentOverlappingElementIds: ['fixo'],
		contentOverlappingElementSelectors: []
	}, settings = jQuery.extend({}, defaultSettings, originalSettings);
	var self = a7.anchor;
	function FixoPosition(top, height) {
		this.getTop = function () { return top; };
		this.getHeight = function () { return height; };
		this.getBot = function () { return top + height; };
	}

	function isFixed(el) {
		var pos = window.getComputedStyle(el).getPropertyValue('position');
		if (pos === 'fixed' || pos === 'sticky') {
			return true;
		} else {
			if (el.parentNode.nodeName.toLowerCase() === 'body') {
				return false;
			} else {
				return isFixed(el.parentNode);
			}
		}
	}

	function getFixoBounds(pos1, pos2) {
		if (pos1.getTop() > pos2.getTop()) {
			return getFixoBounds(pos2, pos1);
		}
		if (pos2.getBot() <= pos1.getBot()) {
			return pos1;
		}
		if (pos2.getTop() <= pos1.getBot()) {
			return new FixoPosition(pos1.getTop(), pos2.getBot() - pos1.getTop());
		}
		return new FixoPosition(Math.min(pos1.getTop(), pos2.getTop()), pos1.getHeight() + pos2.getHeight());
	}

	function correctAnchorScroll(hash, forceJump) {
		var eFixo, fixoPos, eTarget, top, i, fulltext, pos;
		if(typeof hash == 'undefined') {
			hash = location.hash;
		}
		if(hash.length < 2) {
			return true;
		}
		hash = "" + hash;
		eTarget = document.getElementById(hash.substring(1));
		if(eTarget === null || (self.currentHash == hash && (typeof forceJump == 'undefined' || !forceJump))) {
			return true;
		}
		if(typeof a7.accordion !== 'undefined' && typeof a7.accordion.fulltexts !== 'undefined') {
			for(i = 0; i < a7.accordion.fulltexts.length; i++) {
				fulltext = a7.accordion.fulltexts[i];
				if(fulltext.jFulltext.hasClass('showfulltext')) {
					continue;
				}
				var p = fulltext.jFulltext.add(fulltext.jControlElements).add(fulltext.jAccordion);
				if(p.filter(eTarget).length > 0 || p.find(eTarget).length > 0) {
					fulltext.open();
				}
			}
		}
		var selectors = settings.contentOverlappingElementSelectors.slice(0);
		for (i = 0; i < settings.contentOverlappingElementIds.length; i++) {
			selectors.push('#' + settings.contentOverlappingElementIds[i]);
		}
		fixoPos = null;
		for (i = 0; i < selectors.length; i++) {
			eFixo = document.querySelector(selectors[i]);
			if (typeof eFixo === 'undefined' || eFixo === null) {
				continue;
			}
			pos = new FixoPosition(eFixo.offsetTop, eFixo.offsetHeight);
			if (isFixed(eFixo)) {
				if (fixoPos === null) {
					fixoPos = pos;
				} else {
					fixoPos = getFixoBounds(fixoPos, pos);
				}
			}
		}
		if (fixoPos === null || fixoPos.getHeight() === 0) {
			return true;
		}
		top = eTarget.getBoundingClientRect().top - document.body.getBoundingClientRect().top - fixoPos.getHeight();
		window.scrollTo(0, Math.max(0, top - 15));
		self.currentHash = hash;
	}

	function queueCorrectAnchorScroll(arg1, arg2) {
		window.setTimeout(function() {
			correctAnchorScroll(arg1, arg2);
		}, 0);
	}

	function getHashFromUrl(url) {
		var a = document.createElement('a');
		a.href = url;
		return a.hash;
	}

	if(window.addEventListener) {
		window.addEventListener('hashchange', function(ev) { queueCorrectAnchorScroll(getHashFromUrl(ev.newURL), true); });
		window.addEventListener('load', function() {
			queueCorrectAnchorScroll(void 0, true);
			window.setTimeout(function() {
				queueCorrectAnchorScroll(void 0, true);
			}, 1000);
		});
		// This has a bad effect on chrome (jumps to the anchor element too often):
		//window.addEventListener('focus', function() { queueCorrectAnchorScroll(void 0, true); });
		document.addEventListener('DOMContentLoaded', function() {
			document.removeEventListener('DOMContentLoaded', arguments.callee, false);
			correctAnchorScroll();
		}, false );
	} else {
		window.attachEvent('hashchange', function() { queueCorrectAnchorScroll(void 0, true); });
		window.attachEvent('load', function() {
			queueCorrectAnchorScroll(void 0, true);
			window.setTimeout(queueCorrectAnchorScroll, 1000);
		});
		window.attachEvent('focus', function() { queueCorrectAnchorScroll(void 0, true); });
	}
	if(typeof jQuery != 'undefined') {
		jQuery(document).on('click', 'a[href*="#"]', function(e) {
			var sharpPos = this.href.indexOf('#');
			var beforeFragment = this.href.substr(0, sharpPos);
			var lSharpPos = location.href.indexOf('#');
			var lBeforeFragment = location.href.substr(0, lSharpPos);
			if(beforeFragment != lBeforeFragment) {
				return;
			}
			var fragment = this.href.substr(sharpPos + 1);

			if(correctAnchorScroll('#' + fragment, true) !== true) {
				e.preventDefault();
			}
		});
	}
};

'use strict';

// Prepend this to all files, using the a7 object:
if (typeof window.a7 === 'undefined') {
	window.a7 = {};
}

(function() {
	var i, j;
	/** @type {NodeListOf<HTMLDivElement>} */
	var parents = document.querySelectorAll('.overlayinside');
	for (j = 0; j < parents.length; j++) {
		enableOverlay(parents[j]);
	}

	/**
	 * @param {HTMLDivElement} parent
	 */
	function enableOverlay(parent) {
		/** @type {HTMLDivElement} */
		var overlay = parent.querySelector('.overlay');
		if (!overlay) {
			console.warn('No "overlay" inside "overlayinside".');
			return;
		}
		overlay.parentElement.removeChild(overlay);
		parent.querySelector('.ce').appendChild(overlay);
		// parent.classList.add('overlayopen');
		/** @type {HTMLDivElement} */
		// var overlayCscHeader = overlay.querySelector('.csc-header');
		// overlayCscHeader.classList.add('headerlink');
		/** @type {HTMLHeadingElement} */
		// var overlayHeader = overlayCscHeader.querySelector('h1, h2, h3, h4, h5, h6');
		/** @type {Node[]} */
		// var overlayHeaderContent = Array.prototype.slice.call(overlayHeader.childNodes);
		/** @type {HTMLAnchorElement} */
		// var overlayHeaderLink = document.createElement('a');
		// overlayHeaderLink.href = '#';
		// overlayHeaderLink.addEventListener('click', function(event) {
		// 	parent.classList.add('overlayclosed');
		// 	parent.classList.remove('overlayopen');
		// 	event.preventDefault();
		// });
		// overlay.addEventListener('mouseleave', function(event) {
		// 	parent.classList.add('overlayclosed');
		// 	parent.classList.remove('overlayopen');
		// });
		// overlayHeader.append(overlayHeaderLink);
		// for (i = 0; i < overlayHeaderContent.length; i++) {
		// 	overlayHeaderLink.appendChild(overlayHeaderContent[i]);
		// }

		/** @type {NodeListOf<HTMLAnchorElement>} */
		// var headers = parent.querySelectorAll('.overlayinside .csc:not(.overlay) a');
		// for (i = 0; i < headers.length; i++) {
		// 	headers[i].addEventListener('click', function(event) {
		// 		// overlay.style.setProperty('--full-height', "" + parent.getBoundingClientRect().height + "px");
		// 		parent.classList.remove('overlayclosed');
		// 		parent.classList.add('overlayopen');
		// 		event.preventDefault();
		// 	});
		// }
		// window.addEventListener('resize', function() {
		// 	overlay.style.setProperty('--full-height', "" + parent.getBoundingClientRect().height + "px");
		// });
	}
})();

// Link to check compatibility
// https://caniuse.com/arrow-functions,mdn-api_element_queryselectorall,mdn-javascript_operators_spread_spread_in_arrays,classlist,mdn-javascript_builtins_array_every,matchesselector,template-literals,mdn-api_nodelist_foreach,const
// a7.gisaid = () => {
// 	document.querySelectorAll('.csc').forEach(csc => {
// 		const innerCscs = [... csc.querySelectorAll(`#${csc.id} > .ce.shortcut > .csc`)];
// 		if (innerCscs.length > 0 && innerCscs.every(innerCsc => innerCsc.matches('.boxsingle'))) {
// 			csc.classList.add('boxchildren');
// 		}
// 	});
// };
a7.gisaid = function () {
	var i, cscs = document.querySelectorAll('.csc'), csc, innerCsc;
	for (i = 0; i < cscs.length; i++) {
		csc = cscs[i];
		innerCsc = csc.querySelector('#' + csc.id + ' > .ce.shortcut > .csc.boxsingle');
		if (innerCsc !== null) {
			csc.classList.add('boxchildren');
		}
	}

	var j, texts, text, ps, allFloats, style;
	texts = document.querySelectorAll('.csc-textpic-text');
	for (i = 0; i < texts.length; i++) {
		text = texts[i];
		ps = text.children;
		allFloats = true;
		for (j = 0; j < ps.length; j++) {
			style = getComputedStyle(ps[j]);
			if (typeof style.float === 'undefined' || style.float === 'none') {
				allFloats = false;
				break;
			}
		}
		if (allFloats && ps.length !== 0) {
			text.classList.add('floatwrap');
		}
	}

	(function() {
		var button = document.querySelector('button.suche');
		var searchForm = document.getElementById('suche');
		var searchField = document.getElementById('sword');
		var ignoreNextClick = false;
		function pointerTypeCanHover(pointerType) {
			switch(pointerType) {
				case 'mouse':
					return true;
				case 'pen':
					return false;
				case 'touch':
					return false;
				default:
					console.warn('Unknown pointer type ' + pointerType);
					return false;
			}
		}
		button.addEventListener('pointerup', function(event) {
			ignoreNextClick = false;
			if (pointerTypeCanHover(event.pointerType)) {
				return;
			}
			if (!searchForm.classList.contains('open')) {
				ignoreNextClick = true;
				searchForm.classList.add('open');
			}
		});
		button.addEventListener('click', function(event) {
			if (ignoreNextClick) {
				searchField.focus();
				event.preventDefault();
				ignoreNextClick = false;
			}
		});
		searchField.addEventListener('focusout', function(event) {
			searchForm.classList.remove('open');
		});
	})();
};

a7.scrolllist = function () {
	var i, listTexts = document.querySelectorAll('.csc.scrolllist .csc-textpic-text');
	var emHeight;
	var speed = 3; // em per second
	for (i = 0; i < listTexts.length; i++) {
		listTexts[i].parentElement.appendChild(listTexts[i].cloneNode(true));
		emHeight = listTexts[i].getBoundingClientRect().height / parseFloat(getComputedStyle(listTexts[i])['font-size']);
		listTexts[i].closest('.ce0').style.animationDuration = "" + (emHeight / speed) + "s";
	}
};

/////////////////////////////////////////////////////
// Show fullscreen icon for Applications like NextFlu
document.addEventListener('DOMContentLoaded', function() {
	var fullscreenElements = document.querySelectorAll('.canfullscreen');
	var i;
	for (i = 0; i < fullscreenElements.length; i++) {
		(function(element) {
			var activateIcon = document.createElement('img');
			activateIcon.classList.add('fullscreenon');
			activateIcon.src = 'fileadmin/c/gisaid/img/fullscreenon.svg';
			activateIcon.alt = 'Fullscreen';
			activateIcon.title = 'Fullscreen';
			activateIcon.addEventListener('click', function(e) {
				activateFullscreen(element.querySelector('iframe').parentElement);
				e.preventDefault();
			});
			element.querySelector('iframe').parentElement.appendChild(activateIcon);
			var deactivateIcon = document.createElement('img');
			deactivateIcon.classList.add('fullscreenoff');
			deactivateIcon.src = 'fileadmin/c/gisaid/img/fullscreenoff.svg';
			deactivateIcon.alt = 'Disable Fullscreen';
			deactivateIcon.title = 'Disable Fullscreen';
			deactivateIcon.addEventListener('click', function(e) {
				deactivateFullscreen();
				e.preventDefault();
			});
			element.querySelector('iframe').parentElement.appendChild(deactivateIcon);
		})(fullscreenElements[i]);
	}
	function canDisplayFullscreen() {
		return document.fullscreenEnabled ||
			document.msFullscreenEnabled ||
			document.mozFullScreenEnabled ||
			document.webkitFullscreenEnabled;
	}
	function refreshFullscreenAvailability() {
		if(canDisplayFullscreen()) {
			document.body.classList.remove('fullscreenincapable');
		} else {
			document.body.classList.add('fullscreenincapable');
		}
	}
	function activateFullscreen(element) {
		if (element.requestFullscreen) {
			element.requestFullscreen();
		} else if (element.msRequestFullscreen) {
			element.msRequestFullscreen();
		} else if (element.mozRequestFullScreen) {
			element.mozRequestFullScreen();
		} else if (element.webkitRequestFullscreen) {
			element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
		}
	}
	function deactivateFullscreen() {
		if (document.exitFullscreen) {
			document.exitFullscreen();
		} else if (document.msExitFullscreen) {
			document.msExitFullscreen();
		} else if (document.mozCancelFullScreen) {
			document.mozCancelFullScreen();
		} else if (document.webkitExitFullscreen) {
			document.webkitExitFullscreen();
		}
	}
	refreshFullscreenAvailability();
});

document.addEventListener('DOMContentLoaded', function () {
	var links = document.querySelectorAll('.linkpopup');
	var i, link;

	for (i = 0; i < links.length; i++) {
		link = links[i];
		if (/https?:\/\/([^\/]*\.)?vimeo\.com($|\/)/.test(link)) {
			$(link).magnificPopup({
				items: [
					{
						src: link.href,
						type: 'iframe'
					}
				],
				iframe: {
					patterns: {
						vimeo: {
							index: 'vimeo.com/',
							id: '/',
							src: '//player.vimeo.com/video/%id%?autoplay=1'
						}
					},
					srcAction: 'iframe_src'
				}
			});
		} else {
			includeVideoJsLib((function(link) {
				return function() {
					var element = makeVideoForPopup(link);
					$(link).magnificPopup({
						mainClass: 'vjspopup',
						items: [
							{
								src: element,
								type: 'inline'
							}
						],
					});
				};
			})(link));
		}
	}

	function includeVideoJsLib(callback) {
		var isLoading = true;
		if (window.videoJsLoadedListeners === undefined) {
			window.videoJsLoadedListeners = [];
			isLoading = false;
		}
		window.videoJsLoadedListeners.push(callback);

		if (isLoading) {
			return;
		}

		var scriptVideoJs = document.createElement('script');
		var styleVideoJs = document.createElement('link')
		var scriptVideoJsQualitySelector = document.createElement('script')
		var styleVideoJsQualitySelector = document.createElement('link')
		var documentFirstCssLinkElement = document.querySelector('link[rel="stylesheet"]');

		scriptVideoJs.src = document.querySelector('meta[name="a7libfolder"]').content + '/videojs/video.js';
		styleVideoJs.href = document.querySelector('meta[name="a7libfolder"]').content + '/videojs/video-js.min.css';
		styleVideoJs.rel = 'stylesheet';
		scriptVideoJsQualitySelector.src = document.querySelector('meta[name="a7libfolder"]').content + '/videojsqualityselector/dist/js/silvermine-videojs-quality-selector.js';
		styleVideoJsQualitySelector.href = document.querySelector('meta[name="a7libfolder"]').content + '/videojsqualityselector/dist/css/quality-selector.css';
		styleVideoJsQualitySelector.rel = 'stylesheet';

		scriptVideoJs.addEventListener('load', function() {
			document.head.appendChild(scriptVideoJsQualitySelector);
		});
		scriptVideoJsQualitySelector.addEventListener('load', function() {
			var listener, i;
			for (i = 0; i < window.videoJsLoadedListeners.length; i++) {
				listener = window.videoJsLoadedListeners[i];
				listener();
			}
		});

		document.head.appendChild(scriptVideoJs);
		documentFirstCssLinkElement.insertAdjacentElement('beforebegin', styleVideoJs);
		documentFirstCssLinkElement.insertAdjacentElement('beforebegin', styleVideoJsQualitySelector);
	}

	function makeVideoForPopup(link) {
		var video, source, i, className, videoHeight, videoSrcBase, videoSrcExtension, regexResult, containerDiv, player, ratioExpressionResult, w, h;

		regexResult = /^(?<base>.*)\.(?<extension>[^.]+)$/.exec(link.href);
		videoSrcBase = regexResult.groups['base'];
		videoSrcExtension = regexResult.groups['extension'];

		video = document.createElement('video');
		video.classList.add('video-js');
		video.controls = true;

		for (i = 0; i < link.classList.length; i++) {
			className = link.classList.item(i);
			source = null;
			if (/^v\d+$/.test(className)) {
				videoHeight = parseInt(className.substring(1));
				source = document.createElement('source');
				source.src = videoSrcBase + '_' + videoHeight + 'p.' + videoSrcExtension;
				video.appendChild(source);
			} else if (/^o\d+$/.test(className)) {
				videoHeight = parseInt(className.substring(1));
				source = document.createElement('source');
				source.src = link.href;
				source.setAttribute('selected', 'true');
				video.insertAdjacentElement('afterbegin', source);
			}
			if (source !== null) {
				source.setAttribute('type', 'video/mp4');
				source.setAttribute('label', '' + videoHeight + 'P');
			}
			ratioExpressionResult = /^w(?<w>\d+)h(?<h>\d+)$/.exec(className);
			if (ratioExpressionResult !== null) {
				w = parseInt(ratioExpressionResult.groups['w']);
				h = parseInt(ratioExpressionResult.groups['h']);
			}
		}

		containerDiv = document.createElement('div');
		document.body.appendChild(containerDiv);
		containerDiv.appendChild(video);
		player = videojs(video, {}, function() {
			player.fluid(true);
			player.controlBar.addChild('QualitySelector');
		});

		containerDiv.remove();

		if (w !== undefined && h !== undefined) {
			player.el().classList.add('fixedaspectratio');
			player.el().style.setProperty('--video-aspect-ratio', '' + w + ' / ' + h);
		}

		return containerDiv;
	}
});


			/* decrypt helper function */
		function decryptCharcode(n,start,end,offset) {
			n = n + offset;
			if (offset > 0 && n > end) {
				n = start + (n - end - 1);
			} else if (offset < 0 && n < start) {
				n = end - (start - n - 1);
			}
			return String.fromCharCode(n);
		}
			/* decrypt string */
		function decryptString(enc,offset) {
			var dec = "";
			var len = enc.length;
			for(var i=0; i < len; i++) {
				var n = enc.charCodeAt(i);
				if (n >= 0x2B && n <= 0x3A) {
					dec += decryptCharcode(n,0x2B,0x3A,offset);	/* 0-9 . , - + / : */
				} else if (n >= 0x40 && n <= 0x5A) {
					dec += decryptCharcode(n,0x40,0x5A,offset);	/* A-Z @ */
				} else if (n >= 0x61 && n <= 0x7A) {
					dec += decryptCharcode(n,0x61,0x7A,offset);	/* a-z */
				} else {
					dec += enc.charAt(i);
				}
			}
			return dec;
		}
			/* decrypt spam-protected emails */
		function linkTo_UnCryptMailto(s) {
			location.href = decryptString(s,2);
		}
		
a7.mobile([]);a7.getQsParameters([]);a7.plus({"resolutions": ["mobile"],"menue": "#menuequer","liFilter": "li","noAjaxMode": true,"autoSub": true});a7.htmlSwitcher({"movements": [{"source": "\t\t\t\t.csc-textpic-intext-left-nowrap:not(.csc-textpic-above, .csc-textpic-below)\r\n\t\t\t\t\t.csc-textpic-imagewrap:not(.noswitchimgpos *):not(.phonetextimagefloat *),\r\n\t\t\t\t.csc-textpic-intext-right-nowrap:not(.csc-textpic-above, .csc-textpic-below)\r\n\t\t\t\t\t.csc-textpic-imagewrap:not(.noswitchimgpos *):not(.phonetextimagefloat *),\r\n\t\t\t\t.csc-textpic-left:not(.csc-textpic-above, .csc-textpic-below)\r\n\t\t\t\t\t.csc-textpic-imagewrap:not(.noswitchimgpos *):not(.phonetextimagefloat *),\r\n\t\t\t\t.csc-textpic-right:not(.csc-textpic-above, .csc-textpic-below)\r\n\t\t\t\t\t.csc-textpic-imagewrap:not(.noswitchimgpos *):not(.phonetextimagefloat *)\r","target": 						function(jEl) {
							return jEl.closest('.csc-textpic').find('.csc-textpic-text');
						},"insertionStrategy": "after","placeholderClass": "csc-textpic-imagewrap","resolutions": ["phone"]},{"source": "\t\t\t\t\t\t.tablettextimagenofloat .csc-textpic-intext-left-nowrap:not(.csc-textpic-above, .csc-textpic-below) .csc-textpic-imagewrap:not(.noswitchimgpos *),\r\n\t\t\t\t\t\t.tablettextimagenofloat .csc-textpic-intext-right-nowrap:not(.csc-textpic-above, .csc-textpic-below) .csc-textpic-imagewrap:not(.noswitchimgpos *),\r\n\t\t\t\t\t\t.tablettextimagenofloat .csc-textpic-left:not(.csc-textpic-above, .csc-textpic-below) .csc-textpic-imagewrap:not(.noswitchimgpos *),\r\n\t\t\t\t\t\t.tablettextimagenofloat .csc-textpic-right:not(.csc-textpic-above, .csc-textpic-below) .csc-textpic-imagewrap:not(.noswitchimgpos *)\r","target": 						function(jEl) {
							return jEl.closest('.csc-textpic').find('.csc-textpic-text');
						},"insertionStrategy": "after","placeholderClass": "csc-textpic-imagewrap","resolutions": ["tablet"]},{"source": ".phoneswitchcellpos .posleft","target": 						function(jEl) {
							var siblings = jEl.closest('.ce').children();
							return siblings[siblings.length - 1];
						},"insertionStrategy": "after","resolutions": ["phone"]},{"source": "#rechts > .style2.mobilemoveup","target": "#normal .flex4cols","insertionStrategy": "after","resolutions": ["mobile"]},{"source": "#rechts > .style1.mobilemoveup","target": "#normal .flex4cols","insertionStrategy": "after","resolutions": ["mobile"]},{"source": "#rechts > .flex2cols.mobilemoveup","target": "#normal .flex4cols","insertionStrategy": "after","resolutions": ["mobile"]}]});a7.sidemenu({"backgroundElement": "#menuequerwrap","indicateClosedMenu": true});a7.telefonnummern({"resolutions": ["mobile","standard"],"phoneNumberElements": ".phonenumber"});a7.print({"emptyChecks": [{"target": "#unten","descendants": "#unten0 > * > *"},{"target": "#untenli, #untenmi","descentants": "> *"}]});a7.accordion({"accordionOpenElementHtml": "<p><a class=\"more\" href=\"javascript: void(0);\">read more<\/a><\/p>","accordionCloseElementHtml": "<p><a class=\"close\" href=\"javascript: void(0);\">hide details<\/a><\/p>","headerAccordionHeadSelector": ".csc-header"});a7.model([]);a7.anchor({"contentOverlappingElementIds": ["fixo"],"contentOverlappingElementSelectors": [".schildwrap"]});a7.replacer([]);a7.scrollTop({"classIfEnabled": "scrolltopenabled"});a7.gisaid([]);a7.scrolllist([]);
