PageSourceSearch

https://www.tcs.ch/global/wGlobal/layout/scripts/merged/d677c4131b3bf81607bb21b93dc0709c.js?260902233306

js tcs.ch collected 2026-09-24 08:50:12 UTC 479,075 bytes, 4,642 lines download raw bytes

vendor: 5,083 bytes, lines 1-24
1
2wAllowMinimize=true;/*!
3* fancyBox-jQuery Plugin
4* version:2.1.7 (Tue, 28 Feb 2017)
5* requires jQuery v1.6 or later
6*
7* Examples at http://fancyapps.com/fancybox/
8* License:www.fancyapps.com/fancybox/#license
9*
10* Copyright 2017 fancyapps.com
11*
12*/
13;(function (window, document, $, undefined) {"use strict";var H=$("html"),W=$(window),D=$(document),F=$.fancybox=function () {F.open.apply( this, arguments );},IE=navigator.userAgent.match(/msie/i),didUpdate	=null,isTouch		=document.createTouch!==undefined,isQuery	=function(obj) {return obj&&obj.hasOwnProperty&&obj instanceof $;},isString=function(str) {return str&&$.type(str)==="string";},isPercentage=function(str) {return isString(str)&&str.indexOf('%') > 0;},isScrollable=function(el) {return (el&&!(el.style.overflow&&el.style.overflow==='hidden')&&((el.clientWidth&&el.scrollWidth > el.clientWidth)||(el.clientHeight&&el.scrollHeight > el.clientHeight)));},getScalar=function(orig, dim) {var value=parseInt(orig, 10)||0;if (dim&&isPercentage(orig)) {value=F.getViewport()[ dim ] / 100 * value;}return Math.ceil(value);},getValue=function(value, dim) {return getScalar(value, dim) + 'px';};$.extend(F, {version:'2.1.7',defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:true,autoHeight:false,autoWidth:false,autoResize:true,autoCenter:!isTouch,fitToView:true,aspectRatio:false,topRatio:0.5,leftRatio:0.5,scrolling:'auto',wrapCSS:'',arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3000,preload:3,modal:false,loop:true,ajax:{dataType:'html',headers:{ 'X-fancyBox':true }},iframe:{scrolling:'auto',preload:true
14},swf:{wmode:'transparent',allowfullscreen:'true',allowscriptaccess:'always'
15},keys:{next:{13:'left',34:'up',39:'left',40:'up'
16},prev:{8:'right',33:'down',37:'right',38:'down'
17},close:[27],play:[32],toggle:[70]
18},direction:{next:'left',prev:'right'
19},scrollOutside:true,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE?' allowtransparency="true"':'') + '></iframe>',error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',loading:'<div id="fancybox-loading"><div></div></div>'
20},openEffect:'fade',openSpeed:250,openEasing:'swing',openOpacity:true,openMethod:'zoomIn',closeEffect:'fade',closeSpeed:250,closeEasing:'swing',closeOpacity:true,closeMethod:'zoomOut',nextEffect:'elastic',nextSpeed:250,nextEasing:'swing',nextMethod:'changeIn',prevEffect:'elastic',prevSpeed:250,prevEasing:'swing',prevMethod:'changeOut',helpers:{overlay:true,title:true
21},onCancel:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeChange:$.noop,beforeClose:$.noop,afterClose:$.noop
22},group:{},opts:{},previous:null,coming:null,current:null,isActive:false,isOpen:false,isOpened:false,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:false
23},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function (group, opts) {if (!group) {return;}if (!$.isPlainObject(opts)) {opts={};}if (false===F.close(true)) {return;}if (!$.isArray(group)) {group=isQuery(group)?$(group).get():[group];}$.each(group, function(i, element) {var obj={},href,title,content,type,rez,hrefParts,selector;if ($.type(element)==="object") {if (element.nodeType) {element=$(element);}if (isQuery(element)) {obj={href:element.data('fancybox-href')||element.attr('href'),title:$('<div/>').text( element.data('fancybox-title')||element.attr('title')||'' ).html(),isDom:true,element:element
24};if ($.metadata) {$.extend(true, obj, element.metadata());}} else {obj=element;}}href=opts.href||obj.href||(isString(element)?element:null);title=opts.title!==undefined?opts.title:obj.title||'';content=opts.content||obj.content;type=content?'html':(opts.type||obj.type);if (!type&&obj.isDom) {type=element.data('fancybox-type');if (!type) {rez=element.prop('class').match(/fancybox\.(\w+)/);type=rez?rez[1]:null;}}if (isString(href)) {if (!type) {if (F.isImage(href)) {type='image';} else if (F.isSWF(href)) {type='swf';} else if (href.charAt(0)==='#') {type='inline';} else if (isString(element)) {type='html';content=element;}}if (type==='ajax') {hrefParts=href.split(/\s+/, 2);href=hrefParts.shift();selector=hrefParts.shift();}}if (!content) {if (type==='inline') {if (href) {content=$( isString(href)?href.replace(/.*(?=#[^\s]+$)/, ''):
vendor: 25,662 bytes, lines 24-52
24href );} else if (obj.isDom) {content=element;}} else if (type==='html') {content=href;} else if (!type&&!href&&obj.isDom) {type='inline';content=element;}}$.extend(obj, {href:href,type:type,content:content,title:title,selector:selector
25});group[ i ]=obj;});F.opts=$.extend(true, {}, F.defaults, opts);if (opts.keys!==undefined) {F.opts.keys=opts.keys?$.extend({}, F.defaults.keys, opts.keys):false;}F.group=group;return F._start(F.opts.index);},cancel:function () {var coming=F.coming;if (coming&&false===F.trigger('onCancel')) {return;}F.hideLoading();if (!coming) {return;}if (F.ajaxLoad) {F.ajaxLoad.abort();}F.ajaxLoad=null;if (F.imgPreload) {F.imgPreload.onload=F.imgPreload.onerror=null;}if (coming.wrap) {coming.wrap.stop(true, true).trigger('onReset').remove();}F.coming=null;if (!F.current) {F._afterZoomOut( coming );}},close:function (event) {F.cancel();if (false===F.trigger('beforeClose')) {return;}F.unbindEvents();if (!F.isActive) {return;}if (!F.isOpen||event===true) {$('.fancybox-wrap').stop(true).trigger('onReset').remove();F._afterZoomOut();} else {F.isOpen=F.isOpened=false;F.isClosing=true;$('.fancybox-item, .fancybox-nav').remove();F.wrap.stop(true, true).removeClass('fancybox-opened');F.transitions[ F.current.closeMethod ]();}},play:function ( action ) {var clear=function () {clearTimeout(F.player.timer);},set=function () {clear();if (F.current&&F.player.isActive) {F.player.timer=setTimeout(F.next, F.current.playSpeed);}},stop=function () {clear();D.off('.player');F.player.isActive=false;F.trigger('onPlayEnd');},start=function () {if (F.current&&(F.current.loop||F.current.index < F.group.length-1)) {F.player.isActive=true;D.on({'onCancel.player beforeClose.player':stop,'onUpdate.player':set,'beforeLoad.player':clear
26});set();F.trigger('onPlayStart');}};if (action===true||(!F.player.isActive&&action!==false)) {start();} else {stop();}},next:function ( direction ) {var current=F.current;if (current) {if (!isString(direction)) {direction=current.direction.next;}F.jumpto(current.index + 1, direction, 'next');}},prev:function ( direction ) {var current=F.current;if (current) {if (!isString(direction)) {direction=current.direction.prev;}F.jumpto(current.index-1, direction, 'prev');}},jumpto:function ( index, direction, router ) {var current=F.current;if (!current) {return;}index=getScalar(index);F.direction=direction||current.direction[ (index >=current.index?'next':'prev') ];F.router=router||'jumpto';if (current.loop) {if (index < 0) {index=current.group.length + (index % current.group.length);}index=index % current.group.length;}if (current.group[ index ]!==undefined) {F.cancel();F._start(index);}},reposition:function (e, onlyAbsolute) {var current=F.current,wrap=current?current.wrap:null,pos;if (wrap) {pos=F._getPosition(onlyAbsolute);if (e&&e.type==='scroll') {delete pos.position;wrap.stop(true, true).animate(pos, 200);} else {wrap.css(pos);current.pos=$.extend({}, current.dim, pos);}}},update:function (e) {var type=(e&&e.originalEvent&&e.originalEvent.type),anyway=!type||type==='orientationchange';if (anyway) {clearTimeout(didUpdate);didUpdate=null;}if (!F.isOpen||didUpdate) {return;}didUpdate=setTimeout(function() {var current=F.current;if (!current||F.isClosing) {return;}F.wrap.removeClass('fancybox-tmp');if (anyway||type==='load'||(type==='resize'&&current.autoResize)) {F._setDimension();}if (!(type==='scroll'&&current.canShrink)) {F.reposition(e);}F.trigger('onUpdate');didUpdate=null;}, (anyway&&!isTouch?0:300));},toggle:function ( action ) {if (F.isOpen) {F.current.fitToView=$.type(action)==="boolean"?action:!F.current.fitToView;if (isTouch) {F.wrap.removeAttr('style').addClass('fancybox-tmp');F.trigger('onUpdate');}F.update();}},hideLoading:function () {D.off('.loading');$('#fancybox-loading').remove();},showLoading:function () {var el, viewport;F.hideLoading();el=$(F.opts.tpl.loading).click(F.cancel).appendTo('body');D.on('keydown.loading', function(e) {if ((e.which||e.keyCode)===27) {e.preventDefault();F.cancel();}});if (!F.defaults.fixed) {viewport=F.getViewport();el.css({position:'absolute',top:(viewport.h * 0.5) + viewport.y,left:(viewport.w * 0.5) + viewport.x
27});}F.trigger('onLoading');},getViewport:function () {var locked=(F.current&&F.current.locked)||false,rez={x:W.scrollLeft(),y:W.scrollTop()
28};if (locked&&locked.length) {rez.w=locked[0].clientWidth;rez.h=locked[0].clientHeight;} else {rez.w=isTouch&&window.innerWidth?window.innerWidth:W.width();rez.h=isTouch&&window.innerHeight?window.innerHeight:W.height();}return rez;},unbindEvents:function () {if (F.wrap&&isQuery(F.wrap)) {F.wrap.off('.fb');}D.off('.fb');W.off('.fb');},bindEvents:function () {var current=F.current,keys;if (!current) {return;}W.on('orientationchange.fb' + (isTouch?'':' resize.fb') + (current.autoCenter&&!current.locked?' scroll.fb':''), F.update);keys=current.keys;if (keys) {D.on('keydown.fb', function (e) {var code=e.which||e.keyCode,target=e.target||e.srcElement;if (code===27&&F.coming) {return false;}if (!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&!(target&&(target.type||$(target).is('[contenteditable]')))) {$.each(keys, function(i, val) {if (current.group.length > 1&&val[ code ]!==undefined) {F[ i ]( val[ code ] );e.preventDefault();return false;}if ($.inArray(code, val) >-1) {F[ i ] ();e.preventDefault();return false;}});}});}if ($.fn.mousewheel&&current.mouseWheel) {F.wrap.on('mousewheel.fb', function (e, delta, deltaX, deltaY) {var target=e.target||null,parent=$(target),canScroll=false;while (parent.length) {if (canScroll||parent.is('.fancybox-skin')||parent.is('.fancybox-wrap')) {break;}canScroll=isScrollable( parent[0] );parent=$(parent).parent();}if (delta!==0&&!canScroll) {if (F.group.length > 1&&!current.canShrink) {if (deltaY > 0||deltaX > 0) {F.prev( deltaY > 0?'down':'left' );} else if (deltaY < 0||deltaX < 0) {F.next( deltaY < 0?'up':'right' );}e.preventDefault();}}});}},trigger:function (event, o) {var ret, obj=o||F.coming||F.current;if (obj) {if ($.isFunction( obj[event] )) {ret=obj[event].apply(obj, Array.prototype.slice.call(arguments, 1));}if (ret===false) {return false;}if (obj.helpers) {$.each(obj.helpers, function (helper, opts) {if (opts&&F.helpers[helper]&&$.isFunction(F.helpers[helper][event])) {F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj);}});}}D.trigger(event);},isImage:function (str) {return isString(str)&&str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);},isSWF:function (str) {return isString(str)&&str.match(/\.(swf)((\?|#).*)?$/i);},_start:function (index) {var coming={},obj,href,type,margin,padding;index=getScalar( index );obj=F.group[ index ]||null;if (!obj) {return false;}coming=$.extend(true, {}, F.opts, obj);margin=coming.margin;padding=coming.padding;if ($.type(margin)==='number') {coming.margin=[margin, margin, margin, margin];}if ($.type(padding)==='number') {coming.padding=[padding, padding, padding, padding];}if (coming.modal) {$.extend(true, coming, {closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{closeClick:false
29}}});}if (coming.autoSize) {coming.autoWidth=coming.autoHeight=true;}if (coming.width==='auto') {coming.autoWidth=true;}if (coming.height==='auto') {coming.autoHeight=true;}coming.group=F.group;coming.index=index;F.coming=coming;if (false===F.trigger('beforeLoad')) {F.coming=null;return;}type=coming.type;href=coming.href;if (!type) {F.coming=null;if (F.current&&F.router&&F.router!=='jumpto') {F.current.index=index;return F[ F.router ]( F.direction );}return false;}F.isActive=true;if (type==='image'||type==='swf') {coming.autoHeight=coming.autoWidth=false;coming.scrolling='visible';}if (type==='image') {coming.aspectRatio=true;}if (type==='iframe'&&isTouch) {coming.scrolling='scroll';}coming.wrap=$(coming.tpl.wrap).addClass('fancybox-' + (isTouch?'mobile':'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent||'body' );$.extend(coming, {skin:$('.fancybox-skin',  coming.wrap),outer:$('.fancybox-outer', coming.wrap),inner:$('.fancybox-inner', coming.wrap)
30});$.each(["Top", "Right", "Bottom", "Left"], function(i, v) {coming.skin.css('padding' + v, getValue(coming.padding[ i ]));});F.trigger('onReady');if (type==='inline'||type==='html') {if (!coming.content||!coming.content.length) {return F._error( 'content' );}} else if (!href) {return F._error( 'href' );}if (type==='image') {F._loadImage();} else if (type==='ajax') {F._loadAjax();} else if (type==='iframe') {F._loadIframe();} else {F._afterLoad();}},_error:function ( type ) {$.extend(F.coming, {type:'html',autoWidth:true,autoHeight:true,minWidth:0,minHeight:0,scrolling:'no',hasError:type,content:F.coming.tpl.error
31});F._afterLoad();},_loadImage:function () {var img=F.imgPreload=new Image();img.onload=function () {this.onload=this.onerror=null;F.coming.width=this.width / F.opts.pixelRatio;F.coming.height=this.height / F.opts.pixelRatio;F._afterLoad();};img.onerror=function () {this.onload=this.onerror=null;F._error( 'image' );};img.src=F.coming.href;if (img.complete!==true) {F.showLoading();}},_loadAjax:function () {var coming=F.coming;F.showLoading();F.ajaxLoad=$.ajax($.extend({}, coming.ajax, {url:coming.href,error:function (jqXHR, textStatus) {if (F.coming&&textStatus!=='abort') {F._error( 'ajax', jqXHR );} else {F.hideLoading();}},success:function (data, textStatus) {if (textStatus==='success') {coming.content=data;F._afterLoad();}}}));},_loadIframe:function() {var coming=F.coming,iframe=$(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
32.attr('scrolling', isTouch?'auto':coming.iframe.scrolling)
33.attr('src', coming.href);$(coming.wrap).on('onReset', function () {try {$(this).find('iframe').hide().attr('src', '//about:blank').end().empty();} catch (e) {}});if (coming.iframe.preload) {F.showLoading();iframe.one('load', function() {$(this).data('ready', 1);if (!isTouch) {$(this).on('load.fb', F.update);}$(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();F._afterLoad();});}coming.content=iframe.appendTo( coming.inner );if (!coming.iframe.preload) {F._afterLoad();}},_preloadImages:function() {var group=F.group,current=F.current,len=group.length,cnt=current.preload?Math.min(current.preload, len-1):0,item,i;for (i=1; i <=cnt; i +=1) {item=group[ (current.index + i ) % len ];if (item.type==='image'&&item.href) {new Image().src=item.href;}}},_afterLoad:function () {var coming=F.coming,previous=F.current,placeholder='fancybox-placeholder',current,content,type,scrolling,href,embed;F.hideLoading();if (!coming||F.isActive===false) {return;}if (false===F.trigger('afterLoad', coming, previous)) {coming.wrap.stop(true).trigger('onReset').remove();F.coming=null;return;}if (previous) {F.trigger('beforeChange', previous);previous.wrap.stop(true).removeClass('fancybox-opened')
34.find('.fancybox-item, .fancybox-nav')
35.remove();}F.unbindEvents();current=coming;content=coming.content;type=coming.type;scrolling=coming.scrolling;$.extend(F, {wrap:current.wrap,skin:current.skin,outer:current.outer,inner:current.inner,current:current,previous:previous
36});href=current.href;switch (type) {case 'inline':
37case 'ajax':
38case 'html':
39if (current.selector) {content=$('<div>').html(content).find(current.selector);} else if (isQuery(content)) {if (!content.data(placeholder)) {content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() );}content=content.show().detach();current.wrap.on('onReset', function () {if ($(this).find(content).length) {content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false);}});}break;case 'image':
40content=current.tpl.image.replace(/\{href\}/g, href);break;case 'swf':
41content='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>';embed='';$.each(current.swf, function(name, val) {content +='<param name="' + name + '" value="' + val + '"></param>';embed   +=' ' + name + '="' + val + '"';});content +='<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>';break;}if (!(isQuery(content)&&content.parent().is(current.inner))) {current.inner.append( content );}F.trigger('beforeShow');current.inner.css('overflow', scrolling==='yes'?'scroll':(scrolling==='no'?'hidden':scrolling));F._setDimension();F.reposition();F.isOpen=false;F.coming=null;F.bindEvents();if (!F.isOpened) {$('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove();} else if (previous.prevMethod) {F.transitions[ previous.prevMethod ]();}F.transitions[ F.isOpened?current.nextMethod:current.openMethod ]();F._preloadImages();},_setDimension:function () {var viewport=F.getViewport(),steps=0,canShrink=false,canExpand=false,wrap=F.wrap,skin=F.skin,inner=F.inner,current=F.current,width=current.width,height=current.height,minWidth=current.minWidth,minHeight=current.minHeight,maxWidth=current.maxWidth,maxHeight=current.maxHeight,scrolling=current.scrolling,scrollOut=current.scrollOutside?current.scrollbarWidth:0,margin=current.margin,wMargin=getScalar(margin[1] + margin[3]),hMargin=getScalar(margin[0] + margin[2]),wPadding,hPadding,wSpace,hSpace,origWidth,origHeight,origMaxWidth,origMaxHeight,ratio,width_,height_,maxWidth_,maxHeight_,iframe,body;wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp');wPadding=getScalar(skin.outerWidth(true)-skin.width());hPadding=getScalar(skin.outerHeight(true)-skin.height());wSpace=wMargin + wPadding;hSpace=hMargin + hPadding;origWidth=isPercentage(width)?(viewport.w-wSpace) * getScalar(width)  / 100:width;origHeight=isPercentage(height)?(viewport.h-hSpace) * getScalar(height) / 100:height;if (current.type==='iframe') {iframe=current.content;if (current.autoHeight&&iframe&&iframe.data('ready')===1) {try {if (iframe[0].contentWindow.document.location) {inner.width( origWidth ).height(9999);body=iframe.contents().find('body');if (scrollOut) {body.css('overflow-x', 'hidden');}origHeight=body.outerHeight(true);}} catch (e) {}}} else if (current.autoWidth||current.autoHeight) {inner.addClass( 'fancybox-tmp' );if (!current.autoWidth) {inner.width( origWidth );}if (!current.autoHeight) {inner.height( origHeight );}if (current.autoWidth) {origWidth=inner.width();}if (current.autoHeight) {origHeight=inner.height();}inner.removeClass( 'fancybox-tmp' );}width=getScalar( origWidth );height=getScalar( origHeight );ratio=origWidth / origHeight;minWidth=getScalar(isPercentage(minWidth)?getScalar(minWidth, 'w')-wSpace:minWidth);maxWidth=getScalar(isPercentage(maxWidth)?getScalar(maxWidth, 'w')-wSpace:maxWidth);minHeight=getScalar(isPercentage(minHeight)?getScalar(minHeight, 'h')-hSpace:minHeight);maxHeight=getScalar(isPercentage(maxHeight)?getScalar(maxHeight, 'h')-hSpace:maxHeight);origMaxWidth=maxWidth;origMaxHeight=maxHeight;if (current.fitToView) {maxWidth=Math.min(viewport.w-wSpace, maxWidth);maxHeight=Math.min(viewport.h-hSpace, maxHeight);}maxWidth_=viewport.w-wMargin;maxHeight_=viewport.h-hMargin;if (current.aspectRatio) {if (width > maxWidth) {width=maxWidth;height=getScalar(width / ratio);}if (height > maxHeight) {height=maxHeight;width=getScalar(height * ratio);}if (width < minWidth) {width=minWidth;height=getScalar(width / ratio);}if (height < minHeight) {height=minHeight;width=getScalar(height * ratio);}} else {width=Math.max(minWidth, Math.min(width, maxWidth));if (current.autoHeight&&current.type!=='iframe') {inner.width( width );height=inner.height();}height=Math.max(minHeight, Math.min(height, maxHeight));}if (current.fitToView) {inner.width( width ).height( height );wrap.width( width + wPadding );width_=wrap.width();height_=wrap.height();if (current.aspectRatio) {while ((width_ > maxWidth_||height_ > maxHeight_)&&width > minWidth&&height > minHeight) {if (steps++ > 19) {break;}height=Math.max(minHeight, Math.min(maxHeight, height-10));width=getScalar(height * ratio);if (width < minWidth) {width=minWidth;height=getScalar(width / ratio);}if (width > maxWidth) {width=maxWidth;height=getScalar(width / ratio);}inner.width( width ).height( height );wrap.width( width + wPadding );width_=wrap.width();height_=wrap.height();}} else {width=Math.max(minWidth,  Math.min(width,  width-(width_-maxWidth_)));height=Math.max(minHeight, Math.min(height, height-(height_-maxHeight_)));}}if (scrollOut&&scrolling==='auto'&&height < origHeight&&(width + wPadding + scrollOut) < maxWidth_) {width +=scrollOut;}inner.width( width ).height( height );wrap.width( width + wPadding );width_=wrap.width();height_=wrap.height();canShrink=(width_ > maxWidth_||height_ > maxHeight_)&&width > minWidth&&height > minHeight;canExpand=current.aspectRatio?(width < origMaxWidth&&height < origMaxHeight&&width < origWidth&&height < origHeight):((width < origMaxWidth||height < origMaxHeight)&&(width < origWidth||height < origHeight));$.extend(current, {dim:{width	:getValue( width_ ),height	:getValue( height_ )
42},origWidth:origWidth,origHeight:origHeight,canShrink:canShrink,canExpand:canExpand,wPadding:wPadding,hPadding:hPadding,wrapSpace:height_-skin.outerHeight(true),skinSpace:skin.height()-height
43});if (!iframe&&current.autoHeight&&height > minHeight&&height < maxHeight&&!canExpand) {inner.height('auto');}},_getPosition:function (onlyAbsolute) {var current=F.current,viewport=F.getViewport(),margin=current.margin,width=F.wrap.width()  + margin[1] + margin[3],height=F.wrap.height() + margin[0] + margin[2],rez={position:'absolute',top:margin[0],left:margin[3]
44};if (current.autoCenter&&current.fixed&&!onlyAbsolute&&height <=viewport.h&&width <=viewport.w) {rez.position='fixed';} else if (!current.locked) {rez.top  +=viewport.y;rez.left +=viewport.x;}rez.top=getValue(Math.max(rez.top,  rez.top  + ((viewport.h-height) * current.topRatio)));rez.left=getValue(Math.max(rez.left, rez.left + ((viewport.w-width)  * current.leftRatio)));return rez;},_afterZoomIn:function () {var current=F.current;if (!current) {return;}F.isOpen=F.isOpened=true;F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0);F.update();if ( current.closeClick||(current.nextClick&&F.group.length > 1) ) {F.inner.css('cursor', 'pointer').on('click.fb', function(e) {if (!$(e.target).is('a')&&!$(e.target).parent().is('a')) {e.preventDefault();F[ current.closeClick?'close':'next' ]();}});}if (current.closeBtn) {$(current.tpl.closeBtn).appendTo(F.skin).on('click.fb', function(e) {e.preventDefault();F.close();});}if (current.arrows&&F.group.length > 1) {if (current.loop||current.index > 0) {$(current.tpl.prev).appendTo(F.outer).on('click.fb', F.prev);}if (current.loop||current.index < F.group.length-1) {$(current.tpl.next).appendTo(F.outer).on('click.fb', F.next);}}F.trigger('afterShow');if (!current.loop&&current.index===current.group.length-1) {F.play( false );} else if (F.opts.autoPlay&&!F.player.isActive) {F.opts.autoPlay=false;F.play(true);}},_afterZoomOut:function ( obj ) {obj=obj||F.current;$('.fancybox-wrap').trigger('onReset').remove();$.extend(F, {group:{},opts:{},router:false,current:null,isActive:false,isOpened:false,isOpen:false,isClosing:false,wrap:null,skin:null,outer:null,inner:null
45});F.trigger('afterClose', obj);}});F.transitions={getOrigPosition:function () {var current=F.current,element=current.element,orig=current.orig,pos={},width=50,height=50,hPadding=current.hPadding,wPadding=current.wPadding,viewport=F.getViewport();if (!orig&&current.isDom&&element.is(':visible')) {orig=element.find('img:first');if (!orig.length) {orig=element;}}if (isQuery(orig)) {pos=orig.offset();if (orig.is('img')) {width=orig.outerWidth();height=orig.outerHeight();}} else {pos.top=viewport.y + (viewport.h-height) * current.topRatio;pos.left=viewport.x + (viewport.w-width)  * current.leftRatio;}if (F.wrap.css('position')==='fixed'||current.locked) {pos.top-=viewport.y;pos.left-=viewport.x;}pos={top:getValue(pos.top-hPadding * current.topRatio),left:getValue(pos.left-wPadding * current.leftRatio),width:getValue(width  + wPadding),height:getValue(height + hPadding)
46};return pos;},step:function (now, fx) {var ratio,padding,value,prop=fx.prop,current=F.current,wrapSpace=current.wrapSpace,skinSpace=current.skinSpace;if (prop==='width'||prop==='height') {ratio=fx.end===fx.start?1:(now-fx.start) / (fx.end-fx.start);if (F.isClosing) {ratio=1-ratio;}padding=prop==='width'?current.wPadding:current.hPadding;value=now-padding;F.skin[ prop ](  getScalar( prop==='width'?value:value-(wrapSpace * ratio) ) );F.inner[ prop ]( getScalar( prop==='width'?value:value-(wrapSpace * ratio)-(skinSpace * ratio) ) );}},zoomIn:function () {var current=F.current,startPos=current.pos,effect=current.openEffect,elastic=effect==='elastic',endPos=$.extend({opacity:1}, startPos);delete endPos.position;if (elastic) {startPos=this.getOrigPosition();if (current.openOpacity) {startPos.opacity=0.1;}} else if (effect==='fade') {startPos.opacity=0.1;}F.wrap.css(startPos).animate(endPos, {duration:effect==='none'?0:current.openSpeed,easing:current.openEasing,step:elastic?this.step:null,complete:F._afterZoomIn
47});},zoomOut:function () {var current=F.current,effect=current.closeEffect,elastic=effect==='elastic',endPos={opacity:0.1};if (elastic) {endPos=this.getOrigPosition();if (current.closeOpacity) {endPos.opacity=0.1;}}F.wrap.animate(endPos, {duration:effect==='none'?0:current.closeSpeed,easing:current.closeEasing,step:elastic?this.step:null,complete:F._afterZoomOut
48});},changeIn:function () {var current=F.current,effect=current.nextEffect,startPos=current.pos,endPos={ opacity:1 },direction=F.direction,distance=200,field;startPos.opacity=0.1;if (effect==='elastic') {field=direction==='down'||direction==='up'?'top':'left';if (direction==='down'||direction==='right') {startPos[ field ]=getValue(getScalar(startPos[ field ])-distance);endPos[ field ]='+=' + distance + 'px';} else {startPos[ field ]=getValue(getScalar(startPos[ field ]) + distance);endPos[ field ]='-=' + distance + 'px';}}if (effect==='none') {F._afterZoomIn();} else {F.wrap.css(startPos).animate(endPos, {duration:current.nextSpeed,easing:current.nextEasing,complete:F._afterZoomIn
49});}},changeOut:function () {var previous=F.previous,effect=previous.prevEffect,endPos={ opacity:0.1 },direction=F.direction,distance=200;if (effect==='elastic') {endPos[ direction==='down'||direction==='up'?'top':'left' ]=( direction==='up'||direction==='left'?'-':'+' ) + '=' + distance + 'px';}previous.wrap.animate(endPos, {duration:effect==='none'?0:previous.prevSpeed,easing:previous.prevEasing,complete:function () {$(this).trigger('onReset').remove();}});}};F.helpers.overlay={defaults:{closeClick:true,speedOut:200,showEarly:true,css:{},locked:!isTouch,fixed:true
50},overlay:null,fixed:false,el:$('html'),create:function(opts) {var parent;opts=$.extend({}, this.defaults, opts);if (this.overlay) {this.close();}parent=F.coming?F.coming.parent:opts.parent;this.overlay=$('<div class="fancybox-overlay"></div>').appendTo( parent&&parent.length?parent:'body' );this.fixed=false;if (opts.fixed&&F.defaults.fixed) {this.overlay.addClass('fancybox-overlay-fixed');this.fixed=true;}},open:function(opts) {var that=this;opts=$.extend({}, this.defaults, opts);if (this.overlay) {this.overlay.off('.overlay').width('auto').height('auto');} else {this.create(opts);}if (!this.fixed) {W.on('resize.overlay', $.proxy( this.update, this) );this.update();}if (opts.closeClick) {this.overlay.on('click.overlay', function(e) {if ($(e.target).hasClass('fancybox-overlay')) {if (F.isActive) {F.close();} else {that.close();}return false;}});}this.overlay.css( opts.css ).show();},close:function() {W.off('resize.overlay');if (this.el.hasClass('fancybox-lock')) {$('.fancybox-margin').removeClass('fancybox-margin');this.el.removeClass('fancybox-lock');W.scrollTop( this.scrollV ).scrollLeft( this.scrollH );}$('.fancybox-overlay').remove().hide();$.extend(this, {overlay:null,fixed:false
51});},update:function () {var width='100%', offsetWidth;this.overlay.width(width).height('100%');if (IE) {offsetWidth=Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);if (D.width() > offsetWidth) {width=D.width();}} else if (D.width() > W.width()) {width=D.width();}this.overlay.width(width).height(D.height());},onReady:function (opts, obj) {var overlay=this.overlay;$('.fancybox-overlay').stop(true, true);if (!overlay) {this.create(opts);}if (opts.locked&&this.fixed&&obj.fixed) {obj.locked=this.overlay.append( obj.wrap );obj.fixed=false;}if (opts.showEarly===true) {this.beforeShow.apply(this, arguments);}},beforeShow:function(opts, obj) {if (obj.locked&&!this.el.hasClass('fancybox-lock')) {if (this.fixPosition!==false) {$('*:not(object)').filter(function(){return ($(this).css('position')==='fixed'&&!$(this).hasClass("fancybox-overlay")&&!$(this).hasClass("fancybox-wrap") );}).addClass('fancybox-margin');}this.el.addClass('fancybox-margin');this.scrollV=W.scrollTop();this.scrollH=W.scrollLeft();this.el.addClass('fancybox-lock');W.scrollTop( this.scrollV ).scrollLeft( this.scrollH );}this.open(opts);},onUpdate:function() {if (!this.fixed) {this.update();}},afterClose:function (opts) {if (this.overlay&&!F.coming) {this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this ));}}};F.helpers.title={defaults:{type:'float',position:'bottom'
52},beforeShow:function (opts) {var current=F.current,text=current.title,type=opts.type,title,target;if ($.isFunction(text)) {text=text.call(current.element, current);}if (!isString(text)||$.trim(text)==='') {return;}title=$('<div class="fancybox-title fancybox-title-' + type + '-wrap">
52' + text + '</div>');switch (type) {case 'inside':
53target=F.skin;break;case 'outside':
54target=F.wrap;break;case 'over':
55target=F.inner;break;default:
56target=F.skin;title.appendTo('body');if (IE) {title.width( title.width() );}title.wrapInner('<span class="child"></span>');F.current.margin[2] +=Math.abs( getScalar(title.css('margin-bottom')) );break;}title[ (opts.position==='top'?'prependTo':'appendTo') ](target);}};$.fn.fancybox=function (options) {var index,that=$(this),selector=this.selector||'',run=function(e) {var what=$(this).trigger('blur'), idx=index, relType, relVal;if (!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&!what.is('.fancybox-wrap')) {relType=options.groupAttr||'data-fancybox-group';relVal=what.attr(relType);if (!relVal) {relType='rel';relVal=what.get(0)[ relType ];}if (relVal&&relVal!==''&&relVal!=='nofollow') {what=selector.length?$(selector):that;what=what.filter('[' + relType + '="' + relVal + '"]');idx=what.index(this);}options.index=idx;if (F.open(what, options)!==false) {e.preventDefault();}}};options=options||{};index=options.index||0;if (!selector||options.live===false) {that.off('click.fb-start').on('click.fb-start', run);} else {D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run);}this.filter('[data-fancybox-start=1]').trigger('click');return this;};D.ready(function() {var w1, w2;if ( $.scrollbarWidth===undefined ) {$.scrollbarWidth=function() {var parent=$('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),child=parent.children(),width=child.innerWidth()-child.height( 99 ).innerWidth();parent.remove();return width;};}if ( $.support.fixedPosition===undefined ) {$.support.fixedPosition=(function() {var elem=$('<div style="position:fixed;top:20px;"></div>').appendTo('body'),fixed=( elem[0].offsetTop===20||elem[0].offsetTop===15 );elem.remove();return fixed;}());}$.extend(F.defaults, {scrollbarWidth:$.scrollbarWidth(),fixed:$.support.fixedPosition,parent:$('body')
57});w1=$(window).width();H.addClass('fancybox-lock-test');w2=$(window).width();H.removeClass('fancybox-lock-test');$("<style type='text/css'>.fancybox-margin{margin-right:" + (w2-w1) + "px;}</style>").appendTo("head");});}(window, document, jQuery));
58
59const FC_Birthdate = (() => {
60    const ErrorTypes = Object.freeze({
61        INVALID_FORMAT: "invalidFormat",
62        INVALID_DATE: "invalidDate",
63        TOO_YOUNG: "tooYoung",
64    })
65    const fcs = document.querySelectorAll(".formComponent.birthdate");
66
67    const initialize = () => {
68        fcs.forEach((fc) => {
69            fc.querySelector("input[name='birthdateDay']")
70                .addEventListener("keyup", (ev) => FC_Birthdate.focusOn(ev, 'birthdateMonth'));
71            fc.querySelector("input[name='birthdateMonth']")
72                .addEventListener("keyup", (ev) => FC_Birthdate.focusOn(ev, 'birthdateYear'));
73            fc.querySelectorAll("input").forEach(input => {
74                input.addEventListener('keyup', () => {
75                    if (input.classList.contains("invalidInput")) {
76                        document.querySelectorAll(".formComponent.birthdate input")
77                            .forEach(el => el.classList.remove("invalidInput"));
78                        input.closest(".formComponent.birthdate")
79                            .querySelectorAll(".birthdate__errors .formComponent__errorLabel")
80                            .forEach((el) => el.classList.add("hidden"));
81                    }
82                })
83            });
84        });
85    };
86
87    const validate = (fc) => {
88        let isFieldValid = true;
89        const birthday = getValue(fc);
90        const dateFormatRegex = /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/;
91        const userBirthDate = new Date(birthday);
92
93        // Validate date format
94        if (!dateFormatRegex.test(birthday)) {
95            error(fc, ErrorTypes.INVALID_FORMAT);
96            isFieldValid = false;
97        }
98
99        // Make sure it is a valid date
100        if (isNaN(userBirthDate)) {
101            error(fc, ErrorTypes.INVALID_DATE);
102            isFieldValid = false;
103        }
104
105        // Reject years before 1900 (matches the server-side 'geburtstag' rule).
106        if (parseInt(birthday.substring(0, 4), 10) < 1900) {
107            error(fc, ErrorTypes.INVALID_DATE);
108            isFieldValid = false;
109        }
110
111        // Ensure the user is at least 16 years old
112        const cutOff16 = new Date();
113        cutOff16.setFullYear(cutOff16.getFullYear() - 16);
114
115        if (userBirthDate > cutOff16) {
116            error(fc, ErrorTypes.TOO_YOUNG);
117            isFieldValid = false;
118        }
119
120        // Clear any existing error messages if the input is valid
121        if (isFieldValid) {
122            clearErrors(fc);
123        }
124        return isFieldValid;
125    };
126
127    const error = (fc, type) => {
128        fc.querySelector("input[name='birthdateDay']").classList.add("invalidInput");
129        fc.querySelector("input[name='birthdateMonth']").classList.add("invalidInput");
130        fc.querySelector("input[name='birthdateYear']").classList.add("invalidInput");
131
132        fc.querySelectorAll(".birthdate__errors .formComponent__errorLabel").forEach((el) => {
133            el.classList.add("hidden");
134        });
135        fc.querySelector(".birthdate__errors .formComponent__errorLabel." + type).classList.remove("hidden")
136    }
137
138    const clearErrors = (fc) => {
139        fc.querySelector("input[name='birthdateDay']").classList.remove("invalidInput");
140        fc.querySelector("input[name='birthdateMonth']").classList.remove("invalidInput");
141        fc.querySelector("input[name='birthdateYear']").classList.remove("invalidInput");
142
143        fc.querySelectorAll(".birthdate__errors .formComponent__errorLabel").forEach((el) => {
144            el.classList.add("hidden");
145        });
146    }
147
148    const focusOn = (event, className) => {
149        const TAB_KEY_CODE = 9;
150        const SHIFT_KEY_CODE = 16;
151        const MINIMUM_LENGTH = 2;
152        const isTabKey = event.which === TAB_KEY_CODE;
153        const isShiftKey = event.which === SHIFT_KEY_CODE;
154        const inputHasMinimumLength = event.target && event.target.value.toString().length >= MINIMUM_LENGTH;
155        if (!isTabKey && !isShiftKey && inputHasMinimumLength) {
156            const formComponent = event.target.closest(".formComponent");
157            const inputToFocus = formComponent.querySelector("." + className);
158            inputToFocus.focus({ focusVisible: true });
159        }
160    }
161
162    const getValue = (fc) => {
163        const day = fc.querySelector("input[name='birthdateDay']").value.toString().padStart(2, '0');
164        const month = fc.querySelector("input[name='birthdateMonth']").value.toString().padStart(2, '0');
165        const year = fc.querySelector("input[name='birthdateYear']").value.toString();
166
167        return year + "-" + month + "-" + day;
168    }
169
170    return {
171        initialize: initialize,
172        validate: validate,
173        focusOn: focusOn,
174        getValue: getValue,
175    }
176})();
177
178// Initialize birthdate lib
179window.addEventListener('load', () => FC_Birthdate.initialize());
180
181const FC_Phone = (() => {
182    const fcs = document.querySelectorAll(".formComponent.phone");
183
184    const initialize = () => {
185        fcs.forEach((fc) => {
186            // Initialize tooltip
187            const telInfoTooltip = fc.querySelector('.telInfoContent');
188            if (telInfoTooltip) {
189                let tip = tippy(telInfoTooltip, {
190                    content: telInfoTooltip.dataset.tooltip,
191                    theme: 'tcs',
192                    duration: [200, 200]
193                });
194                telInfoTooltip.addEventListener("click", () => {
195                    setTimeout(() => {
196                        tip[0].show();
197                    }, 0);
198                });
199            }
200
201            const phoneTelInput = fc.querySelector(".intlTelPhone");
202            const iti = window.intlTelInput(phoneTelInput, {
203                utilsScript: "/vendor/jackocnr/intl-tel-input/build/js/utils.js",
204                preferredCountries: ['ch', 'de', 'fr', 'it', 'li'],
205                format: true,
206                defaultCountry: 'ch',
207                autoPlaceholder: true
208            });
209
210            if (phoneTelInput.dataset.phone) {
211                iti.setNumber(phoneTelInput.dataset.phone);
212            }
213            if (phoneTelInput.dataset.country) {
214                iti.setCountry(phoneTelInput.dataset.country);
215            }
216
217            phoneTelInput.addEventListener("countrychange", () => {
218                handleChange(iti);
219            });
220            phoneTelInput.addEventListener('keyup', () => {
221                handleChange(iti);
222            });
223        })
224    }
225    const hasOnlyDigitsAndPlus = (phoneNumber) => {
226        const regExp = /^\+?\d+$/g;
227        return regExp.test(phoneNumber);
228    }
229
230    const handleChange = (iti) => {
231        let fullNumber = iti.getNumber()
232        if (iti.isValidNumber()) {
233            fullNumber = intlTelInputUtils.formatNumber(fullNumber.replace(/\s/g, ''), null, intlTelInputUtils.numberFormat.NATIONAL)
234            fullNumber = fullNumber.replace(/\s/g, '');
235        } else {
236            if (fullNumber.slice(0, 2) === "00") {
237                fullNumber = "+";
238            } else if (fullNumber.length > 25) {
239                fullNumber = fullNumber.slice(0, 24);
240            } else if (!hasOnlyDigitsAndPlus(fullNumber)) {
241                fullNumber = fullNumber.replace(/[^\+?\d+$]/g, '');
242            }
243        }
244        iti.setNumber(fullNumber);
245    };
246
247    const validate = (fc) => {
248        if (fc) {
249            let areValid = true;
250            const phoneTelInput = fc.querySelector(".intlTelPhone");
251            const iti = window.intlTelInputGlobals.getInstance(phoneTelInput);
252            if (iti.getValidationError() !== 0) {
253                setErrorDisplay(fc);
254                areValid = false;
255            } else {
256                fc.querySelector(".phone__errors").classList.add("hidden");
257            }
258            return areValid;
259        } else {
260            return false;
261        }
262    }
263
264    const setErrorDisplay = (fc) => {
265        fc.querySelector(".intlTelPhone").classList.add("invalidInput");
266        fc.querySelector(".phone__errors").classList.remove("hidden");
267    }
268
269    const getValue = (fc) => {
270        const iti = window.intlTelInputGlobals.getInstance(fc.querySelector(".intlTelPhone"));
271
272        return {
273            'phone': fc.querySelector(".intlTelPhone").value,
274            'country': iti.getSelectedCountryData().iso2,
275            'type': iti.getNumberType(),
276        };
277    }
278
279    return {
280        initialize: initialize,
281        validate: validate,
282        getValue: getValue,
283        setErrorDisplay: setErrorDisplay,
284    }
285})();
286
287// Initialize phone lib
288window.addEventListener('load', () => FC_Phone.initialize());
289
290const FC_Address = (() => {
291    const fcs = document.querySelectorAll(".formComponent.address");
292    const delayedInputTiming = 200;
293    const regex = /^\s*(?:(?<number>\d+[a-zA-Z]{0,3})(?:\s+|\s*,)\s*)?(?<street>[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u024F0-9\.'’‘\(\)\/\-\+`\s]+?)(?:(?:(?:\s+,)|(?:,\s+)|(?:\s+,\s+)|,|\s+)(?<number
293End>\d+\s*[a-zA-Z]{0,3})?)?\s*$/iumg;
294
295    let timeoutId;
296    let suggestedAddresses = [];
297    let selectedAddress;
298    let validatedAddress = null;
299    let lastStreetResearch;
300    // Salesforce AddressComplement2__c accepts at most 50 characters (createAccount_V3 errorCode 888).
301    const ADDRESS_COMPLEMENT_MAX_LENGTH = 50;
302
303    const initialize = () => {
304        const datalist = document.createElement('datalist');
305        datalist.id = "FC_streetList";
306        if (fcs.length > 0) {
307            fcs[0].appendChild(datalist);
308
309            fcs.forEach(fc => {
310                // We first have to check if input is set. Indeed, in case of account with missing email address or phone
311                // number, address field is displayed, but not with an input field, as it's just displayed.
312                if (fc.querySelector("input.streetInput")) {
313                    fc.querySelector("input.streetInput").addEventListener('keyup', e => FC_Address.stackedDelayedKeyup(fc, e));
314                    fc.querySelector("input.streetInput").addEventListener('input', e => {
315                        clearErrors(fc);
316                        const suggestedStreetsDatalist = document.querySelector("datalist#FC_streetList");
317                        const selectedOption = [...suggestedStreetsDatalist.options].find(option => option.value === e.target.value);
318                        if (selectedOption) {
319                            e.preventDefault();
320                            selectedAddress = suggestedAddresses[selectedOption.value];
321                            if (selectedAddress) {
322                                fc.querySelector("input.zipInput").value = fc.querySelector("input.zipInput").value != selectedAddress.zip ? '' : selectedAddress.zip;
323                                e.target.value = selectedAddress.street;
324                                fc.querySelector("input.localityInput").value = selectedAddress.locality;
325                                if (selectedAddress.houseNumber) {
326                                    e.target.value += ' ' + selectedAddress.houseNumber;
327                                    fc.querySelector("input.zipInput").value = selectedAddress.zip;
328                                }
329
330                                setTimeout(() => {
331                                    e.target.selectionStart = e.target.value.length;
332                                    e.target.selectionEnd = e.target.value.length;
333                                });
334                            }
335                        }
336                    });
337
338                    const addressComplementInput = fc.querySelector("input.addressComplementInput");
339                    if (addressComplementInput) {
340                        let tip = tippy(addressComplementInput, {
341                            content: addressComplementInput.dataset.tooltip,
342                            theme: 'tcs',
343                            duration: [200, 200]
344                        });
345                        addressComplementInput.addEventListener('click', () => {
346                            setTimeout(() => tip.show(), 0);
347                        })
348                    }
349                }
350            });
351        }
352    }
353
354    const validate = async (fc) => {
355        try {
356            if (fc.querySelector("input.streetInput")) {
357                const streetInput = fc.querySelector("input.streetInput");
358                const zipInput = fc.querySelector("input.zipInput");
359                const localityInput = fc.querySelector("input.localityInput");
360                const countryCodeInput = fc.querySelector("input.countryCodeInput");
361                const streetInputError = fc.querySelector(".address__streetInput__error");
362                streetInputError.classList.add("hidden");
363                clearErrors(fc);
364
365                // Reject an address complement that exceeds the length Salesforce accepts, with a visible error.
366                const addressComplementInput = fc.querySelector("input.addressComplementInput");
367                if (addressComplementInput && addressComplementInput.value.length > ADDRESS_COMPLEMENT_MAX_LENGTH) {
368                    addressComplementError(fc);
369                    return false;
370                }
371
372                // If all inputs are set
373                if (streetInput.value && zipInput.value && localityInput.value) {
374                    // If both street name and house number aren't defined, we reject.
375                    if (splitAddressLine(streetInput.value)['houseNumber'] !== '') {
376                        const response = await fetch(`/backend/api/isValidAddress`, {
377                            method: "POST",
378                            headers: {
379                                "Content-Type": "application/x-www-form-urlencoded",
380                            },
381                            body: buildFormDatas(fc).toString(),
382                        });
383
384                        if (!response.ok) {
385                            // If response is not okay, we have to check if the address without the house number is valid
386                            if (response.status === 424) {
387                                unknownHouseNumberError(fc);
388                                return false;
389                            }
390
391                            // Check if location is typed correctly
392                            const validLocality = await localityIsValidForPostalCode(fc, zipInput.value, localityInput.value);
393                            if (validLocality) {
394                                // If we have found a matching locality but not typed exactly as expected,
395                                // we relaunch the process as the address might be valid with newly found locality
396                                if (localityInput.value.trim() != validLocality.locality) {
397                                    localityInput.value = validLocality.locality;
398                                    return validate(fc);
399                                } else {
400                                    localityInput.value = validLocality.locality;
401                                    await searchAddressWithBotenfile(fc);
402                                    return false;
403                                }
404                            } else {
405                                await searchLocalityWithBotenfile(fc);
406                                return false;
407                            }
408                        }
409
410                        validatedAddress = await response.json();
411                        // We set inputs values with data validated and corrected from typo of Api
412                        setAddress(fc, validatedAddress[0]);
413                        return true;
414                    } else {
415                        error(fc);
416                        streetInputError.classList.remove("hidden");
417                    }
418                } else {
419                    error(fc);
420                }
421            } else {
422                return true;
423            }
424        } catch (errorMessage) {
425            await searchAddressWithBotenfile(fc);
426            console.error(errorMessage);
427            error(fc);
428        }
429        return false;
430    };
431
432    const buildFormDatas = fc => {
433        const formData = new URLSearchParams();
434        formData.append("streetAndHouseNumber", fc.querySelector("input.streetInput").value);
435        formData.append("zip", fc.querySelector("input.zipInput").value);
436        formData.append("locality", fc.querySelector("input.localityInput").value);
437        formData.append("countryCode", fc.querySelector("input.countryCodeInput").value);
438        return formData;
439    }
440
441    const setAddress = (fc, validatedAddress) => {
442        fc.querySelector("input.streetInput").value = validatedAddress.street + " " + validatedAddress.houseNumber;
443        fc.querySelector("input.zipInput").value = validatedAddress.zip;
444        fc.querySelector("input.localityInput").value = validatedAddress.locality;
445        fc.querySelector("input.countryCodeInput").value = validatedAddress.countryCode;
446    }
447
448    async function searchAddressWithBotenfile(fc) {
449        try {
450            const addressError = fc.querySelector(".address__error");
451            addressError.classList.add("hidden");
452
453            const response = await fetch(`/global/wGlobal/scripts/php/ecommerce/process2020/personalData/addressVerification.php`, {
454                method: "POST",
455                headers: {
456                    "Content-Type": "application/x-www-form-urlencoded",
457                },
458                body: buildFormDatas(fc).toString(),
459            });
460
461            if (!response.ok) {
462                addressError.classList.remove("hidden");
463                error(fc);
464                return;
465            }
466
467            const data = await response.json();
468            const nameListComponent = fc.querySelector(".streetBotenfileSuggestionsComponent");
469            const nameList = fc.querySelector(".streetBotenfileSuggestions");
470            const streetInput = fc.querySelector("input.streetInput");
471
472            if (data[0] && data[0] === 'ok') {
473                clearErrors(fc);
474            } else {
475                if (data.length > 0) {
476                    nameListComponent.classList.remove("hidden");
477                    streetInput.classList.add("invalidInput");
478
479                    nameList.innerHTML = ""; // Clear existing suggestions
480
481                    for (let i = 0; i < Math.min(data.length, 5); i++) {
482                        const name = data[i].name;
483                        const nameElement = document.createElement("div");
484                        nameElement.textContent = name;
485                        nameElement.classList.add("clickableStreetSuggestion");
486
487                        nameElement.addEventListener("click", () => {
488                            clearErrors(fc);
489                            streetInput.value = name;
490                            nameListComponent.classList.add("hidden");
491                        });
492
493                        nameList.appendChild(nameElement);
494                    }
495                } else {
496                    streetInput.classList.remove("invalidInput");
497                    nameListComponent.classList.add("hidden");
498                }
499            }
500        } catch (errorMessage) {
501            console.log(errorMessage);
502        }
503    }
504
505    async function searchLocalityWithBotenfile(fc) {
506        try {
507            const addressError = fc.querySelector(".address__error");
508            addressError.classList.add("hidden");
509
510            const formData = new URLSearchParams();
511            formData.append("zip", fc.querySelector("input.zipInput").value);
512            formData.append("locality", fc.querySelector("input.localityInput").value);
513
514            const response = await fetch(`/global/wGlobal/scripts/php/ecommerce/process2020/personalData/localityVerification.php`, {
515                method: "POST",
516                headers: {
517                    "Content-Type": "application/x-www-form-urlencoded",
518                },
519                body: formData.toString(),
520            });
521
522            if (!response.ok) {
523                addressError.classList.remove("hidden");
524                error(fc);
525                return;
526            }
527
528            const data = await response.json();
529            const localityListComponent = fc.querySelector(".localityBotenfileSuggestionsComponent");
530            const localityList = fc.querySelector(".localityBotenfileSuggestions");
531            const localityInput = fc.querySelector("input.localityInput");
532
533            if (data[0] && data[0] === 'ok') {
534                clearErrors(fc);
535            } else {
536                if (data.length > 0) {
537                    // Two scenarios here: Either data confidence percent > 90%, so we have a okay match to display directly
538                    if (data[0].percent >= 90) {
539                        localityInput.value = data[0].locality;
540                    } else {
541                        // Or we display a clickable list of suggested locality
542                        localityInput.classList.add("invalidInput");
543                        localityListComponent.classList.remove("hidden");
544
545                        localityList.innerHTML = ""; // Clear existing suggestions
546
547                        for (let i = 0; i < Math.min(data.length, 5); i++) {
548                            const locality = data[i].locality;
549                            const localityElement = document.createElement("div");
550                            localityElement.textContent = locality;
551                            localityElement.classList.add("clickableLocalitySuggestion");
552
553                            localityElement.addEventListener("click", () => {
554                                clearErrors(fc);
555                                localityInput.value = locality;
556                                localityListComponent.classList.add("hidden");
557                            });
558
559                            localityList.appendChild(localityElement);
560                        }
561                    }
562                } else {
563                    localityInput.classList.remove("invalidInput");
564                    localityListComponent.classList.add("hidden");
565                }
566            }
567        } catch (errorMessage) {
568            console.log(errorMessage);
569        }
570    }
571
572    const error = (fc) => {
573        validatedAddress = null;
574        if (fc.querySelector("input.streetInput")) {
575            fc.querySelector("input.streetInput").classList.add("invalidInput");
576            fc.querySelector("input.zipInput").classList.add("invalidInput");
577            fc.querySelector("input.localityInput").classList.add("invalidInput");
578        }
579    }
580
581    const addressComplementError = (fc) => {
582        const input = fc.querySelector("input.addressComplementInput");
583        const errorBox = fc.querySelector("div.addressComplement__error");
584        if (input) {
585            input.classList.add("invalidInput");
586        }
587        if (errorBox) {
588            errorBox.classList.remove("hidden");
589        }
590    }
591
592    const clearErrors = (fc) => {
593        fc.querySelector("input.streetInput").classList.remove("invalidInput");
594        fc.querySelector("input.zipInput").classList.remove("invalidInput");
595        fc.querySelector("input.localityInput").classList.remove("invalidInput");
596        fc.querySelector("div.address__streetInput__error").classList.add("hidden");
597        fc.querySelector("div.address__houseNumber__error").classList.add("hidden");
598        fc.querySelector("div.address__error").classList.add("hidden");
599        fc.querySelector("div.streetBotenfileSuggestionsComponent").classList.add("hidden");
600        const addressComplementInput = fc.querySelector("input.addressComplementInput");
601        if (addressComplementInput) {
602            addressComplementInput.classList.remove("invalidInput");
603        }
604        const addressComplementErrorBox = fc.querySelector("div.addressComplement__error");
605        if (addressComplementErrorBox) {
606            addressComplementErrorBox.classList.add("hidden");
607        }
608    }
609
610    const unknownHouseNumberError = (fc) => {
611        fc.querySelector("input.streetInput").classList.add("invalidInput");
612        fc.querySelector("div.address__houseNumber__error").classList.remove("hidden");
613    }
614
615    const stackedDelayedKeyup = (fc, event) => {
616        // Clear the previous timeout, if any
617        clearTimeout(timeoutId);
618
619        // Set a new timeout of 400ms
620        timeoutId = setTimeout(function () {
621            // Call your function here
622            updateStreetDatalist(fc, event.target.value);
623        }, delayedInputTiming);
624    }
625
626    const updateStreetDatalist = (fc, inputValue) => {
627        if (inputValue) {
628            // We have to check if address line includes street number
629            const searchedSplittedAddress = splitAddressLine(inputValue);
630            if (inputValue != lastStreetResearch && searchedSplittedAddress["houseNumber"] && searchedSplittedAddress["streetName"]) {
631                searchForStreet(inputValue).then(() => {
632                    const valuesList = document.querySelector("datalist#FC_streetList");
633                    valuesList.innerHTML = ""; // clear existing suggestions
634
635                    // To know if we have to manually reinject the number
636                    const splitedAddressLine = splitAddressLine(inputValue);
637
638                    suggestedAddresses.forEach((address, index) => {
639                        const option = document.createElement("option");
640                        option.value = index;
641                        address.houseNumber = splitedAddressLine.houseNumber;
642                        option.innerHTML = formatedAddress(fc, address);
643                        valuesList.appendChild(option);
644                    });
645                });
646            }
647        }
648        lastStreetResearch = inputValue;
649    }
650
651    const formatedAddress = (fc, address) => {
652        const startWithHouseNumber = inputStartWithHouseNumber(fc.querySelector("input.streetInput").value);
653
654        const addressLine = startWithHouseNumber
655            ? `${address.houseNumber} ${address.street}`
656            : `${address.street} ${address.houseNumber}`;
657
658        return `${addressLine}, ${address.zip} ${address.locality} ${address.canton}`;
659    };
660
661    const inputStartWithHouseNumber = (addressLine) => {
662        regex.lastIndex = 0; // Reset lastIndex before calling exec
663        const match = regex.exec(addressLine);
664
665        return !!(match && match.groups && match.groups.street && match.groups.number);
666    };
667
668    const splitAddressLine = (addressLine) => {
669        // This is the regular expression that matches two different patterns:
670        // 1. A house number at the beginning of the address line (capturing the house number and street name)
671        // 2. A house number at the end of the address line (capturing the street name and house number)
672        regex.lastIndex = 0; // Reset lastIndex before calling exec
673        const match = regex.exec(addressLine);
674
675        var splittedAddress = {
676            'houseNumber': '',
677            'streetName': addressLine
678        };
679
680        // If a match is found
681        if (match && match.groups.street) {
682            splittedAddress['streetName'] = match.groups.street;
683            if (match.groups.number) {
684                splittedAddress['houseNumber'] = match.groups.number;
685            } else if (match.groups.numberEnd) {
686                splittedAddress['houseNumber'] = match.groups.numberEnd;
687            }
688        }
689
690        return splittedAddress;
691    }
692
693    const searchForStreet = async (inputValue) => {
694        try {
695            const response = await fetch(`/backend/api/searchForAddress/${encodeURIComponent(inputValue)}`, {
696                method: "GET",
697                headers: {
698                    "Content-Type": "application/json",
699                },
700            });
701            const data = await response.json();
702            suggestedAddresses = data;
703            return data;
704        } catch (error) {
705            suggestedAddresses = [];
706            return [];
707        }
708    };
709
710    const localityIsValidForPostalCode = async (fc, zip, locality) => {
711        try {
712            const response = await fetch(`/backend/api/isValidLocality/${encodeURIComponent(zip)}/${encodeURIComponent(locality)}`, {
713                method: "GET",
714                headers: {
715                    "Content-Type": "application/json",
716                },
717            });
718            if (!response.ok) {
719                suggestedLocality = [];
720                return false;
721            }
722            const data = await response.json();
723            return data[0];
724        } catch (error) {
725            return false;
726        }
727    };
728
729    return {
730        initialize: initialize,
731        updateStreetDatalist: updateStreetDatalist,
732        stackedDelayedKeyup: stackedDelayedKeyup,
733        validate: validate
734    }
735})();
736
737// Initialize Address lib
738window.addEventListener('load', () =>  FC_Address.initialize());
739
740window.addEventListener('load', () => {
741    // Get a reference to the phone add button element
742    const phoneAddButton = document.querySelector('.testingPhoneContainer button');
743
744    if (phoneAddButton) {
745        // Add a click event listener to the phone add button
746        phoneAddButton.addEventListener('click', (e) => {
747            const formComponentPhone = document.querySelector(".formComponent.phone");
748
749            // If the phone number is valid, proceed
750            if (FC_Phone.validate(formComponentPhone)) {
751                phoneAddButton.disabled = true;
752
753                // Add the loading class to the phone add button
754                phoneAddButton.classList.add('testingPhoneGroup__buttonLoading');
755
756                const  { phone, country, type } = FC_Phone.getValue(formComponentPhone);
757
758                // Send a fetch request to the updatePhoneNumber.php script
759                fetch('/global/wGlobal/scripts/php/ecommerce/process2020/confirmation/updatePhoneNumber.php', {
760                    method: 'POST',
761                    headers: {'Content-Type': 'application/json'},
762                    body: JSON.stringify({
763                        intlTelPhone: phone,
764                        intlTelCountry: country,
765                        intlTelType: type,
766                    })
767                }).then(response => {
768                    // If the response is OK, return the response data as JSON
769                    return response.json();
770                }).then(data => {
771                    // Handle success or error
772                    const phoneAndButton = document.querySelector(".testingPhoneContainer .testingPhoneGroup");
773                    const feedback = document.querySelector(".testingPhoneContainer .testingGroupFeedback");
774
775                    if (data.status === 'success') {
776                        phoneAndButton.classList.add('formComponent__fadeout');
777                        setTimeout(() => {
778                            phoneAndButton.remove();
779                            feedback.innerHTML = data.message;
780                            feedback.classList.remove('formComponent__error');
781                            feedback.classList.remove("formComponent__fadeout");
782                        }, 300);
783                    } else {
784                        setTimeout(() => {
785                            feedback.innerHTML = data.message;
786                            feedback.classList.add('formComponent__error');
787                            feedback.classList.remove("formComponent__fadeout");
788                        }, 300);
789                    }
790                }).finally(() => {
791                    // Remove the loading class from the button after the request is completed
792                    phoneAddButton.classList.remove('testingPhoneGroup__buttonLoading');
793                    phoneAddButton.disabled = false;
794                });
795            }
796        });
797    }
798});
799
800wCssClassesToAddGlobal = {'body' : ['wglAddScrollTop'], '.clickable' : ['wglClickable'], '.listEntryClickable, .listEntryInnerClickable' : ['listEntryClickableJS'], '.listDefaultCols_var2' : ['wglAdjustHeightMax'], '.listDefaultCols_var3' : ['wglAdjustHeightMax'], '.listDefaultCols_var4' : ['wglAdjustHeightMax'], '#_blockMainOuter' : ['nextToSidebar', 'moveWithSidebar'], '.searchTerm' : ['wglSearchSuggest']};
801wCssDataToAddGlobal = {'.elementBoxParallaxBackgroundSpeed_var10' : ['parallaxbackgroundspeed=2'], '.elementBoxParallaxBackgroundSpeed_var0' : ['parallaxbackgroundspeed=1'], '.elementBoxParallaxBackgroundSpeed_var50' : ['parallaxbackgroundspeed=0.5'], '.elementBoxParallaxBackgroundSpeed_var90' : ['parallaxbackgroundspeed=0.1'], '.elementBoxParallaxContentSpeed_var10' : ['parallaxcontentspeed=2'], '.elementBoxParallaxContentSpeed_var0' : ['parallaxcontentspeed=1'], '.elementBoxParallaxContentSpeed_var50' : ['parallaxcontentspeed=0.5'], '.elementBoxParallaxContentSpeed_var90' : ['parallaxcontentspeed=0.1'], '.elementNavigationSections_var0 a' : ['scrollsmoothtotargetduration=400']};
802wCssEventsToAddGlobal = {'.elementNavigationSections_var0 a' : ['onclick=wScrollSmoothToTarget'], '.elementNavigationSections_var30 a' : ['onclick=wScrollSmoothToTarget']};
803wCssDOM = {'.listDefaultDate_var20 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent()'}, '.listDefaultDate_var24 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent()'}, '.listDefaultDate_var30 .listEntryDate' : {'action' : 'insertafter', 'path' : 'parent()'}, '.listDefaultDate_var32 .listEntryDate' : {'action' : 'insertafter', 'path' : 'parent()'}, '.listDefaultDate_var70 .listEntryDate' : {'action' : 'insertafter', 'path' : 'parent()'}, '.listDefaultDate_var80 .listEntryDate' : {'action' : 'prependto', 'path' : 'parent().parent().parent()'}};
804wCssJQuery = {'.listDefaultDate_var40 .listEntryDate' : {'jQuery' : 'jQuery(this).prependTo(jQuery(this).parent().parent().find(\'.listEntryDescription\'))', 'event' : 'document.ready'}, '.listDefaultDate_var80 .listEntryDate' : {'jQuery' : 'jQuery(this).html(\'<span>\' + jQuery(this).html().replace(/ .*/, \'\') + \'</span><span>\' + jQuery(this).html().replace(/.* /, \'\').replace(/&.*/, \'\') + \'</span>\')', 'event' : 'document.ready'}, '.listDefaultLink_var10 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).appendTo(jQuery(this).parent().parent().find(\'.listEntryDescription\'))', 'event' : 'document.ready'}, '.listDefaultLink_var23 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var26 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).insertBefore(jQuery(this).parent().find(\'.listEntryTitle\')).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var27 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var37 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.listDefaultLink_var39 .listEntryMoreOnly' : {'jQuery' : 'jQuery(this).wrap(\'<div class="listEntryMoreOnlyOuter"/>\')', 'event' : 'document.ready'}, '.elementNavigationSections_var0 li' : {'jQuery' : 'jQuery(this).on(\'click\', function(){jQuery(this).parent().parent().prev().trigger(\'click\')})', 'event' : 'document.ready'}, '.elementNavigationSections_var0 .navigationSectionToggler' : {'jQuery' : 'jQuery(this).on(\'click\', function(){jQuery(this).toggleClass(\'open\').next().animate({\'height\' : \'toggle\'}, function(){if(jQuery(this).css(\'display\') == \'block\'){jQuery(this).addClass(\'open\').removeAttr(\'style\')}else{jQuery(this).removeClass(\'open\').removeAttr(\'style\')}})})', 'event' : 'document.ready'}, '#_blockMainOuter' : {'jQuery' : 'jQuery("#blockMainOuter").before(\'<div id="navigationSidebar" class="navigationSidebarClosed"/>\')', 'event' : 'document.ready'}};
805wMediaqueriesToAddGlobal = {'max1600' : {}, 'max1350' : {}, 'max1280' : {}, 'max1024' : {}, 'max983' : {}, 'max768' : {}, 'min769' : {}, 'max550' : {}, 'max540' : {}, 'min541' : {}, 'max480' : {}, 'min481' : {}};
806/*
807 * ONFLOW/FAG: Specific changes made, do not overwrite.
808 *
809////////////////////////////////////////////////////////////////
810//
811// UI JavaScript Funktionen
812//
813// Weblication CMS
814// erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de
815// erstellt mit Weblication Content Management System, www.weblication.de
816//
817////////////////////////////////////////////////////////////////
818//                                                            //
819//                   BITTE NICHT ANPASSEN!                    //
820//           JS-Anpassungen können in der design.js           //
821//                    durchgeführt werden.                    //
822//                                                            //
823////////////////////////////////////////////////////////////////
824*/
825
826wUiVersion='1.0.12';wAllowMinimize=true;wUiTmp={};var scriptTags=document.getElementsByTagName('script');try{wUiTmp['wGlobalProjectPath']='/global';}catch(e){}devicePixelRatio=window.devicePixelRatio||1;hdLimitDpr=2;if(document.documentElement){document.documentElement.className=document.documentElement.className + (!/MSIE (6|7|8)/.test(navigator.appVersion)?' pagestatus-uiloaded':'');}function weblicationLoad(){for(var wCssJQueryEntry in wCssJQuery){jQuery(wCssJQueryEntry).each(function(index){if(wCssJQuery[wCssJQueryEntry]['event']&&wCssJQuery[wCssJQueryEntry]['event']=='window.load'){eval(wCssJQuery[wCssJQueryEntry]['jQuery']);}});}jQuery("img[data-srchover]").each(function(){var thisElement=jQuery(this);var hoverTriggerElement=thisElement;var hoverTriggerPath=thisElement.data('hovertrigger');if(hoverTriggerPath){eval('hoverTriggerElement=hoverTriggerElement.' + hoverTriggerPath);}hoverTriggerElement.on('mouseover', function (event){thisElement.data('srcbeforehover', thisElement.attr('src'));if(thisElement.data('ishd')=='1'){thisElement.attr('src', thisElement.data('srchover2x'));}else{thisElement.attr('src', thisElement.data('srchover'));}});hoverTriggerElement.on('mouseout', function (event){thisElement.attr('src', thisElement.data('srcbeforehover'));});});window.setTimeout(function(){var jQueryHashId=location.hash;if(jQueryHashId!=''&&jQueryHashId.indexOf('#anchor')==0){var anchor=jQuery(jQueryHashId.replace(/\./, '\\.'));if(anchor.length > 0&&jQuery('.wglContainerInsideTopOnScroll').length > 0){var offsetTopAnchor=(anchor.offset())['top'];var windowScrollTop=jQuery(window).scrollTop();var heightInsideTop=jQuery('.wglContainerInsideTopOnScroll').height();if(offsetTopAnchor < windowScrollTop + heightInsideTop){offsetTopAnchor=offsetTopAnchor-heightInsideTop;jQuery('body, html').animate({scrollTop:offsetTopAnchor});}}}}, 120);}function weblicationLoad2(){if(document.documentElement&&!/MSIE (6|7|8)/.test(navigator.appVersion)){window.setTimeout(function(){document.documentElement.className=document.documentElement.className + ' pagestatus-loaded';}, 1000);}jQuery('.wglMagnifier').wMagnifier();jQuery('.wglOverflowXTouch').each(function(index){var currentElement=jQuery(this);var widthOuter=currentElement.width();var widthInner=currentElement.children('*').outerWidth();if(!currentElement.is(":visible")){return false;}else if(widthInner <=widthOuter){return false;}else{var lastElementInner=currentElement.children('*').children('*:last');var offsetRightLastElementInner=lastElementInner.get(0).offsetLeft + lastElementInner.outerWidth() + parseInt(lastElementInner.css('margin-right'));currentElement.children('*').children('*').each(function(index){jQuery(this).css('width', jQuery(this).width());});lastElementInner.parent().css({'width':String(offsetRightLastElementInner) + 'px'})
827}jQuery(this).find('img').attr('unselectable', 'on');jQuery('body').on('touchstart mousedown', function(event){if(jQuery(event.target).closest(currentElement).length!=0){event.preventDefault();}});jQuery('body').on("touchmove mousemove", function(event){if(jQuery('body').data('wtouchelement')){var mouseXDiff=(event.originalEvent.touches?event.originalEvent.touches[0].pageX:event.pageX)-jQuery('body').data('wtouchmousex');var mouseYDiff=(event.originalEvent.touches?event.originalEvent.touches[0].pageY:event.pageY)-jQuery('body').data('wtouchmousey');jQuery('body').data('wtouchmousex', event.originalEvent.touches?event.originalEvent.touches[0].pageX:event.pageX);jQuery('body').data('wtouchmousey', event.originalEvent.touches?event.originalEvent.touches[0].pageY:event.pageY);
827jQuery('body').data('wtouchlastdiffx', mouseXDiff);jQuery('body').data('wtouchlastdiffy', mouseYDiff);var milliseconds=(new Date()).getTime();var timeDiff=milliseconds-jQuery('body').data('timestamplast');jQuery('body').data('timestampbefore', jQuery('body').data('timestamplast'));jQuery('body').data('timestamplast', milliseconds);var speedX=Math.round(100 * (mouseXDiff > 0?mouseXDiff:-mouseXDiff) / timeDiff) + 1;jQuery('body').data('wtouchspeedX', speedX);var touchDiffX=jQuery('body').data('wtouchmousex')-jQuery('body').data('wtouchstartmousex');jQuery('body').data('wtouchdiffx', touchDiffX);var widthOuter=parseInt(jQuery('body').data('wtouchelement').width());var left=parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left'));left=isNaN(left)?0:left;var right=parseInt(jQuery('body').data('wtouchelement').width())-parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left'))-jQuery('body').data('wtouchelement').children('*').width();right=isNaN(right)?0:right;if(left > 32){jQuery('body').data('wtouchelement').children('*').animate({'margin-left':0});jQuery('body').removeData('wtouchelement');return false;}else if(right > 32){jQuery('body').data('wtouchelement').children('*').animate({'margin-left':String(parseInt(jQuery('body').data('wtouchelement').width())-parseInt(jQuery('body').data('wtouchelement').children('*').width())) + 'px'});jQuery('body').removeData('wtouchelement');return false;}jQuery('body').data('wtouchelement').children('*').css({'margin-left':String(jQuery('body').data('wtouchelement').data('wtouchstartmarginleft') + touchDiffX) + 'px'});}});jQuery(this).on('touchstart mousedown', function(event){jQuery(this).children('*').stop();jQuery('body').data('wtouchelement', jQuery(this));jQuery(this).data('wtouchstartmarginleft', parseInt(jQuery(this).children('*').css('margin-left')));jQuery(this).data('wtouchstartmargintop', parseInt(jQuery(this).children('*').css('margin-top')));jQuery('body').data('wtouchstartmousex', event.originalEvent.touches?event.originalEvent.touches[0].pageX:event.pageX);jQuery('body').data('wtouchstartmousey', event.originalEvent.touches?event.originalEvent.touches[0].pageY:event.pageY);});jQuery('body').on("touchend mouseup", function(event){if(jQuery('body').data('wtouchelement')){var milliseconds=(new Date()).getTime();var timeDiff=milliseconds-jQuery('body').data('timestamplast');var touchDiffX=jQuery('body').data('wtouchdiffx');var lastDiffX=jQuery('body').data('wtouchlastdiffx');var lastDiffXn=lastDiffX >=0?lastDiffX:-lastDiffX;if(lastDiffXn > 1){var speedX=(Math.round((lastDiffXn > 0?lastDiffXn:-lastDiffXn) / timeDiff) + 1) * 5;if(speedX > 200){speedX=200;}var movingWidth=Math.round(touchDiffX * 2 * (1 + speedX / 100));if(jQuery('body').data('wtouchdiffx') < 0){var right=parseInt(jQuery('body').data('wtouchelement').width())-parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left'))-jQuery('body').data('wtouchelement').children('*').width();if(movingWidth < right){movingWidth=right;}var duration=(movingWidth > 0?movingWidth:-movingWidth) * 1.5 + Math.round(100 / speedX);jQuery('body').data('wtouchelement').children('*').animate({'margin-left':'+=' + String(movingWidth)}, {'duration':duration, 'easing':'wEaseOutScroll'});}else{var left=parseInt(jQuery('body').data('wtouchelement').children('*').css('margin-left'));if(-movingWidth < left){movingWidth=-left;}var duration=(movingWidth > 0?movingWidth:-movingWidth) * 1.5 + Math.round(100 / speedX);jQuery('body').data('wtouchelement').children('*').animate({'margin-left':'+=' + String(movingWidth)}, {'duration':duration, 'easing':'wEaseOutScroll'});}}jQuery('body').removeData('wtouchelement');}});});}function weblicationLoad3(){var winScrollTop=jQuery(window).scrollTop();if(wUiTmp['lastScrollTop']){if(winScrollTop <=0){if(wUiTmp['lastScrollStatus']!='top'){document.documentElement.className=document.documentElement.className.replace(' scrolldirection-down', '').replace(' scrolldirection-up', '') + ' scrolled-top';}wUiTmp['lastScrollStatus']='top';}else if(winScrollTop < wUiTmp['lastScrollTop']){if(wUiTmp['lastScrollStatus']!='scrollup'){document.documentElement.className=document.documentElement.className.replace(' scrolled-top', '').replace(' scrolldirection-down', '') + ' scrolldirection-up';}wUiTmp['lastScrollStatus']='scrollup';}else if(winScrollTop > wUiTmp['lastScrollTop']){if(wUiTmp['lastScrollStatus']!='scrolldown'){document.documentElement.className=document.documentElement.className.replace('scrolled-top', '').replace(' scrolldirection-up', '') + ' scrolldirection-down';}wUiTmp['lastScrollStatus']='scrolldown';}}wUiTmp['lastScrollTop']=winScrollTop;var winHeight=jQuery(window).height();jQuery('img.wglLazyLoadInit').each(function(index){var currentImg=jQuery(this);var offsetTop=parseInt(currentImg.offset().top);var srcMin=currentImg.data('srcmin')?currentImg.data('srcmin'):'';var widthCurrent=parseInt(currentImg.width());var attrWidthCur=parseInt(typeof(currentImg.attr('width'))!='undefined'?currentImg.attr('width'):0);var widthMin=parseInt(srcMin.replace(/.*@min/, '').replace(/\..*/, ''));var isVisibleComponent=true;if(currentImg.attr('data-maxwidthifinvisible')&&currentImg.attr('data-maxwidthifinvisible') > widthCurrent){widthCurrent=currentImg.attr('data-maxwidthifinvisible');}if(!currentImg.is(':visible')){isVisibleComponent=false;closestElement=currentImg.closest('.elementList');
827if(closestElement.length > 0&&closestElement.is(':visible')){if(closestElement.offset().top < winScrollTop + winHeight){isVisibleComponent=true;}}}if(isVisibleComponent||wUiTmp['isMediaPrint']||wUiTmp['isViewmodePrint']){if((offsetTop < winScrollTop + winHeight )||wUiTmp['isMediaPrint']||wUiTmp['isViewmodePrint']){if(devicePixelRatio >=hdLimitDpr&&typeof(currentImg.attr('data-src2x'))!='undefined'&&currentImg.attr('data-src2x')!=''&&attrWidthCur < widthCurrent * 2&&currentImg.attr('data-ishd')!='1'){currentImg.attr('src', currentImg.data('src2x'));currentImg.attr('data-ishd', '1');}else if(typeof(currentImg.attr('data-srcmin'))!='undefined'&&currentImg.attr('data-srcmin')!=''&&widthCurrent < widthMin&&widthMin < attrWidthCur&&currentImg.attr('data-ismin')!='1'&&currentImg.attr('data-ishd')!='1'&&currentImg.attr('data-isld')!='1'){currentImg.attr('src', currentImg.data('srcmin'));currentImg.attr('data-ismin', '1');}else if(typeof(currentImg.attr('data-src'))!='undefined'&&currentImg.attr('data-src')!=''&&currentImg.attr('data-ishd')!='1'&&currentImg.attr('data-isld')!='1'){if(currentImg.data('src').indexOf('@px')!=-1){try{if(currentImg.get(0).getBoundingClientRect()['width']-widthCurrent==-0.5){currentImg.get(0).style.width='calc(100% + 0.5px)';currentImg.get(0).style.maxWidth='calc(100% + 0.5px)';}}catch(e){console.log(e)}currentImg.attr('src', currentImg.data('src').replace('@px', '@' + (devicePixelRatio >=hdLimitDpr?widthCurrent * 2:widthCurrent) + 'px'));}else{currentImg.attr('src', currentImg.data('src'));currentImg.attr('data-isld', '1');}}if(currentImg.parent().prop('tagName')=='PICTURE'){currentImg.parent().children('source').each(function(){jQuery(this).attr('media', jQuery(this).attr('media').replace('wlazyload and ', ''));});}currentImg.removeClass('wglLazyLoadInit');}}});jQuery('.wglAnimateIfVisibleOnce').each(function(index){var currentElement=jQuery(this);var offsetTop=parseInt(currentElement.offset().top);if(offsetTop < winScrollTop + winHeight||location.href.indexOf('viewmode=print')!=-1){currentElement.addClass('wglAnimateIfVisibleOnceVisible');currentElement.removeClass('wglAnimateIfVisibleOnce');}});jQuery('.wglAnimateIfVisible').each(function(index){var currentElement=jQuery(this);var offsetTop=parseInt(currentElement.offset().top);var offsetHeight=parseInt(currentElement.outerHeight());if((offsetTop < winScrollTop + winHeight&&offsetTop + offsetHeight > winScrollTop)||location.href.indexOf('viewmode=print')!=-1){currentElement.addClass('isVisibleOnce');currentElement.addClass('isVisible');currentElement.removeClass('isInvisible');}else{currentElement.addClass('isInvisible');currentElement.removeClass('isVisible');}});jQuery('.wglKeepInsideTopOnScroll').each(function(index){var currentElement=jQuery(this);var elementMoved=null;var offsetTop=parseInt(currentElement.offset().top);var diffTop=offsetTop-winScrollTop;var moveID='';if(diffTop < 0){if(currentElement.attr('data-hasmoved')!='1'){if(!jQuery('.wglContainerInsideTopOnScroll').length){jQuery('body').prepend('<div class="wglContainerInsideTopOnScroll"></div>');}currentElement.attr('data-hasmoved', '1');moveID=String(parseInt(Math.random() * 1000000));if(typeof(currentElement.attr('data-moveidsource'))=='undefined'){currentElement.attr('data-moveidsource', moveID);}else{moveID=currentElement.attr('data-moveidsource');}currentElement.before('<div id="moveidsource-' + moveID + '" class="wglKeepInsideTopOnScroll" data-hasmoved="1" data-moveidsource="' + moveID + '"></div>');currentElement.removeAttr('data-moveidsource').attr('data-moveidtarget', moveID).attr('data-moveidtarget', moveID).appendTo('.wglContainerInsideTopOnScroll').addClass('moved-init').removeClass('wglKeepInsideTopOnScroll').removeClass('restored-init').removeClass('restored-ready');window.setTimeout(function(){currentElement.removeClass('moved-init').addClass('moved-ready');}, 10);height=currentElement.height();jQuery('#' + 'moveidsource-' + moveID).css('height', String(height) + 'px');}else{height=jQuery(".wglContainerInsideTopOnScroll *[data-moveidtarget='" + currentElement.attr('data-moveidsource') + "']").height();currentElement.css('height', String(height) + 'px');}}else if(currentElement.attr('data-hasmoved')=='1'){moveID=currentElement.attr('data-moveidsource');elementMoved=jQuery(".wglContainerInsideTopOnScroll *[data-moveidtarget='" + moveID + "']");currentElement.before(elementMoved.addClass('wglKeepInsideTopOnScroll').removeClass('moved-init').removeClass('moved-ready').addClass('restored-init').removeAttr('data-hasmoved'));window.setTimeout(function(){if(currentElement.html()==''){currentElement.remove();}elementMoved.removeClass('restored-init').addClass('restored-ready');}, 10);}});var idTopSection='', titleSection='', currentElement, nearestPositionTop=100000, elementPositionTop=0;var offsetTopFixed=jQuery('.wglContainerInsideTopOnScroll').outerHeight();jQuery('.elementSection').each(function(index){currentElement=jQuery(this);elementPositionTop=parseInt(currentElement.offset().top)-winScrollTop-offsetTopFixed;if(elementPositionTop < winHeight-128&&(elementPositionTop >=0&&elementPositionTop < nearestPositionTop||elementPositionTop < 0&&elementPositionTop *-1 < nearestPositionTop)){nearestPositionTop=(elementPositionTop > 0?elementPositionTop:-elementPositionTop);titleSection=currentElement.attr('id');}});if(titleSection!=''&&titleSection!=wUiTmp['lastSectionSelected']){jQuery(".elementNavigationSections li").removeClass('selected');jQuery(".elementNavigationSections li > a[href='#" + titleSection + "']").parent().addClass('selected');wUiTmp['lastSectionSelected']=titleSection;}}function weblicationLoad4(){wOptimizePictureSizes();var hasChangedMediaQuery=false;jQuery('#wMediaqueriesTmp >
827 div').each(function(index){if(window.getComputedStyle){var computedStyle=window.getComputedStyle(jQuery(this).get(0));var fontFamily=computedStyle.fontFamily.replace(/"/g, '');var lastMediaQuery=jQuery(this).data('lastmediaquery')||'';if(fontFamily!=lastMediaQuery){if(fontFamily.indexOf('mediaquery_')==0){eval('if(typeof(' + fontFamily + '_onactivate)==\'function\'){' + fontFamily + '_onactivate();}');}else if(lastMediaQuery.indexOf('mediaquery_')==0){eval('if(typeof(' + lastMediaQuery + '_ondeactivate)==\'function\'){' + lastMediaQuery + '_ondeactivate();}');}jQuery(this).data('lastmediaquery', fontFamily);hasChangedMediaQuery=true;}}});if(hasChangedMediaQuery){jQuery("img[data-srcmin]").each(function(){var currentImg=jQuery(this);var widthOrig=parseInt(typeof(currentImg.attr('widthorig'))!='undefined'?currentImg.attr('data-widthorig'):currentImg.attr('width'));var srcMin=currentImg.data('srcmin')?currentImg.data('srcmin'):'';var widthCurrent=parseInt(currentImg.width());var attrWidthCur=parseInt(typeof(currentImg.attr('width'))!='undefined'?currentImg.attr('width'):0);var widthMin=parseInt(srcMin.replace(/.*@min/, '').replace(/\..*/, ''));var widthOuter=parseInt(currentImg.parent().width());var diffWidthFrame=0;if(currentImg.parent().parent().parent().parent().hasClass('picture')){diffWidthFrame=currentImg.parent().parent().parent().parent().outerWidth()-widthCurrent;}else if(currentImg.parent().parent().hasClass('picture')){diffWidthFrame=currentImg.parent().parent().outerWidth()-widthCurrent;}if(widthCurrent > widthOrig&&widthOuter > widthOrig + diffWidthFrame + 1&&widthMin > widthOrig){currentImg.attr('src', srcMin);if(typeof(currentImg.attr('width'))!='undefined'&&currentImg.attr('width')!=''){currentImg.attr('data-widthorig', currentImg.attr('width'));currentImg.removeAttr('width');currentImg.attr('height', 'auto');}}});}jQuery('.wglExpandToHeighestChild').each(function(index){var currentElement=jQuery(this);var maxHeight=0;currentElement.children('*').each(function(index){if(jQuery(this).attr('data-adjusttoheighestchild')!='no'&&jQuery(this).outerHeight(true) > maxHeight){maxHeight=jQuery(this).outerHeight(true);}});if(maxHeight > 0){currentElement.css('height', String(maxHeight) + 'px');}});jQuery('.wglCheckWidthParent').each(function(index){var currentElement=jQuery(this);var widthSelf=currentElement.attr('data-width-init')||currentElement.outerWidth();var widthParent=currentElement.parent().width();if(currentElement.parent().hasClass('isToSmall')&&!currentElement.parent().is(":visible")){currentElement.parent().removeClass('isToSmall');widthParent=currentElement.parent().width();currentElement.parent().addClass('isToSmall');}if(!currentElement.attr('data-width-init')){currentElement.attr('data-width-init', widthSelf);}if(widthParent > widthSelf){currentElement.parent().removeClass('isToSmall');}else{currentElement.parent().addClass('isToSmall');}});jQuery('.wglExpandToParent').each(function(index){var currentElement=jQuery(this);var height=currentElement.parent().height();currentElement.css('height', String(height) + 'px');});wProcessWglAdjustHeightMax();}jQuery(document).ready(function(){wCssClassesToAddGlobal=typeof(wCssClassesToAddGlobal)!='undefined'?wCssClassesToAddGlobal:{};wCssDataToAddGlobal=typeof(wCssDataToAddGlobal)!='undefined'?wCssDataToAddGlobal:{};wCssEventsToAddGlobal=typeof(wCssEventsToAddGlobal)!='undefined'?wCssEventsToAddGlobal:{};wCssJQuery=typeof(wCssJQuery)!='undefined'?wCssJQuery:{};wCssDOM=typeof(wCssDOM)!='undefined'?wCssDOM:{};wMediaqueriesToAddGlobal=typeof(wMediaqueriesToAddGlobal)!='undefined'?wMediaqueriesToAddGlobal:{};var htmlAdditionalClasses='';if(navigator.appVersion.match(/MSIE (\d+\..)/)){htmlAdditionalClasses +=' ie' + String(navigator.appVersion.match(/MSIE (\d+\..)/)[1]).replace(/\..*/, '');}if(parent!=self){if(location.href.indexOf('viewmode=blank')!=-1){htmlAdditionalClasses +=' lightbox';}}if(/mobile/i.test(navigator.userAgent)) htmlAdditionalClasses +=' mobile';if(/iPad/i.test(navigator.userAgent)) htmlAdditionalClasses +=' ipad';if(/iPhone/i.test(navigator.userAgent)) htmlAdditionalClasses +=' iphone';if(/iPod/i.test(navigator.userAgent)) htmlAdditionalClasses +=' ipod';if(/(iPod|iPhone|iPad)/i.test(navigator.userAgent)){htmlAdditionalClasses +=' ios';wUiTmp['isIOS']=true;if(/CriOs/i.test(navigator.userAgent)){htmlAdditionalClasses +=' crios';}else if(/Safari/i.test(navigator.userAgent)){wUiTmp['isSafari']=true;htmlAdditionalClasses +=' saios';}}htmlAdditionalClasses +=' viewmode-' + (/viewmode=([^&]+)/.test(location.href)?RegExp.$1:'default');htmlAdditionalClasses +=(/targetPreview=embed/.test(location.href)?' wpreview':'');htmlAdditionalClasses +=(('ontouchstart' in window)||navigator.msMaxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch?' touch':' no-touch');htmlAdditionalClasses +=jQuery(window).scrollTop()==0?' scrolled-top':'';if(document.documentElement){if(document.documentElement.getAttribute('lang')){htmlAdditionalClasses +=' lang-' + document.documentElement.getAttribute('lang');}var documentElementClassName=document.documentElement.className;if(jQuery(window).scrollTop()!=0){documentElementClassName=documentElementClassName.replace(' scrolled-top', '');}documentElementClassName=(documentElementClassName.replace('no-js', '') + ' js' + htmlAdditionalClasses).replace(/^\s+/, '');if(typeof(wEditor)=='undefined'){documentElementClassName=documentElementClassName.replace('weditor', '') + ' no-weditor';}else{documentElementClassName=documentElementClassName.replace('no-weditor', '') + ' weditor';}
827documentElementClassName=documentElementClassName + (!/MSIE (6|7|8)/.test(navigator.appVersion)?' pagestatus-ready':'');if(/MSIE (6|7|8)/.test(navigator.appVersion)){documentElementClassName=documentElementClassName.replace(/pagestatus-\w+/g, '');}document.documentElement.className=documentElementClassName;}if(document.cookie.indexOf('websitezoom=l')!=-1){document.body.className=document.body.className + ' zoom-l';}for(var addClassSelector in wCssClassesToAddGlobal){jQuery(addClassSelector).each(function(index){var classesToAdd=wCssClassesToAddGlobal[addClassSelector];for(var i=0, arrayLength=classesToAdd.length; i < arrayLength; i++){var classData=classesToAdd[i].split('=');if(classData.length==2){var selector=jQuery.trim(classData[0]);if(selector=='.'){jQuery(this).addClass(jQuery.trim(classData[1]));}else if(selector=='parent'){jQuery(this).parent().addClass(jQuery.trim(classData[1]));}else{jQuery(this).find(selector).addClass(jQuery.trim(classData[1]));}}else{jQuery(this).addClass(jQuery.trim(classData[0]));}}});}for(var addDataSelector in wCssDataToAddGlobal){jQuery(addDataSelector).each(function(index){var dataToAdd=wCssDataToAddGlobal[addDataSelector];for(var i=0, arrayLength=dataToAdd.length; i < arrayLength; i++){var data=dataToAdd[i].split('=');jQuery(this).attr('data-' + jQuery.trim(data[0]), jQuery.trim(data[1]));}});}jQuery('*[data-w-addclasses]').each(function(index){var classesToAdd=jQuery(this).data('w-addclasses').split(',');jQuery(this).removeAttr('data-w-addclasses');for(var i=0, arrayLength=classesToAdd.length; i < arrayLength; i++){var classData=classesToAdd[i].split('=');var selector=jQuery.trim(classData[0]);if(selector=='.'){jQuery(this).addClass(jQuery.trim(classData[1]));}else{jQuery(this).find(selector).addClass(jQuery.trim(classData[1]));}}});for(var addEventSelector in wCssEventsToAddGlobal){jQuery(addEventSelector).each(function(index){var eventsToAdd=wCssEventsToAddGlobal[addEventSelector];for(var i=0, arrayLength=eventsToAdd.length; i < arrayLength; i++){var eventData=eventsToAdd[i].split('=');if(eventData.length==2){var eventType=jQuery.trim(eventData[0]).replace(/^on/, '');var eventFunction=jQuery.trim(eventData[1]);jQuery(this).on(eventType, (new Function('event', eventFunction + '(this, event.originalEvent);')));}}});}for(var wCssJQueryEntry in wCssJQuery){jQuery(wCssJQueryEntry).each(function(index){if(!wCssJQuery[wCssJQueryEntry]['event']||wCssJQuery[wCssJQueryEntry]['event']=='document.ready'){eval(wCssJQuery[wCssJQueryEntry]['jQuery']);}});}for(var wCssDOMEntry in wCssDOM){jQuery(wCssDOMEntry).each(function(index){domActions={'prependto':'prependTo', 'appendto':'appendTo', 'insertbefore':'insertBefore', 'insertafter':'insertAfter'};if(/^(\w+)\(/.test(wCssDOM[wCssDOMEntry]['path'])){eval('jQuery(this).' + domActions[wCssDOM[wCssDOMEntry]['action'].toLowerCase()] + '(jQuery(this).' + wCssDOM[wCssDOMEntry]['path'].replace(/\*\/$/, '') + ');');}else{if(wCssDOM[wCssDOMEntry]['action']=='prependto'){jQuery(this).prependTo(wCssDOM[wCssDOMEntry]['path']);}else if(wCssDOM[wCssDOMEntry]['action']=='appendto'){jQuery(this).appendTo(wCssDOM[wCssDOMEntry]['path']);}else if(wCssDOM[wCssDOMEntry]['action']=='insertbefore'){jQuery(this).insertBefore(wCssDOM[wCssDOMEntry]['path']);}else if(wCssDOM[wCssDOMEntry]['action']=='insertafter'){jQuery(this).insertAfter(wCssDOM[wCssDOMEntry]['path']);}}});}var mediaQueriesTmpToAdd='<div id="wMediaqueriesTmp">';for(var wMediaqueryToAddGlobal in wMediaqueriesToAddGlobal){mediaQueriesTmpToAdd +='<div id="wMediaqueryTmp_' + wMediaqueryToAddGlobal + '"/>'
828}mediaQueriesTmpToAdd +='</div>';jQuery('body').append(mediaQueriesTmpToAdd);jQuery('.wglBannerSlider').wBannerSlider();jQuery('.wglPictureGallery').wPictureGallery();jQuery('.wglTabcontainer').wTabcontainer();jQuery('.wglAccordion').wAccordion();jQuery('label').each(function(index){var nameFor=jQuery(this).attr('for');if(nameFor&&nameFor!=''){var currentForm=jQuery(this).closest('form').get(0);if(currentForm){var elementFor=currentForm.elements[nameFor];if(elementFor&&elementFor.length){elementFor=elementFor[0];}if(!elementFor){elementFor=jQuery(this).closest('form').find('#' + nameFor).get(0);}if(elementFor&&typeof(elementFor.getAttribute('placeholder'))=='string'&&(elementFor.className.indexOf('wglIsInvalid')==-1||elementFor.value=='')){if(elementFor.getAttribute('data-showlabelifhasplaceholder')!='1'&&typeof(elementFor.placeholder)!='undefined'){}}}}});wPrepareHTML();if(document.readyState=='complete'){weblicationLoad();}else{jQuery(window).on('load', function(event){weblicationLoad()
829});}jQuery(window).on('mousewheel DOMMouseScroll', function (event){jQuery('body, html').stop(true, true);});if(window.matchMedia){window.matchMedia('print').addListener(function(){wUiTmp['isMediaPrint']=true;jQuery(window).trigger('resize');});}else{window.onbeforeprint=function(event){wUiTmp['isMediaPrint']=true;jQuery(window).trigger('resize');};}if(/viewmode=print/.test(location.search)){wUiTmp['isViewmodePrint']=true;}if(document.readyState=='complete'){weblicationLoad3();jQuery(window).on('resize scroll', function(event){weblicationLoad3()
830});}else{jQuery(window).on('load resize scroll', function(event){weblicationLoad3()
831});}window.setTimeout(function(event){wAdaptParallax(event);}, 320);if(document.readyState=='complete'){wAdaptParallax('load');jQuery(window).on("resize scroll", function(event){wAdaptParallax(event);});}else{jQuery(window).on("load resize scroll", function(event){wAdaptParallax(event);});}if(document.readyState=='complete'){wAdaptParallax('load');jQuery('body').on("touchmove", function(event){wAdaptParallax(event);});}else{jQuery('body').on("load touchmove", function(event){wAdaptParallax(event);});}jQuery(window).on("touchend", function(event){wAdaptParallax(event);});if(document.readyState=='complete'){weblicationLoad4();jQuery(window).on('resize', function(event){weblicationLoad4()
832});}else{jQuery(window).on('load resize', function(event){weblicationLoad4()
833});}jQuery('.wglAddScrollTop').each(function(index){var currentElement=jQuery(this);if(currentElement.prop('tagName').toLowerCase()=='body'){currentElement.append('<div id="scrollTopOuter"><div id="scrollTop"><div class="scrollTopInner"></div></div></div');}else{currentElement.after('<div id="scrollTopOuter"><div id="scrollTop"><div class="scrollTopInner"></div></div></div');}jQuery('#scrollTop').on('mousedown touchstart', function (event){event.preventDefault();jQuery('body, html').animate({scrollTop:0});});jQuery(window).on('scroll',function(){var scrollTop=jQuery(this).scrollTop();if(scrollTop > 200){jQuery('#scrollTop').fadeIn();}else{jQuery('#scrollTop').fadeOut();}});});jQuery('.wglAddFontResizer').each(function(index){var currentElement=jQuery(this);
833currentElement.prepend('<div id="fontResizer"><span class="fontResizerLabel"></span><span class="fontResizerShrink">A</span><span class="fontResizerEnlarge">A</span></div');jQuery('.fontResizerShrink').on('click', function (event){document.cookie='websitezoom=;path=/';location.reload();});jQuery('.fontResizerEnlarge').on('click', function (event){document.cookie='websitezoom=l;path=/';location.reload();});});jQuery('.wglShrinkToMinWidthWithoutBreak').each(function(index){var currentElement=jQuery(this);var widthOuter=currentElement.width();var widthInner=currentElement.children('*').outerWidth();var textAlignBefore=currentElement.css('text-align');currentElement.css({'text-align':'left'});var lastElementInner=currentElement.children('*:last');var offsetRightLastElementInner=Math.ceil(lastElementInner.get(0).offsetLeft + lastElementInner.outerWidth() + parseInt(lastElementInner.css('margin-right')));currentElement.css({'text-align':textAlignBefore});currentElement.css({'width':String(offsetRightLastElementInner) + 'px'});});jQuery('.wglAdjustWidthEqual').each(function(index){var currentElement=jQuery(this);var numberEntries=0;currentElement.children('*').each(function(index){if(jQuery(this).css('display')!='none'){numberEntries++;}});var widthPerEntry=String(100 / numberEntries) + '%';currentElement.children('*').each(function(index){if(jQuery(this).css('display')!='none'){jQuery(this).css({'width':widthPerEntry});}});});jQuery('.wglRemoveOnClick').each(function(index){jQuery(this).attr('onclick', '').off('click');});if(typeof(wEditor)=='undefined'){jQuery('.wglFancybox').each(function(index){var currentElement=jQuery(this);if(currentElement.get(0).nodeName=='IMG'){var wrapElement=currentElement.parent().attr('class')=='listEntryThumbnailOuter'?currentElement.parent():currentElement;var srcFancy=currentElement.attr('src');if(currentElement.attr('data-src')&&currentElement.attr('data-src')!=''){srcFancy=currentElement.attr('data-src');}else{if(/\-/.test(srcFancy.replace(/[\s\S]+\//, ''))){srcFancy=srcFancy.replace(/\/weblication\/wThumbnails/, '').replace(/-[^-]+(\.\w+)$/, '$1');}else if(currentElement.attr('data-src2x')&&currentElement.attr('data-src2x')!=''){srcFancy=currentElement.attr('data-src2x');}}var closestList=currentElement.closest('.elementList');var relId='';if(closestList.length==1){relId=closestList.attr('id');}wrapElement.wrap('<a rel="' + relId + '" onclick="event&&event.stopPropagation?event.stopPropagation():event.cancelBubble=true;" title="' + currentElement.get(0).alt + '" class="boxPictureOnly" href="' + srcFancy + '"/>');}});if(('ontouchstart' in window)||navigator.msMaxTouchPoints||window.DocumentTouch&&document instanceof DocumentTouch){jQuery('.wglNavigationOptimizeTouch li li:not(:has(ul))').each(function(index){jQuery(this).on('click touchstart', function(event){event.stopPropagation();});});jQuery('.wglNavigationOptimizeTouch li.navLevel1Open > a, .wglNavigationOptimizeTouch li.navLevel1OpenSelected > a, .wglNavigationOptimizeTouch li.navLevel1OpenDescendantSelected > a, .wglNavigationOptimizeTouch li.navLevel1:has(a[data-previewlink]) > a').each(function(index){jQuery(this).on(navigator.userAgent.indexOf('Trident')!=-1&&navigator.userAgent.indexOf('Touch')!=-1?'pointerdown':'click', function(event){var timeClicked=new Date().getTime();if(event.pointerType&&event.pointerType=='mouse'){}else if(event.target.getAttribute('data-has-already-touched')&&event.target.getAttribute('data-has-already-touched') > timeClicked-600){}else{event.preventDefault();event.target.setAttribute('data-has-already-touched', timeClicked);}});});}wglValidateElementInline=function(currentInputElement, options){var currentInput=jQuery(currentInputElement);var formPos=currentInput.closest('form').attr('data-formpos');var formAction=currentInput.closest('form').attr('action');var elementName=currentInput.attr('name');elementName=elementName.replace('[]', '');var elementValue=currentInput.val();if(currentInput.attr('type')=='checkbox'||currentInput.attr('type')=='radio'){elementValue='';currentInput.parent().parent().find('input').each(function(){elementValue +=(jQuery(this).get(0).checked?jQuery(this).val():'');});}else if(currentInput.prop("tagName")=='SELECT'&&currentInput.attr('multiple')=='multiple'){elementValue='';currentInput.children().each(function(){elementValue +=(jQuery(this).get(0).selected?jQuery(this).val():'');});}if(elementValue==null){elementValue='';}var validationID=formPos + currentInput.attr('id');var urlValidation=formAction + '?action=ve&en=' + elementName + '&ev=' + encodeURIComponent(elementValue);$.when( formSaveValues() ).done(function( x ) {jQuery.ajax({type:"GET",async:true,dataType:"json",url:urlValidation,success:function(result){elementsWithValidationClass=currentInput;var labelID=elementsWithValidationClass.attr('name').replace('[]', '');if(labelID=='memberNumber_2'||labelID=='memberNumber_3'||labelID=='noMember'){labelID='memberNumber_1';}var validationID=labelID;var elementToAddError=elementsWithValidationClass.parent();if(elementsWithValidationClass.parent().prev('dt')){if(currentInput.attr('type')=='checkbox'||currentInput.attr('type')=='radio'){elementToAddError=elementsWithValidationClass.parent().parent().prev('dt').find('label');}else{if(labelID.substring(labelID.length-5, labelID.length)=='_time'){elementToAddError=elementsWithValidationClass.parent().prev('dt').find('label');}else{elementToAddError=elementsWithValidationClass.parent().prev('dt').find('label[for="' + labelID + '"]');if(elementToAddError.length==0){elementToAddError=elementsWithValidationClass.parent().prev('dt').find('label[for="' + labelID + '-button"]');}}}}var elementToAddOK=elementToAddError;if(!result['isValid']){if(elementName.indexOf('fahrzeuggruppe') < 0&&elementName.indexOf('fahrzeugdetails') < 0){elementsWithValidationClass.addClass('wglIsInvalid');jQuery('#validationStatus_' + validationID).remove();if(result['errorMessage']!=''){if(jQuery('#errorMessage_' + validationID).length==0){elementToAddError.addClass('wglContainsErrorMessageInline').append('<div class="wglErrorMessageInline" id="errorMessage_' + validationID + '"><div>' + result['errorMessage'] + '</div></div>');(function(elementsWithValidationClass){window.setTimeout(function(){jQuery('#errorMessage_' + validationID).addClass("loaded");}, 32);})(elementsWithValidationClass);}}}}else{elementsWithValidationClass.removeClass('wglIsInvalid');if(labelID=='memberNumber_1'){$('#memberNumber_1').removeClass('wglIsInvalid');$('#memberNumber_2').removeClass('wglIsInvalid');$('#memberNumber_3').removeClass('wglIsInvalid');$('#noMember_Ja').removeClass('wglIsInvalid');}jQuery('#errorMessage_' + validationID).remove();if(elementToAddError.find('.wglErrorMessageInline').length==0){elementToAddError.removeClass('wglContainsErrorMessageInline');}if(jQuery('#validationStatus_' + validationID).length==0){elementToAddOK.addClass('wglContainsValidationStatusInline').append('<div class="wglValidationStatusOK" id="validationStatus_' + validationID + '"><div></div></div>');(function(elementsWithValidationClass){window.setTimeout(function(){jQuery('#validationStatus_' + validationID).addClass("loaded");}, 32);})(elementsWithValidationClass);}}}});});};jQuery('form[data-inlinevalidation="onblur"]').each(function(){wUiTmp['formPos']=wUiTmp['formPos']?wUiTmp['formPos'] + 1:1;jQuery(this).attr('data-formpos', wUiTmp['formPos']);if(jQuery(this).attr('action').indexOf('/weblication/grid5/tmpHTTP/wF
833orm-')!=-1){jQuery(this).find('input, textarea, select').each(function(){if(jQuery(this).attr('type')!='file'){if(location.search.indexOf('wFormStatus=failed')!=-1){wglValidateElementInline(jQuery(this).get(0), {'onInit':true});}var eventsToValidate='blur';if(jQuery(this).attr('type')=='radio'){eventsToValidate='click';}else if(jQuery(this).attr('type')=='checkbox'||(jQuery(this).prop("tagName")=='SELECT'&&jQuery(this).attr('multiple')=='multiple')){eventsToValidate='change';}else if(jQuery(this).prop("tagName")=='SELECT'){eventsToValidate='selectmenuchange';}else if(jQuery(this).hasClass('hasDatepicker')){eventsToValidate='change';}jQuery(this).on(eventsToValidate, function(){wglValidateElementInline(jQuery(this).get(0), {});});}});}});}jQuery('.wglClickable').css({'cursor':'pointer'});if(document.readyState=='complete'){weblicationLoad2();}else{jQuery(window).on('load', function(event){weblicationLoad2()
834});}});wPrepareHTML=function(root){jQuery("a[data-ajaxurl]").each(function(){var thisElement=jQuery(this);var ajaxURL=thisElement.data('ajaxurl');thisElement.on('click', function (event){$.post("/global/wGlobal/scripts/php/items/list/setFilterData.php", $(".elementContainerFilter form").serialize(), function(){jQuery.ajax({type:"GET", url:ajaxURL, success:function(result){var elementTarget=thisElement.parent().parent();elementTarget.fadeTo(0, 0);elementTarget.html(result);history.pushState({page:thisElement.attr('href')}, '', thisElement.attr('href'));wPrepareHTML(elementTarget.get(0));elementTarget.fadeTo(600, 1);wScrollSmoothToElement(elementTarget.get(0), {'targetPos':'top'});for(var addClassSelector in wCssClassesToAddGlobal){jQuery(addClassSelector).each(function(index){var classesToAdd=wCssClassesToAddGlobal[addClassSelector];for(var i=0, arrayLength=classesToAdd.length; i < arrayLength; i++){var classData=classesToAdd[i].split('=');if(classData.length==2){var selector=jQuery.trim(classData[0]);if(selector=='.'){jQuery(this).addClass(jQuery.trim(classData[1]));}else if(selector=='parent'){jQuery(this).parent().addClass(jQuery.trim(classData[1]));}else{jQuery(this).find(selector).addClass(jQuery.trim(classData[1]));}}else{jQuery(this).addClass(jQuery.trim(classData[0]));}}});}if(typeof(wOnAfterReloadElementByAjaxUrl)=='function'){wOnAfterReloadElementByAjaxUrl(elementTarget);}window.setTimeout(function(){jQuery(window).trigger('resize');}, 100);}});});return false;});});};wScrollSmoothToElement=function(elementTarget, options){var id, offsetTopFixed, scrollTop;elementTarget=jQuery(elementTarget);var currentTimestamp=new Date().getTime();if(elementTarget.length > 0&&!elementTarget.attr('data-lct')||elementTarget.attr('data-lct') < currentTimestamp-320){elementTarget.attr('data-lct', currentTimestamp);try{jQuery('body, html').stop(true, true);scrollDuration=parseInt(elementTarget.attr('data-scrollsmoothtotargetduration')?elementTarget.attr('data-scrollsmoothtotargetduration'):400);offsetTopFixed=jQuery('#blockTop').height() + jQuery('#blockHeader').height();var visibleMin=document.body.scrollTop + offsetTopFixed;var visibleMax=visibleMin + jQuery(window).height();var posTopElement=elementTarget.offset().top;if(posTopElement > visibleMin&&posTopElement < visibleMax){return true;}wUiTmp['scrollingAuto']=true;jQuery('body, html').animate({scrollTop:elementTarget.offset().top-offsetTopFixed}, {duration:scrollDuration, complete:function(){offsetTopFixed=jQuery('.wglContainerInsideTopOnScroll').height() + jQuery('#blockHeader').height();if(offsetTopFixed > 0){jQuery('body, html').animate({scrollTop:elementTarget.offset().top-offsetTopFixed}, {duration:scrollDuration, complete:function(){wUiTmp['scrollingAuto']=false;jQuery(window).trigger('resize');}});}else{wUiTmp['scrollingAuto']=false;jQuery(window).trigger('resize');}}});return false;}catch(e){console.log(e)}}};jQuery.extend(jQuery.easing, {wEaseOutScroll:function(x, t, b, c, d){return (t==d)?b + c:b + c * (-Math.pow(1.5,-20 * t / d) + 1);}});jQuery.fn.wAddAnalytics=function(viewmode){jQuery.each($(this), function(){jQuery(this).on('click',function(){ga('send', {'hitType':'pageview', 'page':j
834Query(this).attr('href'), 'title':jQuery(this).attr('title')})});});};jQuery.fn.wSetViewmode=function(viewmode){jQuery.each(jQuery(this), function(){var hrefNew=this.getAttribute('href')||'';var anchor='';if(/#[^#]+$/.test(hrefNew)){anchor=hrefNew.replace(/.*#/, '');hrefNew=hrefNew.replace(/#.*/, '');}hrefNew=hrefNew.indexOf('?')!=-1?hrefNew + '&viewmode=' + viewmode:hrefNew + '?viewmode=' + viewmode;if(anchor!=''){hrefNew +='#' + anchor;}if(this.className.indexOf('boxOnly')==-1&&this.innerHTML.indexOf('<img ')!=-1){this.style.background='none';this.style.paddingLeft='none';}this.setAttribute('href', hrefNew);});};wOpenPrintPreview=function(width, height, name){var name=name||'printpreview';var url=location.href.indexOf('?')==-1?location.href.replace(/#.*/, '') + '?viewmode=print':location.href.replace(/#.*/, '') + '&viewmode=print';options=',location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=no';wOpenPopupURL(url, width, height, name, options);};wOpenURL=function(url, target, event){if(location.pathname.indexOf('/weblication/grid5/')!=0){if(target=='_blank'){window.open(url);}else if(target=='_top'){top.location.href=url;}else if(target=='box'){var widthFancybox='80%';var heightFancybox='80%';if(jQuery(window).width() <=480){widthFancybox='100%';}if(typeof(lightboxType)!='undefined'&&lightboxType=='wLightbox'&&!/MSIE\s*(7|8)/.test(navigator.appVersion)){wLightbox({"type":"iframe", "href":url, "class":"default", "width":widthFancybox, "height":heightFancybox});}else if(jQuery.fancybox&&jQuery.fancybox.version&&parseInt(String(jQuery.fancybox.version).replace(/(\d+\.\d+)\.\d+/, '$1')) >=2){if(/box\w*\-(\d+)\-(\d+)/.test(target)){widthFancybox=RegExp.$1 + 'px';heightFancybox=RegExp.$2 + 'px';jQuery.fancybox({"type":"iframe", "href":url, "width":widthFancybox, "maxHeight":heightFancybox, "titlePosition":"inside", helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});}else{jQuery.fancybox({"type":"iframe", "href":url, "width":widthFancybox, "minHeight":'80%', "titlePosition":"inside", helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});}}else{jQuery.fancybox({"type":"iframe", "href":url, "width":widthFancybox, "height":'80%', "titlePosition":"inside", "transitionIn":"none", "transitionOut":"none", "hideOnContentClick":true, "zoomOpacity":true, "zoomSpeedChange":200, "zoomSpeedIn":400, "zoomSpeedOut":400, "overlayShow":false, "overlayOpacity":1});}}else{if(url.indexOf('#')==0){wScrollSmoothToElement(url);}else {location.href=url;}}}};wOpenPopupURL=function(url, width, height, name, options){var name=name||'';if(width==''||width==' '||typeof(width)=='undefined'){width=786;}if(height==''||height==' '||typeof(height)=='undefined'){height=677;}url=url.replace(/&amp;/g, '&');options=options||',location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes,status=no';width=parseInt(width);height=parseInt(height);var posLeft=(screen.width / 2)-(width  / 2);var posTop=(screen.height / 2)-(height / 2);window.open(url, name, 'top='+posTop+',left='+posLeft+',width='+width+',height='+height+',' + options);};wDisableAnalytics=function(){document.cookie='disableGoogleAnalytics=1; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';if(window['gaId']){window['ga-disable-' + window['gaId']]=true;}};wSendMailNospam=function(data){location.href='mailto:' + data.replace('|', '@');};wAdaptParallax=function(event){var winScrollTop=jQuery(window).scrollTop();var winHeight=jQuery(window).height();wUiTmp['lastEventType']=event?event.type:'';if(winScrollTop==window['lastScrollTop']){return;}else if(!window['lastScrollTop']){wUiTmp['scrollDirection']=winScrollTop > window['lastScrollTop']?'down':'up';wUiTmp['lastScrollTop']=winScrollTop;}wUiTmp['lastScrollTop']=winScrollTop;if(typeof(wEditor)=='undefined'){jQuery('.wglParallaxBackground').each(function(index){var currentElement=jQuery(this);if(wUiTmp['lastEventType']!='resize'&&currentElement.data('disableParallax')=='1'){return false;}var offsetTop=parseInt(currentElement.offset().top);var offsetTopInit=0;var offsetHeight=parseInt(currentElement.outerHeight());var offsetWidth=parseInt(currentElement.outerWidth());var posInsideTop=winScrollTop + winHeight-offsetTop;var posInsideBottom=offsetTop + offsetHeight-winScrollTop;var useEdgeOnInit=currentElement.data('useedgeoninit')=='1'?true:false;var moveMax=offsetHeight + winHeight;if(posInsideTop > 0&&posInsideBottom > 0){var posTopPercentage=posInsideTop / moveMax;var backgroundPositionTop=0;var backgroundPositionLeft=0;var direction=(currentElement.data('parallaxbackgrounddirection')?currentElement.data('parallaxbackgrounddirection').toLowerCase():'bottom');var parallaxElement=(currentElement.data('parallaxbackgroundelement')?document.getElementById(currentElement.data('parallaxbackgroundelement')):null);var speed=1;try{speed=(currentElement.data('parallaxbackgroundspeed')?currentElement.data('parallaxbackgroundspeed'):1);}catch(e){speed=1;}if(speed=='no'||speed=='image'){return false;}else if(speed=='screen'){speed=1;currentElement.data('parallaxbackgroundspeed', speed);}if(!currentElement.data('backgroundHeight')&&direction.indexOf('top')!=-1&&direction.indexOf('bottom')!=-1){image=new Image();image.src=currentElement.get(0).style.backgroundImage.replace(/url\((['"])?(.*?)\1\)/i, '$2');image.onload=(function(currentElement){if(image.height==0){return false;}if(currentElement.data('disableParallax')!='1'){if(speed=='image'){currentElement.data('backgroundHeight', image.height);speed=(image.height-offsetHeight) / offsetHeight;if(speed < 0){speed='no';currentElement.data('parallaxbackgroundspeed', speed);return;}currentElement.data('parallaxbackgroundspeed', speed);}else{backgroundSize=currentElement.css('background-size');var heightScaled=parseInt(offsetWidth / image.width * image.height);var disableParallax=false;if(/auto$/i.test(backgroundSize)||backgroundSize==''){heightScaled=image.height;}currentElement.data('backgroundHeight', heightScaled);if(heightScaled + parseInt(currentElement.css('background-position').split(' ')[1]) < offsetHeight){currentElement.css({'background-size':'cover', 'background-position':'0 0'});currentElement.data('disableParallax', '1');}else{currentElement.css({'outline':'none'});currentElement.data('disableParallax', '0');}}}})(currentElement);}speed=parseFloat(speed);if(currentElement.data('disableParallax')=='1'){return false;}if(direction.indexOf('right')!=-1){backgroundPositionLeft='-' + String(Math.round(offsetHeight-posTopPercentage * offsetHeight) * speed);}else if(direction.indexOf('left')!=-1){backgroundPositionLeft='-' + String(Math.round(posTopPercentage * offsetHeight) * speed);}if(direction.indexOf('top')!=-1){backgroundPositionTop='-' + String(Math.round(posTopPercentage * offsetHeight) * speed);if(useEdgeOnInit==true){offsetTopInit=currentElement.data('offsettopinit');
834if(!wUiTmp['hasInitParallax']&&!offsetTopInit){offsetTopInit=backgroundPositionTop;currentElement.data('offsettopinit', offsetTopInit);}else if(!offsetTopInit){offsetTopInit=0;}backgroundPositionTop-=offsetTopInit;if(backgroundPositionTop > 0 ){backgroundPositionTop=0;}}if(currentElement.data('backgroundHeight')&&(offsetHeight-backgroundPositionTop) > currentElement.data('backgroundHeight')){backgroundPositionTop=offsetHeight-currentElement.data('backgroundHeight')
835}}else if(direction.indexOf('bottom')!=-1||direction==''){backgroundPositionTop='-' + String(Math.round(offsetHeight-posTopPercentage * offsetHeight) * speed);if(useEdgeOnInit==true){offsetTopInit=currentElement.data('offsettopinit');if(!wUiTmp['hasInitParallax']&&!offsetTopInit){offsetTopInit=backgroundPositionTop-offsetHeight;currentElement.data('offsettopinit', offsetTopInit);}else if(!offsetTopInit){offsetTopInit=0;}backgroundPositionTop-=offsetTopInit;if(backgroundPositionTop < offsetHeight&&backgroundPositionTop > 0){backgroundPositionTop=offsetHeight;}}if(currentElement.data('backgroundHeight')&&(offsetHeight-backgroundPositionTop) > currentElement.data('backgroundHeight')){backgroundPositionTop=offsetHeight-currentElement.data('backgroundHeight')
836}}backgroundPositionLeft=String(backgroundPositionLeft) + 'px';backgroundPositionTop=String(backgroundPositionTop) + 'px';wUiTmp['lastEventTypeBefore']=wUiTmp['lastEventType'];if(parallaxElement){parallaxElement.style.marginTop=backgroundPositionTop;}else{if(wUiTmp['isIOS']){if(wUiTmp['lastEventType']=='touchmove'){currentElement.css({'transform':'translate3d(0, 0, 0)', 'transition':'', 'background-position':backgroundPositionLeft + ' ' + backgroundPositionTop});}else if(wUiTmp['lastEventType']=='touchend'){}else if(wUiTmp['lastEventType']=='scroll'){currentElement.css({'transform':'translate3d(0, 0, 0)', 'transition':'background-position ease 0.6s', 'background-position':backgroundPositionLeft + ' ' + backgroundPositionTop});}}else{currentElement.css({'background-position':backgroundPositionLeft + ' ' + backgroundPositionTop});}}}});jQuery('.wglParallaxContent').each(function(index){var currentElement=jQuery(this).children().first();var offsetTop=parseInt(currentElement.offset().top);var offsetHeight=parseInt(currentElement.height());var posInsideTop=winScrollTop + winHeight-offsetTop;var posInsideBottom=offsetTop + offsetHeight-winScrollTop;if(posInsideTop > 0&&posInsideBottom > 0){var posTopPercentage=posInsideTop / (offsetHeight + winHeight);var positionTop=0;var positionLeft=0;var direction=(currentElement.parent().data('parallaxcontentdirection')?currentElement.parent().data('parallaxcontentdirection').toLowerCase():'left');if(direction.indexOf('right')!=-1){var offsetWidth=parseInt(currentElement.width());var left=-(1-posTopPercentage * 2) * offsetWidth;if(left > 0) left=0;positionLeft=String(parseInt(left)) + 'px';}else if(direction.indexOf('left')!=-1){var parentOffsetWidth=parseInt(currentElement.parent().width());var left=(1-posTopPercentage * 2) * parentOffsetWidth;if(left < 0) left=0;positionLeft=String(parseInt(left)) + 'px';}if(direction.indexOf('top')!=-1){positionTop=String(1-posTopPercentage * offsetHeight + offsetHeight) + 'px';}else if(direction.indexOf('bottom')!=-1||direction==''){positionTop=String(posTopPercentage * offsetHeight) + 'px';}currentElement.css({'transform':'translate3d(0, 0, 0)', 'margin-left':positionLeft, 'margin-top':positionTop});}});}wUiTmp['hasInitParallax']=true;};wScrollSmoothToTarget=function(element, event){var id, href=element.getAttribute('href'), offsetTopFixed, targetName, elementTarget, scrollTop;if(element.href.replace(/#[\S\s]*$/, '')!=location.href.replace(/#[\S\s]*$/, '')){return true;}else if(/(#.*)/.test(href)){targetName=RegExp.$1;targetSelector=targetName.replace(/\./, '\\.');elementTarget=jQuery(targetSelector);var currentTimestamp=new Date().getTime();if(elementTarget.length > 0&&!element.getAttribute('data-lct')||element.getAttribute('data-lct') < currentTimestamp-320){element.setAttribute('data-lct', currentTimestamp);event.preventDefault();jQuery(element).parent().parent().find('li').removeClass('selected');jQuery(element).parent().addClass('selected');try{jQuery('body, html').stop(true, true);scrollDuration=parseInt(element.getAttribute('data-scrollsmoothtotargetduration')?element.getAttribute('data-scrollsmoothtotargetduration'):400);offsetTopFixed=jQuery('.wglContainerInsideTopOnScroll').height();jQuery('body, html').animate({scrollTop:elementTarget.offset().top-offsetTopFixed}, {duration:scrollDuration, complete:function(){offsetTopFixed=jQuery('.wglContainerInsideTopOnScroll').height();if(offsetTopFixed > 0){jQuery('body, html').animate({scrollTop:elementTarget.offset().top-offsetTopFixed}, scrollDuration);}if(history.pushState){history.pushState(null, null, targetName);}}});return false;}catch(e){}}}};wOptimizePictureSizes=function(){jQuery("img[data-src2x]:not(.wglLazyLoadInit), img.wglLazyLoad:not
836(.wglLazyLoadInit)").each(function(){var currentImg=jQuery(this);var offsetTop=parseInt(currentImg.offset().top);var srcMin=currentImg.data('srcmin')?currentImg.data('srcmin'):'';var widthCurrent=parseInt(currentImg.width());var attrWidthCur=parseInt(typeof(currentImg.attr('width'))!='undefined'?currentImg.attr('width'):0);var widthMin=parseInt(srcMin.replace(/.*@min/, '').replace(/\..*/, ''));if(currentImg.attr('data-maxwidthifinvisible')&&currentImg.attr('data-maxwidthifinvisible') > widthCurrent){widthCurrent=currentImg.attr('data-maxwidthifinvisible');}if((devicePixelRatio >=hdLimitDpr&&typeof(currentImg.attr('data-src2x'))!='undefined'&&currentImg.attr('data-src2x')!=''&&attrWidthCur < widthCurrent * 2&&currentImg.attr('data-ishd')!='1')||(typeof(currentImg.attr('data-src2x'))!='undefined'&&currentImg.attr('data-src2x')!=''&&attrWidthCur < widthCurrent&&currentImg.attr('data-ishd')!='1')){currentImg.attr('src', currentImg.data('src2x'));currentImg.attr('data-ishd', '1');}else if(typeof(currentImg.attr('data-srcmin'))!='undefined'&&currentImg.attr('data-srcmin')!=''&&widthCurrent < widthMin&&widthMin < attrWidthCur&&currentImg.attr('data-ishd')!='1'&&currentImg.attr('data-isld')!='1'){if(currentImg.attr('src').indexOf('data:image')==0&&currentImg.attr('data-ismin')!='1'){currentImg.attr('src', currentImg.data('srcmin'));currentImg.attr('data-ismin', '1');}}else if(typeof(currentImg.attr('data-src'))!='undefined'&&currentImg.attr('data-src')!=''&&currentImg.attr('data-ishd')!='1'&&currentImg.attr('data-isld')!='1'){currentImg.attr('src', currentImg.data('src'));currentImg.attr('data-isld', '1');}});};wProcessWglAdjustHeightMax=function(){jQuery('.wglAdjustHeightMax').each(function(index){var currentElement=jQuery(this);var offsetLeft=0;var offsetLeftLast=0;var maxHeight=0;var adjust=true;var positionCol=0;var childsToAdapt=new Array();var numberChilds=0;var subElement=null;var elementHeight=0;currentElement.children('*:visible').each(function(index){var className=jQuery(this).attr('class')||'';if(className.toLowerCase().indexOf('clear')==-1&&className.toLowerCase().indexOf('editor')==-1){numberChilds++;}});currentElement.children('*:visible').each(function(index){subElement=jQuery(this);var className=jQuery(this).attr('class')||'';if(className.toLowerCase().indexOf('clear')==-1&&className.toLowerCase().indexOf('editor')==-1){if(jQuery(this).data('wHasSetHeightToAjustHeightMax')=='1'){jQuery(this).css({'height':''});}offsetLeft=jQuery(this).get(0).offsetLeft-(jQuery(this).parent().css('position')=='relative'?0:jQuery(this).get(0).parentNode.offsetLeft);if(index > 0&&(offsetLeft==0||offsetLeft <=offsetLeftLast)&&jQuery(this).css('position')!='absolute'){if(positionCol==1){childsToAdapt=new Array();maxHeight=0;}positionCol=0;if(offsetLeft <=offsetLeftLast){offsetLeft=0;}}positionCol++;elementHeight=subElement.css('box-sizing')=='border-box'?subElement.outerHeight():subElement.height();if(index + 1==numberChilds){maxHeight=elementHeight > maxHeight?elementHeight:maxHeight;childsToAdapt.push(jQuery(this));}if(childsToAdapt.length > 1&&(index > 0&&positionCol==1||index + 1==numberChilds)){for(i=0; i < childsToAdapt.length; i++){childToAdapt=childsToAdapt[i];var className=childToAdapt.attr('class')||'';if(className.toLowerCase().indexOf('clear')==-1&&className.toLowerCase().indexOf('editor')==-1){childToAdapt.css({'height':maxHeight});childToAdapt.data('wHasSetHeightToAjustHeightMax', '1');}}childsToAdapt=new Array();maxHeight=0;}offsetLeftLast=offsetLeft;maxHeight=elementHeight > maxHeight?elementHeight:maxHeight;childsToAdapt.push(jQuery(this));}});});};jQuery.fn.wBannerSlider=function(){jQuery.each(jQuery(this), function(){var bannerSliderCurrent=jQuery(this);var bannerSliderCurrentId=bannerSliderCurrent.attr('id').replace(/bannerSlider_/, '');var options={};options['initOn']=options['initon']||jQuery(this).data('initon');options['initOpen']=options['initopen']||jQuery(this).data('initopen');options['initDelay']=options['initDelay']||jQuery(this).data('initdelay');if(options['initDelay']==''){options['initDelay']=0;}else{options['initDelay'] *=1000;}eval('selectEntry_' + bannerSliderCurrentId + '=function (position){selectListEntryBannerSlider(bannerSliderCurrentId, position);}');var bannerSliderInit=function(){if(options['initOpen']!=''){window.bannerSliderObjects[bannerSliderCurrentId]={};selectListEntryBannerSlider(bannerSliderCurrentId, parseInt(options['initOpen']), {'animation':'none'});}window.setTimeout(function(){initBannerSlider(bannerSliderCurrentId);}, options['initDelay']);};if(options['initOn']=='load'){jQuery(window).on('load', bannerSliderInit);}else{bannerSliderInit();}});};jQuery.fn.wPictureGallery=function(){jQuery.each(jQuery(this), function(){var options={};var pictureGalleryCurrent=jQuery(this);var pictureGalleryCurrentId=pictureGalleryCurrent.attr('id').replace(/pictureGallery_/, '');eval('selectEntry_' + pictureGalleryCurrentId + '=function (position){selectListEntryGallery(pictureGalleryCurrentId, position);}');initGallery(pictureGalleryCurrentId);});};jQuery.fn.wTabcontainer=function(){var maxHeightContent=0;jQuery.each(jQuery(this), function(){var tabcontainerCurrent=jQuery(this);var tabcontainerID=tabcontainerCurrent.get(0).id.replace(/tabContainer_/, '');var options={};options['initOpen']=options['initOpen']||jQuery(this).data('initopen');options['rememberSelected']=options['rememberSelected']||jQuery(this).data('rememberselected');var activeContent=options['initOpen']||0;if(/^\d+$/.test(activeContent)){activeContent=parseInt(activeContent)-1;}if(options['rememberSelected']=='1'||typeof(wEditor)!='undefined'){var checkCookieRegExp=new RegExp('registerTab_' + tabcontainerID + '=(\\d+)');if(checkCookieRegExp.test(document.cookie)){activeContent=RegExp.$1-1;}}var jQueryHashId=location.hash.replace(/\:/g, '\\:').replace(/\./g, '\\.').replace('open_', 'anchor_');if(jQueryHashId!=''&&jQuery(this).find(jQueryHashId).length > 0){if(/_(\d+)$/.test(jQuery(jQueryHashId).attr('id'))){activeContent=RegExp.$1-1;}else{var containerIndex=jQuery(jQueryHashId).parents('.container, .containerInvisible').index();if(containerIndex >=0){activeContent=containerIndex;}}}if(!activeContent||activeContent==''||activeContent < 0){activeContent=0;}tabcontainerCurrent.find('> .tabs > .tabSelected').removeClass('tabSelected').addClass('tab');tabcontainerCurrent.find('> .tabs > .tab:nth-child(' + (activeContent + 1) + ')').removeClass('tab').addClass('tabSelected');tabcontainerCurrent.find('> .containers > .container,> div > div > .containers > .container').addClass('containerInvisible');tabcontainerCurrent.find('> .containers > .container:nth-child(' + (activeContent + 1) + '),> div > div > .containers > .container:nth-child(' + (activeContent + 1) + ')').removeClass('containerInvisible').addClass('containerSelected').addClass('containerSelectedAfterInit');jQuery(this).find('> .tabsSmall, > .tabsSelectbox, > .tabs, > div > div > .tabs').children('.tab, .tabSelected').on('click', function(event){event.preventDefault();var headerSelected=jQuery(this);var tabcontainerSelected=headerSelected.get(0).id.replace(/.*_/, '');if(history.pushState&&headerSelected.attr('id')){history.pushState({page:'#' + headerSelected.attr('id')}, '', '#' + headerSelected.attr('id'));}jQuery(this).parent().parent().find('> .containers, > div > div > .containers').children('.container, .containerSelected, .containerInvisible').each(function(){currentContainer=this;(function(currentContainer){if(currentContainer.id=='container_' + tabcontainerID + '_' + tabcontainerSelected){currentContainer.className='container containerSelected';window.setTimeout(function(){jQuery(currentContainer).addClass('containerSelectedAfterInit')}, 32);}else{currentContainer.className='container containerInvisible';window.setTimeout(function(){jQuery(currentContainer).addClass('containerInvisibleAfterInit')}, 32);}})(currentContainer);});jQuery(this).parent().parent().find('> .tabsSmall, > .tabsSelectbox, > .tabs, > div > div > .tabs').children('.tab, .tabSelected').each(function(){if(this.id=='tab_' + tabcontainerID + '_' + tabcontainerSelected){this.className='tabSelected';}else{this.className='tab';}});if(typeof(wEditor)!='undefined'||options['rememberSelected']!='0'){document.cookie='registerTab_' + tabcontainerID + '=' + tabcontainerSelected;}jQuery(window).trigger('resize');});if(typeof(wEditor)=='undefined'){jQuery(this).find('.container, .containerSelected, .containerInvisible').each(function(index){
836if(jQuery(this).html()==''){tabcontainerCurrent.find('> .tabs > div:nth-child(' + (index + 1) + ')').remove();}});}});};jQuery.fn.wAccordion=function(){var maxHeightContent=0;jQuery.each(jQuery(this), function(){var options={};options['initOpen']=options['initOpen']||jQuery(this).data('initopen');options['multiple']=options['multiple']||jQuery(this).data('multiple');options['expandAll']=options['expandAll']||jQuery(this).data('expandall');options['collapsible']=options['collapsible']||jQuery(this).data('collapsible');options['rememberSelected']=options['rememberSelected']||jQuery(this).data('rememberselected');var accordionID=jQuery(this).get(0).id.replace(/accordion_/, '');var activeContent=options['initOpen'];if(/^\d+$/.test(activeContent)){activeContent=parseInt(activeContent)-1;}if(options['rememberSelected']=='1'){var checkCookieRegExp=new RegExp('accordionTab_' + accordionID + '=Accordion-(\\d+)');if(checkCookieRegExp.test(document.cookie)){activeContent=RegExp.$1-1;}}var jQueryHashId=location.hash.replace(/\./g, '\\.').replace(/\:/g, '\\:').replace('open_', 'anchor_').replace(/\//g, '\\/');options['active']=options['active']||activeContent;jQuery(this).children('.accordionContent').each(function(index){var heightContent=jQuery(this).height();if(heightContent > maxHeightContent){maxHeightContent=heightContent;}});var lastOpenedEntry=null;jQuery(this).find('h1, h2, h3, h4').each(function(index){var openCurrent=false;if($(this).attr('data-init')=='open'){options['active']=index;}if(jQueryHashId!='#'){if(jQueryHashId!=''&&'#' + jQuery(this).attr('id')==jQueryHashId||jQuery(this).next('.accordionContent').find(jQueryHashId).length > 0){if(/_Accordion-/.test(jQuery(jQueryHashId).attr('id'))){options['active']=index;if(!options['multiple']&&lastOpenedEntry){lastOpenedEntry.addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');lastOpenedEntry.next('.accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').hide();lastOpenedEntry=null;}openCurrent=true;}else if(jQuery(jQueryHashId).parents('.accordionContent').length > 0){options['active']=index;}}else{jQueryHashIdAlt=jQueryHashId.replace(/_Accordion-\d+/, '_Accordion');if(jQueryHashIdAlt!=''&&'#' + jQuery(this).attr('id')==jQueryHashIdAlt||jQuery(this).next('.accordionContent').find(jQueryHashIdAlt).length > 0){if(/_Accordion-/.test(jQuery(jQueryHashIdAlt).attr('id'))){options['active']=index;if(!options['multiple']&&lastOpenedEntry){lastOpenedEntry.addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');lastOpenedEntry.next('.accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').hide();lastOpenedEntry=null;}openCurrent=true;}else if(jQuery(jQueryHashIdAlt).parents('.accordionContent').length > 0){options['active']=index;}}}}if(options['collapsible']){jQuery(this).addClass('accordionHeaderCollapsible').removeClass('accordionHeaderNoneCollapsible');}else{jQuery(this).addClass('accordionHeaderNoneCollapsible').removeClass('accordionHeaderCollapsible');}if(options['expandAll']||typeof(options['active'])=='number'&&options['active']==index){lastOpenedEntry=jQuery(this);jQuery(this).addClass('accordionHeaderVisible').removeClass('accordionHeaderHidden');jQuery(this).next('.accordionContent').addClass('accordionContentVisible').removeClass('accordionContentHidden').show();}else{jQuery(this).addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');jQuery(this).next('.accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible').hide();}if(options['heightStyle']=='auto'){jQuery(this).next('.accordionContent').css({'height':maxHeightContent});}jQuery(this).on('click', function(event, forceOpen){event.preventDefault();var headerSelected=jQuery(this);forceOpen=typeof(forceOpen)!='undefined'?forceOpen:false;if(history.pushState&&headerSelected.attr('id')){history.pushState({page:'#' + headerSelected.attr('id')}, '', '#' + headerSelected.attr('id'));}var contentSelected=jQuery(this).next('.accordionContent');jQuery(this).parent().children('.accordionContent').each(function(index){
836if(jQuery(this).get(0)==contentSelected.get(0)){if(jQuery(this).hasClass('accordionContentVisible')&&!forceOpen){if(options['collapsible']){jQuery(this).parent().trigger('accordionbeforeactivate', {'newHeader':contentSelected});jQuery(this).prev('.accordionHeader').addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');jQuery(this).addClass('accordionContentHidden').removeClass('accordionContentVisible').slideUp(0, function(){jQuery(this).parent().trigger('accordionchange', {'newHeader':headerSelected});});}}else{jQuery(this).prev('.accordionHeader').addClass('accordionHeaderVisible').removeClass('accordionHeaderHidden');if(options['collapsible']){jQuery(this).prev('.accordionHeader').addClass('accordionHeaderCollapsible').removeClass('accordionHeaderNoneCollapsible');}else{jQuery(this).prev('.accordionHeader').addClass('accordionHeaderNoneCollapsible').removeClass('accordionHeaderCollapsible');}jQuery(this).addClass('accordionContentVisible').removeClass('accordionContentHidden').slideDown(0, function(){jQuery(this).parent().trigger('accordionchange', {'newHeader':headerSelected});jQuery(this).parent().trigger('accordionactivate', {'newHeader':headerSelected});});}}else if(options['multiple']==true){}else{jQuery(this).prev('.accordionHeader').addClass('accordionHeaderHidden').removeClass('accordionHeaderVisible');jQuery(this).addClass('accordionContentHidden').removeClass('accordionContentVisible').slideUp(0);}});jQuery(window).trigger('resize');});});jQuery(this).on('accordionactivate', function(event, ui){try{var currentHeader=ui.newHeader;var offsetTopCurrentHeader=(currentHeader.offset())['top'];var windowScrollTop=jQuery(window).scrollTop();if(offsetTopCurrentHeader < windowScrollTop){if(jQuery('.wglContainerInsideTopOnScroll').length > 0){offsetTopCurrentHeader=offsetTopCurrentHeader-jQuery('.wglContainerInsideTopOnScroll').height();}jQuery('body, html').animate({scrollTop:offsetTopCurrentHeader});}else{var offsetBottomCurrentContent=(jQuery(currentHeader).next('.accordionContent').offset())['top'] + jQuery(currentHeader).next('.accordionContent').outerHeight();var windowBottom=windowScrollTop + jQuery(window).height();if(offsetBottomCurrentContent > windowBottom){var scrollDiff=offsetBottomCurrentContent-windowBottom;if(scrollDiff > offsetTopCurrentHeader-windowScrollTop){scrollDiff=offsetTopCurrentHeader-windowScrollTop;}if(jQuery('.wglContainerInsideTopOnScroll').length > 0){scrollDiff=scrollDiff-jQuery('.wglContainerInsideTopOnScroll').height();}jQuery('body, html').animate({scrollTop:windowScrollTop + scrollDiff});}}}catch(e){}});jQuery(this).on('accordionchange', function(event, ui){var eventTarget=event.target||event.srcElement;var id=eventTarget.id.replace(/accordion_/, '');if(options['rememberSelected']){if(ui.newHeader[0]){if(ui.newHeader[0].className.indexOf('accordionHeaderHidden')!=-1){document.cookie='accordionTab_' + id + '=';}else{document.cookie='accordionTab_' + id + '=' + ui.newHeader[0].id.replace(/.*_/, '');}}}jQuery(window).trigger('resize');});});};jQuery(window).on('hashchange', function(e){var jQueryHashId=location.hash.replace(/\./g, '\\.').replace('open_', 'anchor_');if(jQueryHashId!=''&&jQuery(jQueryHashId).length > 0){if(/#anchor/.test(jQueryHashId)&&jQuery(jQueryHashId).length!=0&&jQuery(jQueryHashId).parent().attr('id')&&jQuery(jQueryHashId).parent().attr('id').indexOf('tab_')==0){document.location.hash=jQuery(jQueryHashId).parent().attr('id');jQueryHashId='#' + jQuery(jQueryHashId).parent().attr('id');}if(/#tab_/.test(jQueryHashId)){if(/tab_/.test(jQuery(jQueryHashId).attr('id'))){jQuery(jQueryHashId).trigger('click', [true]);try{offsetTopFixed=jQuery('.wglContainerInsideTopOnScroll').height();if(offsetTopFixed > 0){jQuery('body, html').animate({scrollTop:jQuery(jQueryHashId).parent().offset().top-offsetTopFixed}, 0);}}catch(e){}}else{var containerIndex=jQuery(jQueryHashId).parents('.containerInvisible').index();if(containerIndex >=0){jQuery(jQueryHashId).parents('.containerInvisible').parent().parent().find('> .tabs > .tab:nth-child(' + (containerIndex + 1) + ')').trigger('click', [true]);}}}else if(/_Accordion-/.test(jQuery(jQueryHashId).attr('id'))){jQuery(jQueryHashId).trigger('click', [true]);var containerIndex=jQuery(jQueryHashId).parents('.containerInvisible').index();if(containerIndex >=0){jQuery(jQueryHashId).parents('.containerInvisible').parent().parent().find('> .tabs > .tab:nth-child(' + (containerIndex + 1) + ')').trigger('click', [true]);}}else{var containerIndex=jQuery(jQueryHashId).parents('.containerInvisible').index();if(containerIndex >=0){jQuery(jQueryHashId).parents('.containerInvisible').parent().parent().find('> .tabs > .tab:nth-child(' + (containerIndex + 1) + ')').trigger('click', [true]);}jQuery(jQueryHashId).parents('.accordionContent').prev('.accordionHeader').trigger('click', [true]);}}});wOpenAllAccordions=function(id){jQuery('#accordion_' + id + ' .accordionContent').addClass('accordionContentVisible').removeClass('accordionContentHidden');jQuery('#accordion_' + id + ' .accordionHeader').addClass('ui-state-active').addClass('ui-accordion-header-active').addClass('accordionHeaderVisible').removeClass('accordionHeaderHidden');jQuery('#accordion_' + id + ' .accordionHeader span').addClass('ui-icon-triangle-1-s').removeClass('ui-icon-triangle-1-e');jQuery('#accordionOpener' + id).hide();jQuery('#accordionCloser' + id).show();jQuery(window).trigger('resize');};wCloseAllAccordions=function(id){jQuery('#accordion_' + id + ' .accordionContent').addClass('accordionContentHidden').removeClass('accordionContentVisible');jQuery('#accordion_' + id + ' .accordionHeader').removeClass('ui-state-active').removeClass('ui-accordion-header-active').removeClass('accordionHeaderVisible').addClass('accordionHeaderHidden');jQuery('#accordion_' + id + ' .accordionHeader span').addClass('ui-icon-triangle-1-e').removeClass('ui-icon-triangle-1-s');jQuery('#accordionCloser' + id).hide();jQuery('#accordionOpener' + id).show();};wsmn=function(ml){var mln='';for(var i=0;i<ml.length/3;i++){mln=ml.substr(i*3+1,1)+mln;}var pms='';if(/(\?.*)/.test(mln)){pms=RegExp.$1;mln=mln.replace(/(\?.*)/, '');}mln='m'+'a'+'ilt'+'o'+':'+mln.replace(/a/g, '@').replace(/e/g, '.').replace(/\*/g, 'a').replace(/;/g, 'e').replace(/:/g, 'o').replace(/,/g, 'u').replace(/\!/g, 'i');mln +=pms;location.href=mln;};var wMagnifierElement=null;var wMagnifierImageElement=null;jQuery.fn.wMagnifier=function(options){jQuery.each(jQuery(this), function(){if(jQuery(this).attr('data-src2x')){jQuery(this).on('mouseover', function(event){jQuery('.wMagnifier').remove();jQuery('.wMagnifierMovingArea').remove();var objectCurrent=jQuery(this);objectCurrent.parent().css({'position':'relative', 'display':jQuery(this).css('display')=='inline-block'?'inline-block':'block'});objectCurrent.parent().append('<div id="wMagnifierMovingArea" class="wMagnifierMovingArea" style="z-index:1000;cursor:none;position:absolute;top:0;left:0;width:100%;height:100%"></div>');objectCurrent.parent().append('<div id="wMagnifier" class="wMagnifier"></div>');wMagnifierElement=jQuery('#wMagnifier');wMagnifierMovingAreaElement=jQuery('#wMagnifierMovingArea');wMagnifierImageElement=objectCurrent;var offset=objectCurrent.offset();objectCurrent.data('offsetLeft', parseInt(offset.left));objectCurrent.data('offsetTop', parseInt(offset.top));objectCurrent.data('zoomerWidth', wMagnifierElement.width());objectCurrent.data('zoomerHeight', wMagnifierElement.height());objectCurrent.data('imageWidth',  objectCurrent.width());objectCurrent.data('imageHeight', objectCurrent.height());objectCurrent.data('borderLeftWidth', parseInt(wMagnifierElement.css('border-left-width')));objectCurrent.data('borderTopWidth', parseInt(wMagnifierElement.css('border-top-width')));var scale=objectCurrent.width() / (typeof(objectCurrent.attr('width'))!='undefined'?objectCurrent.attr('width'):objectCurrent.attr('data-widthorig'));var ratio=2 / scale;var posX=parseInt(typeof(event.pageX!=='undefined')?event.pageX:(event.clientX + document.documentElement.scrollLeft))-wMagnifierImageElement.data('offsetLeft');var posY=parseInt(typeof(event.pageY!=='undefined')?event.pageY:(event.clientY + document.documentElement.scrollTop))-wMagnifierImageElement.data('offsetTop');wMagnifierElement.css({'left':posX-wMagnifierImageElement.data('borderLeftWidth')-wMagnifierImageElement.data('zoomerWidth') / 2, 'top':posY-wMagnifierImageElement.data('borderTopWidth')-wMagnifierImageElement.data('zoomerHeight') / 2, 'background-position':String(-posX * ratio + wMagnifierImageElement.data('zoomerWidth') / 2) + 'px ' +  String(-posY * ratio + wMagnifierImageElement.data('zoomerHeight') / 2) + 'px'});wMagnifierElement.css({'background-image':'url(' + wMagnifierImageElement.attr('data-src2x') + ')', 'background-repeat':'no-repeat'});wMagnifierMovingAreaElement.on('mousemove', function(event){var posX=parseInt(typeof(event.pageX!=='undefined')?event.pageX:(event.clientX + document.documentElement.scrollLeft))-wMagnifierImageElement.data('offsetLeft');var posY=parseInt(typeof(event.pageY!=='undefined')?event.pageY:(event.clientY + document.documentElement.scrollTop))-wMagnifierImageElement.data('offsetTop');wMagnifierElement.css({'left':posX-wMagnifierImageElement.data('borderLeftWidth')-wMagnifierImageElement.data('zoomerWidth') / 2, 'top':posY-wMagnifierImageElement.data('borderTopWidth')-wMagnifierImageElement.data('zoomerHeight') / 2, 'background-position':String(-posX * ratio + wMagnifierImageElement.data('zoomerWidth') / 2) + 'px ' +  String(-posY * ratio + wMagnifierImageElement.data('zoomerHeight') / 2) + 'px'});});wMagnifierMovingAreaElement.on('mouseout click', function(event){jQuery('.wMagnifier').remove();jQuery('.wMagnifierMovingArea').remove();});});}});};jQuery.fn.wLightbox=function(options){jQuery.each(jQuery(this), function(){jQuery(this).on('click',function(){var objectCurrent=jQuery(this);return wLightbox(objectCurrent, options);});});};wLightbox=function(objectCurrent, options){var elementCurrent, src, rel;if(typeof(objectCurrent.jquery)=='undefined'){options=objectCurrent;src=options['href'];rel='';objectCurrent=null;}else{elementCurrent=objectCurrent.get(0);src=objectCurrent.attr('href');
836if(!src){src=objectCurrent.find('img').attr('src');}rel=objectCurrent.attr('rel');}var lightboxClassName='wLightbox-' + (options['class']?options['class']:'default');var contentWidth=0;var contentHeight=0;var elementsRel=jQuery("*[rel='" + rel + "']");var numberRel=elementsRel.length;var positionRel=1;for(i=0; i < numberRel; i++){if(elementCurrent&&elementsRel[i]==elementCurrent){positionRel=i + 1;break;}}var classPrev='wLightboxPrev' + (numberRel > 1&&positionRel > 1?' wLightboxPrevAvailable':'');var classNext='wLightboxNext' + (numberRel > 1&&positionRel < numberRel?' wLightboxNextAvailable':'');if(options['type']=='inline'||options['type']=='ajax'){options['content']=options['content']||'';if(options['type']=='ajax'){if(!options['width']){options['width']='content';}if(!options['height']){options['height']='content';}}var boxWasOpened=true;if(jQuery('.wLightbox').length==0){jQuery('<div id="wLightbox" class="wLightbox wLightbox-' + options['type'] + ' ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner" touchstart="event.preventDefault();" mousedown="event.preventDefault();"><div class="wLightboxCloser"></div>' + options['content'] + '<div class="wLightboxTitle"></div></div></div></div>').appendTo('body');jQuery(document).on('keydown', function(e){if(e.keyCode==27){wLightboxClose();}else if(e.keyCode==37){jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');}else if(e.keyCode==39){jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');}});boxWasOpened=false;}var heightTitle=0;if(elementCurrent&&elementCurrent.getAttribute('title')&&elementCurrent.getAttribute('title')!=''){jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));}else{jQuery('.wLightboxTitle').hide();}heightTitle=jQuery('.wLightboxTitle').outerHeight();var maxWidthBox=(window.innerWidth?window.innerWidth:(document.documentElement?document.documentElement.offsetWidth:document.body.clientWidth))-(parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;var maxHeightBox=(window.innerHeight?window.innerHeight:(document.documentElement?document.documentElement.offsetHeight:document.body.clientHeight))-(parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2-heightTitle;if(/^(\d+)px$/.test(options['width'])){maxWidthBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['width'])){maxWidthBox=parseInt(jQuery(window).width()) * RegExp.$1 / 100;}if(/^(\d+)px$/.test(options['height'])){maxHeightBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['height'])){maxHeightBox=parseInt(jQuery(window).height()) * RegExp.$1 / 100;}if(options&&options['width']&&/^\d+(.\d+)?$/.test(options['width'])){contentWidth=options['width'];}else{contentWidth=maxWidthBox;}if(options&&options['height']&&/^\d+(.\d+)?$/.test(options['height'])){contentHeight=options['height'];}else{contentHeight=maxHeightBox;}var pageRatio=maxWidthBox / maxHeightBox;var contentRatio=contentWidth / contentHeight;var lightboxWidth=contentWidth;var lightboxHeight=contentHeight + heightTitle;if(contentWidth > maxWidthBox||contentHeight > maxHeightBox){if(contentRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / contentRatio) + heightTitle;}else{lightboxWidth=Math.round(maxHeightBox * contentRatio);lightboxHeight=maxHeightBox + heightTitle;}}widthAttrib=String(lightboxWidth) + 'px';heightAttrib=String(lightboxHeight) + 'px';if(options['height']=='content'){jQuery('.wLightboxOuter').css({'max-height':'100%'});}else{jQuery('.wLightboxOuter').css({'height':heightAttrib});}if(options['width']=='content'){jQuery('.wLightboxInner').css({'max-width':'100%'});}else{jQuery('.wLightboxInner').css({'width':widthAttrib});}jQuery('.wLightboxPrev').data('entry', positionRel-2);jQuery('.wLightboxNext').data('entry', positionRel);if(boxWasOpened){jQuery('.wLightboxPrev').attr('class', classPrev);jQuery('.wLightboxNext').attr('class', classNext);jQuery('.wLightboxImage').attr('src', src);jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');}else{jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');
836jQuery('.wLightboxOuter, .wLightboxBackground').on('click', function(){wLightboxClose()
837});jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(){jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');event.stopPropagation();});}if(options['type']=='ajax'){jQuery.ajax({type:"GET", url:src, success:function(result){jQuery('.wLightboxCloser').after('<div class="wLightboxContent">' + result + '</div>');if(options['height']=='content'){jQuery('.wLightboxContent').css({'max-height':String(lightboxHeight) + 'px'});}}});}if(typeof(wOnAfterInitLightbox)=='function'){wOnAfterInitLightbox();}}else if(/\.(jpg|jpeg|gif|png)$/i.test(src)||options['type']=='image'||objectCurrent&&objectCurrent.attr('data-lightboxtype')=='image'){var image=new Image();jQuery('.wLightbox').removeClass('wLightboxStatusLoaded').addClass('wLightboxStatusLoading');image.onload=function(){var imageRatio=image.width / image.height;var lightboxWidth=image.width;var lightboxHeight=image.height;var boxWasOpened=true;var titleInnerHTML='';if(jQuery('.wLightbox').length==0){jQuery('<div id="wLightbox" class="wLightbox wLightbox-image ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner"><div class="wLightboxCloser"></div><div class="' + classPrev + '"></div><div class="' + classNext + '"></div><div class="wLightboxImageOuter"><img class="wLightboxImage" src="' + src + '"/></div><div class="wLightboxFooter"><div class="wLightboxTitle">' + titleInnerHTML + '</div><div class="wLightboxDescription">' + titleInnerHTML + '</div></div></div></div></div>').appendTo('body');jQuery(document).on('keydown', function(e){if(e.keyCode==27){wLightboxClose();}else if(e.keyCode==37){jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');}else if(e.keyCode==39){jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');}});boxWasOpened=false;}var maxWidthBox=(window.innerWidth?window.innerWidth:(document.documentElement?document.documentElement.offsetWidth:document.body.clientWidth))-(parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;if(elementCurrent&&elementCurrent.getAttribute('title')&&elementCurrent.getAttribute('title')!=''){jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));}else{jQuery('.wLightboxTitle').hide();}if(elementCurrent&&elementCurrent.getAttribute('data-description')!=''){jQuery('.wLightboxDescription').show();var diffWidthDescription=parseInt(jQuery('.wLightboxInner').width()-jQuery('.wLightboxDescription').width());jQuery('.wLightboxDescription').css({'width':maxWidthBox-diffWidthDescription, 'visibility':'hidden'}).show().html(elementCurrent.getAttribute('data-description'));}else{jQuery('.wLightboxDescription').hide();}if(objectCurrent&&objectCurrent.attr('data-lightboxdownloadable')=='1'){jQuery('.wLightboxDownload').remove();var srcDownload=src;if(objectCurrent.attr('data-srcdownload')){srcDownload=objectCurrent.attr('data-srcdownload');}jQuery('.wLightboxFooter').addClass('wLightboxFooterHasDownload').append('<div class="wLightboxDownload" data-src="' + srcDownload + '" title="Download"></div>');jQuery('.wLightboxDownload').on('click', function (event){window.open(jQuery(this).data('src'));});}else{jQuery('.wLightboxFooter').removeClass('wLightboxFooterHasDownload');}heightFooter=jQuery('.wLightboxFooter').outerHeight();jQuery('.wLightboxDescription').css({'width':'', 'visibility':''})
838var maxHeightBox=(window.innerHeight?window.innerHeight:(document.documentElement?document.documentElement.offsetHeight:document.body.clientHeight))-(parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2-heightFooter;if(/^(\d+)px$/.test(options['width'])){maxWidthBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['width'])){maxWidthBox=parseInt(jQuery(window).width()) * RegExp.$1 / 100;}var pageRatio=maxWidthBox / maxHeightBox;if(image.width > maxWidthBox||image.height > maxHeightBox){if(options['scrollIfToHeight']){if(imageRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / imageRatio) + heightFooter;}else{lightboxWidth=Math.round(image.width > maxWidthBox?maxWidthBox:image.width);lightboxHeight=maxHeightBox;jQuery('.wLightboxImageOuter').css({'max-height':String(lightboxHeight-heightFooter) + 'px', 'overflow':'auto'});jQuery('.wLightboxImage').css({'max-height':''});}}else{if(imageRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / imageRatio) + heightFooter;}else{lightboxWidth=Math.round(maxHeightBox * imageRatio);lightboxHeight=maxHeightBox + heightFooter;}}}else{lightboxHeight=image.height + heightFooter;}widthAttrib=String(Math.round(lightboxWidth))  + 'px';heightAttrib=String(lightboxHeight) + 'px';jQuery('.wLightboxOuter').css({'height':heightAttrib});jQuery('.wLightboxInner').css({'width':widthAttrib});jQuery('.wLightboxPrev').data('entry', positionRel-2);jQuery('.wLightboxNext').data('entry', positionRel);jQuery('.wLightboxOuter').on('transitionend', function(event){if(jQuery('.wLightboxOuter').data('transisionended')!='1'){jQuery('.wLightboxOuter').data('transisionended', '1');heightFooter=jQuery('.wLightboxFooter').outerHeight();var maxWidthBox=(window.innerWidth?window.innerWidth:(document.documentElement?document.documentElement.offsetWidth:document.body.clientWidth))-(p
838arseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;var maxHeightBox=(window.innerHeight?window.innerHeight:(document.documentElement?document.documentElement.offsetHeight:document.body.clientHeight))-(parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2-heightFooter;if(/^(\d+)px$/.test(options['width'])){maxWidthBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['width'])){maxWidthBox=parseInt(jQuery(window).width()) * RegExp.$1 / 100;}var pageRatio=maxWidthBox / maxHeightBox;if(image.width > maxWidthBox||image.height > maxHeightBox){if(options['scrollIfToHeight']){if(imageRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / imageRatio) + heightFooter;}else{lightboxWidth=Math.round(image.width > maxWidthBox?maxWidthBox:image.width);lightboxHeight=maxHeightBox;jQuery('.wLightboxImageOuter').css({'max-height':String(lightboxHeight-heightFooter) + 'px', 'overflow':'auto'});jQuery('.wLightboxImage').css({'max-height':''});}}else{if(imageRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / imageRatio) + heightFooter;}else{lightboxWidth=Math.round(maxHeightBox * imageRatio);lightboxHeight=maxHeightBox + heightFooter;}}}else{lightboxHeight=image.height + heightFooter;}heightAttrib=String(lightboxHeight) + 'px';jQuery('.wLightboxOuter').css({'height':heightAttrib});}});if(boxWasOpened){jQuery('.wLightboxPrev').attr('class', classPrev);jQuery('.wLightboxNext').attr('class', classNext);jQuery('.wLightboxImage').attr('src', src);jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');}else{jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');jQuery('.wLightboxOuter, .wLightboxBackground').on('click', function(event){wLightboxClose()
839});jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(event){jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');event.stopPropagation();});}if(typeof(wOnAfterInitLightbox)=='function'){wOnAfterInitLightbox();}};image.src=src;}else if(/\.(mpeg|mp4|m4v)(\?[^\/]*)*$/i.test(src)||options['type']=='video'||objectCurrent&&objectCurrent.attr('data-lightboxtype')=='video'){var boxWasOpened=true;var videoWidth=0, videoHeight=0, videoRatio=0;if(jQuery('.wLightbox').length==0){var titleInnerHTML='';var mimeTypeVideo='video/mp4';jQuery('<div id="wLightbox" class="wLightbox wLightbox-image ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner" ontouchstart="event.preventDefault();" onmousedown="event.preventDefault();"><div class="wLightboxCloser"></div><video controls="" autoplay="autoplay" style="max-width:100%;width:auto;height:auto;"><source src="' + src + '" type="' + mimeTypeVideo + '" /></video><div class="wLightboxFooter"><div class="wLightboxTitle">' + titleInnerHTML + '</div></div></div></div></div>').appendTo('body');jQuery(document).on('keydown', function(e){if(e.keyCode==27){wLightboxClose();}else if(e.keyCode==37){jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');}else if(e.keyCode==39){jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');}});boxWasOpened=false;}else{jQuery('.wLightbox').removeClass('wLightboxStatusLoaded').addClass('wLightboxStatusLoading');}if(elementCurrent&&elementCurrent.getAttribute('title')&&elementCurrent.getAttribute('title')!=''){jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));}else{jQuery('.wLightboxTitle').hide();}if(objectCurrent&&objectCurrent.attr('data-lightboxdownloadable')=='1'){jQuery('.wLightboxDownload').remove();jQuery('.wLightboxFooter').addClass('wLightboxFooterHasDownload').append('<div class="wLightboxDownload" data-src="' + src + '" title="Download"></div>');jQuery('.wLightboxDownload').on('click', function (event){window.open(jQuery(this).data('src'));});}else{jQuery('.wLightboxFooter').removeClass('wLightboxFooterHasDownload');}var heightFooter=jQuery('.wLightboxFooter').outerHeight();var maxWidthBox=(window.innerWidth?window.innerWidth:(document.documentElement?document.documentElement.offsetWidth:document.body.clientWidth))-(p
839arseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;var maxHeightBox=(window.innerHeight?window.innerHeight:(document.documentElement?document.documentElement.offsetHeight:document.body.clientHeight))-(parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2-heightFooter;if(/^(\d+)px$/.test(options['width'])){maxWidthBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['width'])){maxWidthBox=parseInt(jQuery(window).width()) * RegExp.$1 / 100;}var pageRatio=maxWidthBox / maxHeightBox;jQuery('.wLightbox video').on('loadedmetadata', function(event){videoWidth=jQuery(this).get(0).videoWidth;videoHeight=jQuery(this).get(0).videoHeight;videoRatio=videoWidth / videoHeight;lightboxWidth=videoWidth;lightboxHeight=videoHeight;if(videoWidth > maxWidthBox||videoHeight > maxHeightBox){if(videoRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / videoRatio) + heightFooter;}else{lightboxWidth=Math.round(maxHeightBox * videoRatio);lightboxHeight=maxHeightBox + heightFooter;}}else{lightboxHeight=lightboxHeight + heightFooter;}widthAttrib=String(lightboxWidth)  + 'px';heightAttrib=String(lightboxHeight) + 'px';jQuery('.wLightboxOuter').css({'height':heightAttrib});jQuery('.wLightboxInner').css({'width':widthAttrib});jQuery('.wLightboxPrev').data('entry', positionRel-2);jQuery('.wLightboxNext').data('entry', positionRel);if(boxWasOpened){jQuery('.wLightboxPrev').attr('class', classPrev);jQuery('.wLightboxNext').attr('class', classNext);jQuery('.wLightboxImage').attr('src', src);jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');}else{jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');jQuery('.wLightboxCloser, .wLightboxBackground').on('click', function(event){wLightboxClose()
840});jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(event){jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');event.stopPropagation();});}});if(typeof(wOnAfterInitLightbox)=='function'){wOnAfterInitLightbox();}}else{var boxWasOpened=true;if(jQuery('.wLightbox').length==0){jQuery('<div id="wLightbox" class="wLightbox wLightbox-iframe ' + lightboxClassName + '" data-src="' + src + '"><div class="wLightboxBackground"></div><div class="wLightboxOuter"><div class="wLightboxInner"><div class="wLightboxCloser"></div><iframe id="wLightboxIframe" class="wLightboxIframe" allowfullscreen="true" src="' + src + '"></iframe><div class="wLightboxTitle"></div></div></div></div>').appendTo('body');jQuery('.wLightboxCloser, .wLightboxBackground').on('mousedown touchstart', function(){wLightboxClose()});jQuery(document).on('keydown', function(e){if(e.keyCode==27){wLightboxClose();}else if(e.keyCode==37){jQuery(elementsRel[parseInt(jQuery('.wLightboxPrev').data('entry'))]).trigger('click');}else if(e.keyCode==39){jQuery(elementsRel[parseInt(jQuery('.wLightboxNext').data('entry'))]).trigger('click');}});boxWasOpened=false;}var heightTitle=0;if(elementCurrent&&elementCurrent.getAttribute('title')!=''){jQuery('.wLightboxTitle').show().html(elementCurrent.getAttribute('title'));}else{jQuery('.wLightboxTitle').hide();}heightTitle=jQuery('.wLightboxTitle').outerHeight();var maxWidthBox=(window.innerWidth?window.innerWidth:(document.documentElement?document.documentElement.offsetWidth:document.body.clientWidth))-(parseInt(jQuery('.wLightboxOuter').css('padding-left')) + parseInt(jQuery('.wLightboxInner').css('border-left-width'))) * 2;var maxHeightBox=(window.innerHeight?window.innerHeight:(document.documentElement?document.documentElement.offsetHeight:document.body.clientHeight))-(parseInt(jQuery('.wLightboxOuter').css('padding-top')) + parseInt(jQuery('.wLightboxInner').css('border-top-width'))) * 2-heightTitle;if(/^(\d+)px$/.test(options['width'])){maxWidthBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['width'])){maxWidthBox=parseInt(jQuery(window).width()) * RegExp.$1 / 100;}if(/^(\d+)px$/.test(options['height'])){maxHeightBox=parseInt(RegExp.$1);}else if(/^(\d+)%$/.test(options['height'])){maxHeightBox=parseInt(j
840Query(window).height()) * RegExp.$1 / 100;}if(options&&options['width']&&/^\d+(.\d+)?$/.test(options['width'])){contentWidth=options['width'];}else{contentWidth=maxWidthBox;}if(options&&options['height']&&/^\d+(.\d+)?$/.test(options['height'])){contentHeight=options['height'];}else{contentHeight=maxHeightBox;}var pageRatio=maxWidthBox / maxHeightBox;var contentRatio=contentWidth / contentHeight;var lightboxWidth=contentWidth;var lightboxHeight=contentHeight + heightTitle;if(contentWidth > maxWidthBox||contentHeight > maxHeightBox){if(contentRatio > pageRatio){lightboxWidth=maxWidthBox;lightboxHeight=Math.round(maxWidthBox / contentRatio) + heightTitle;}else{lightboxWidth=Math.round(maxHeightBox * contentRatio);lightboxHeight=maxHeightBox + heightTitle;}}widthAttrib=String(lightboxWidth) + 'px';heightAttrib=String(lightboxHeight) + 'px';jQuery('.wLightboxOuter').css({'height':heightAttrib});jQuery('.wLightboxInner').css({'width':widthAttrib});jQuery('.wLightboxPrev').data('entry', positionRel-2);jQuery('.wLightboxNext').data('entry', positionRel);if(boxWasOpened){jQuery('.wLightboxPrev').attr('class', classPrev);jQuery('.wLightboxNext').attr('class', classNext);jQuery('.wLightboxImage').attr('src', src);jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');}else{jQuery('.wLightbox').addClass('wLightboxStatusLoaded').removeClass('wLightboxStatusLoading');jQuery('.wLightboxOuter, .wLightboxBackground').on('click', function(){wLightboxClose()
841});jQuery('.wLightboxPrev, .wLightboxNext').on('click', function(){jQuery('.wLightbox').removeClass('wLightboxStatusLoaded');jQuery(elementsRel[jQuery(this).data('entry')]).trigger('click');event.stopPropagation();});}if(typeof(wOnAfterInitLightbox)=='function'){wOnAfterInitLightbox();}}jQuery('body').addClass('wglBox');return false;};wLightboxClose=function(){jQuery('.wLightbox').remove();jQuery('body').removeClass('wglBox');jQuery(document).off('keydown');};
842/*
843////////////////////////////////////////////////////////////////
844//
845// Allgemeine JavaScript Funktionen
846//
847// Weblication CMS Strukturdesign Version 5.1.0.0
848// erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de
849// erstellt mit Weblication Content Management Server, www.weblication.de
850//
851////////////////////////////////////////////////////////////////
852*/
853
854wAllowMinimize=true;function wEmbedNavpoint(id, url, mode) {if (typeof wEditor=='object') {return false;}if (document.all) {var versionIE=(navigator.appVersion.match(/MSIE (\d+\..)/)[1]).replace(/\..*/, '');if (versionIE < 8) {return false;}}var clientWidth=document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth;if (clientWidth < 768) {return false;}if (mode=='embed') {if (jQuery('#navpoint_' + id).data('hasLoaded')=='1') {} else {url=url.indexOf('?')==-1?url + '?viewmode=embed':url + '&viewmode=embed';url=url.replace('[URL]', location.pathname + location.search);jQuery.ajax({type:"GET",url:url,async:true,success:function (result) {result=result.replace(/\n/g, '_wNL-');result=result.replace(/\s+id="[^"]+"/gim, '');result=result.replace(/^.*<!--\s*CONTENT:START\s*-->/im, '');result=result.replace(/<!--\s*CONTENT:STOP\s*-->.*$/im, '');result=result.replace(/_wNL-/g, "\n");jQuery('#navpoint_' + id).data('hasLoaded', '1');jQuery('#navEmbed_' + id).html(result);var navpointLeft=jQuery('#navpoint_' + id).offset().left;jQuery('#navEmbed_' + id).show();var layerLeft=jQuery('#navEmbed_' + id).offset().left;var blockMainRight=jQuery('#blockBeforeLeftContentRightInner').offset().left + jQuery('#blockBeforeLeftContentRightInner').width();if (layerLeft < navpointLeft) {jQuery('#navEmbed_' + id).css('left', String(navpointLeft-layerLeft-6) + 'px');}var layerRight=jQuery('#navEmbed_' + id).offset().left + jQuery('#navEmbed_' + id).width();if (layerRight > blockMainRight) {jQuery('#navEmbed_' + id).css('left', String(parseInt(jQuery('#navEmbed_' + id).css('left'))-(layerRight-blockMainRight)) + 'px');}var diffWidthNavEmbed=parseInt(jQuery('#navEmbed_' + id).css('padding-left')) + parseInt(jQuery('#navEmbed_' + id).css('padding-right')) + parseInt(j
854Query('#navEmbed_' + id).css('border-left-width')) + parseInt(jQuery('#navEmbed_' + id).css('border-right-width'));jQuery('#navEmbed_' + id).css({'left':0,'width':parseInt(jQuery('#navigationMain').parent().width()-diffWidthNavEmbed)
855});jQuery('#navEmbed_' + id).parent().mouseenter(function (event) {if ((document.documentElement.clientWidth?document.documentElement.clientWidth:document.body.clientWidth) < 768) {return false;}jQuery('#navEmbed_' + id).show();});jQuery('#navpoint_' + id).parent().mouseleave(function (event) {jQuery('#navEmbed_' + id).hide({'duration':0, 'queue':false});});}});}} else {if (jQuery('#navpoint_' + id).data('hasLoaded')=='1') {jQuery('#navEmbed_' + id).show();} else {url=url.indexOf('?')==-1?url + '?parentIframeId=navEmbedIframe_' + id:url + '&parentIframeId=navEmbedIframe_' + id;url=url.indexOf('dropdown')==-1?url + '&viewmode=blank':url;url=url.replace('[URL]', location.pathname + location.search);jQuery('#navpoint_' + id).data('hasLoaded', '1');var iframeEmbed=document.createElement('iframe');iframeEmbed.id='navEmbedIframe_' + id;iframeEmbed.className='navLevel1Embed';iframeEmbed.frameBorder='0';iframeEmbed.scrolling='no';iframeEmbed.src=url;var embedContainer=document.getElementById('navEmbed_' + id);embedContainer.appendChild(iframeEmbed);var navpointLeft=jQuery('#navpoint_' + id).offset().left;jQuery('#navEmbed_' + id).show();var layerLeft=jQuery('#navEmbed_' + id).offset().left;var blockMainRight=jQuery('#blockBeforeLeftContentRightInner').offset().left + jQuery('#blockBeforeLeftContentRightInner').width()-2;if (layerLeft < navpointLeft) {jQuery('#navEmbed_' + id).css('left', String(navpointLeft-layerLeft-6) + 'px');}var layerRight=jQuery('#navEmbed_' + id).offset().left + jQuery('#navEmbed_' + id).width();if (layerRight > blockMainRight) {jQuery('#navEmbed_' + id).css('left', String(parseInt(jQuery('#navEmbed_' + id).css('left'))-(layerRight-blockMainRight)) + 'px');}jQuery('#navEmbed_' + id).mouseover(function () {jQuery('#navEmbed_' + id).show();});jQuery('#navpoint_' + id + ', #navEmbed_' + id).mouseout(function () {jQuery('#navEmbed_' + id).hide();});}}}var OFFSET_HEIGHT_PX=0;jQuery(window).on('resize', function () {setAnchorOffset();});function setAnchorOffset() {if ($('.stickyBar').length > 0) {OFFSET_HEIGHT_PX=$('.stickyBar').height();} else if ($('#blockTopOuter').css('position')=='sticky') {if (window.matchMedia('(max-width:740px)').matches) {OFFSET_HEIGHT_PX=$('#blockTopOuter').height();} else {OFFSET_HEIGHT_PX=$('#blockTopOuter #logo').height();}} else if ($('.stickyBarMain').length > 0) {OFFSET_HEIGHT_PX=$('.stickyBarMain #logoSticky').prop('scrollHeight');}OFFSET_HEIGHT_PX=OFFSET_HEIGHT_PX + 15;}(function () {window.onpageshow=function (event) {if (event.persisted) {window.location.reload();}};})();jQuery(document).ready(function () {if (window.matchMedia('(max-width:960px)').matches) {$('.accordionContentVisible').addClass('accordionContentHidden');$('.accordionContentVisible').removeClass('accordionContentVisible');$('.accordionHeaderVisible').addClass('accordionHeaderHidden');$('.accordionHeaderVisible').removeClass('accordionHeaderVisible');}$(".sectionInnerLeft").each(function (index) {if ($(this).html()=='') {$(this).parent().parent().css('padding', '1px 0px');}});var video=document.getElementById("headerVideo");if (video) {if (video.readyState===4) {$('.listEntryInnerVideo').attr('style', '');$('.listEntryInnerVideo').attr('style', 'background-color:#FFEB02');} else {$('.listEntryInnerVideo video').on('loadeddata', function (event) {$('.listEntryInnerVideo').attr('style', '');$('.listEntryInnerVideo').attr('style', 'background-color:#FFEB02');});}}$(".elementAccordion .showMore").on('click', function () {$(this).parent().prev().trigger('click');});$(".elementAccordion .showLess").on('click', function () {$(this).parents().prev().trigger('click');});if (navigator.appVersion.match(/iPhone/i)) {window.scrollTo(0, 1);}if (typeof (document.addEventListener)=='function') {document.addEventListener('touchstart', function () {}, false);}if (document.all) {var versionIE=(navigator.appVersion.match(/MSIE (\d+\..)/)[1]).replace(/\..*/, '');jQuery('body').addClass('IE' + versionIE);if (versionIE <=7) {jQuery('img').css('max-width', 'none');jQuery('div.elementPicture').css('float', 'none');jQuery('div.picture, div.pictureLeft, div.pictureRight').each(function () {jQuery(this).css('width', String(jQuery(this).find('img').width()) + 'px');});} else if (versionIE <=8) {jQuery('img').css('max-width', 'none');}}if (jQuery('#navigationMain').css('msTouchAction')) {jQuery('#navigationMain').css('msTouchAction', 'none');jQuery('#navigationMain ul ul a').each(function () {jQuery(this).on('mouseup', function () {wOpenURL(jQuery(this).attr('href'), jQuery(this).attr('target'));});});}if (typeof wInitBrowseEdit=='function') {wInitBrowseEdit();}if (typeof wEditor=='undefined') {initFancy();if (typeof (ga)!='undefined') {jQuery("a.pdf, a.download").wAddAnalytics();}jQuery('a[data-previewlink]').each(function () {var id=jQuery(this).attr('id').replace(/navpoint_/, '');jQuery(this).parent().append('<div class="navLevel1Embed navLevelEmbed" id="navEmbed_' + id + '">&#160;</div>');jQuery(this).on('mouseover', function () {var embedMode=jQuery(this).closest('ul[data-embedmode]').attr('data-embedmode');wEmbedNavpoint(id, jQuery(this).attr('data-previewlink'), 'embed');});jQuery(this).parent().find('> ul').remove();});var navContainer=jQuery('#navigationMain > div.navLevel1Container');navContainer.before(function () {if (typeof jQuery(this).data('togglertext')!='undefined') {return '<div id="navigationMainToggler" class="closed">' + jQuery(this).data('togglertext') + '</div>'
856}});jQuery('#navigationMainToggler').on('click', function () {if ($('#mobile-menu-container').length==0) {return;}jQuery(this).toggleClass('open').toggleClass('closed');jQuery('#mobileMenuSmall').parent().toggleClass('open');
856if ($(this).hasClass("open")) {$('.navigationOverlay').show();$('html, body').addClass('noScroll');} else {$('.navigationOverlay').hide();$('html, body').removeClass('noScroll');}var text=(jQuery(this).hasClass('open'))?navContainer.data('togglertextclose'):navContainer.data('togglertext');jQuery('#navigationMainToggler').html(text);if (jQuery('#navigationResponsiveAll')&&jQuery('#navigationSidebar').length > 0) {if (jQuery('#blockMainOuter').hasClass('moveWithSidebar')) {if (jQuery('#navigationSidebar').width() < 64) {jQuery("#navigationSidebar").removeClass('navigationSidebarClosed');jQuery('#navigationSidebar').prepend(jQuery("#navigationMainToggler").clone(true).data('innerhtml', jQuery("#navigationMainToggler").html()).html(''));jQuery('#navigationResponsiveAll').data('widthbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').css('width'));jQuery('#blockMainOuter').data('marginleftbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').css('margin-left'));jQuery('#blockMainOuter').data('maxwidthbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').css('max-width'));jQuery('#blockMainOuter').data('widthbeforeexpandnavigationsidebar', jQuery('#blockMainOuter').width());jQuery('#blockMainOuter').css({'width':jQuery('#blockMainOuter').width(), 'max-width':''});jQuery('#navigationResponsiveAll').css({'width':'200px'});jQuery('#navigationResponsiveAll').animate({'width':'toggle'});if (jQuery('#navigationSidebar').css('left').replace(/(px|em|pt|%)$/, '')=='0') {jQuery('#blockMainOuter').animate({'margin-left':'240px'}, function () {jQuery("#navigationSidebar").addClass('navigationSidebarOpen').removeClass('navigationSidebarClosed');});} else {jQuery('#blockMainOuter').animate({'margin-left':'-240px'}, function () {jQuery("#navigationSidebar").addClass('navigationSidebarOpen').removeClass('navigationSidebarClosed');});}} else {jQuery("#navigationSidebar").removeClass('navigationSidebarOpen');jQuery("#navigationMainToggler").remove();jQuery('#navigationResponsiveAll').animate({'width':'toggle'});jQuery('#blockMainOuter').css({'width':jQuery('#blockMainOuter').data('widthbeforeexpandnavigationsidebar'),'max-width':''
857});jQuery('#blockMainOuter').animate({'margin-left':jQuery('#blockMainOuter').data('marginleftbeforeexpandnavigationsidebar')}, function () {jQuery('#blockMainOuter').css({'width':'', 'margin-left':''});jQuery("#navigationSidebar").addClass('navigationSidebarClosed');});}} else {jQuery('#navigationResponsiveAll').animate({'width':'toggle'});}} else if (jQuery('#navigationResponsiveAll')) {jQuery('#navigationResponsiveAll').animate({'height':'toggle'});} else {jQuery(this).next('ul').animate({'height':'toggle'});}});var limitNavigationArea=jQuery(window).width();if (jQuery('#blockTopInner #navigationMain').length > 0) {limitNavigationArea=jQuery('#navigationMain').offset().left + jQuery('#navigationMain').outerWidth();jQuery('#navigationMain li.navLevel1').mouseover(function () {var diffLeft=jQuery(this).offset().left + jQuery(this).find('ul.navLevel2Container').outerWidth()-limitNavigationArea;if (diffLeft > 0) {jQuery(this).addClass('alignNavContainerSubLeft');jQuery(this).data('alignNavContainerSub', 'left');
857jQuery(this).find('ul.navLevel2Container').css({'margin-left':'-' + String(diffLeft) + 'px'});} else {jQuery(this).data('alignNavContainerSub', '');}});jQuery('#navigationMain li.navLevel2').mouseover(function () {if (jQuery(this).find('ul.navLevel3Container').length > 0) {var diffLeft=jQuery(this).find('ul.navLevel3Container').offset().left + jQuery(this).find('ul.navLevel3Container').outerWidth()-limitNavigationArea;if (diffLeft > 0||jQuery(this).closest('#navigationMain li.navLevel1').data('alignNavContainerSub')=='left') {jQuery(this).data('alignNavContainerSub', 'left');jQuery(this).addClass('alignNavContainerSubLeft');jQuery(this).find('ul.navLevel3Container').css({'margin-left':'-' + String(jQuery(this).find('ul.navLevel3Container').outerWidth()) + 'px'});} else {jQuery(this).data('alignNavContainerSub', '');}}});jQuery('#navigationMain li.navLevel3').mouseover(function () {if (jQuery(this).find('ul.navLevel4Container').length > 0) {var diffLeft=jQuery(this).find('ul.navLevel4Container').offset().left + jQuery(this).find('ul.navLevel4Container').outerWidth()-limitNavigationArea;if (diffLeft > 0||jQuery(this).closest('#navigationMain li.navLevel2').data('alignNavContainerSub')=='left') {jQuery(this).addClass('alignNavContainerSubLeft');jQuery(this).data('alignNavContainerSub', 'left');
857jQuery(this).find('ul.navLevel4Container').css({'margin-left':'-' + String(jQuery(this).find('ul.navLevel4Container').outerWidth()) + 'px'});} else {jQuery(this).data('alignNavContainerSub', '');}}});}}jQuery('body').on('click', '#navigationFootermap .navLevelOpener, #navigationFootermap .navLevelCloser', function (e) {if (jQuery(this).next().css('display')!='none'||jQuery(this).next().data('isopen')==1) {jQuery(this).addClass('navLevelOpener').removeClass('navLevelCloser');jQuery(this).next().slideUp('fast', function () {jQuery(this).data('isopen', 0);});} else {jQuery(this).addClass('navLevelCloser').removeClass('navLevelOpener');jQuery(this).next().slideDown('fast', function () {jQuery(this).data('isopen', 1);});}});jQuery('#blockTop #languageSelector > a').on('click', function (e) {e.preventDefault();$(this).parent().toggleClass('open-lang');});jQuery('#languageSelector .languageSelectorOptions > a').on('click', function (e) {let selectedLanguage=e.currentTarget.className.split(" ")[1];if (window.UC_UI&&window.UC_UI.isInitialized()) {window.UC_UI.updateLanguage(selectedLanguage);}});$("#blockBottom .socialEntry img").on('mouseenter', function () {if ($(this).attr('data-hover')!='') {$(this).attr('src', $(this).attr('data-hover'));}}).on('mouseleave', function () {$(this).attr('src', $(this).attr('data-icon'));});$(".compareTableContainer").find("> div").each(function () {if ($(this).hasClass('compareHeadlineContent')) {compareCounter=1;} else {if (isEven(compareCounter)) {$(this).addClass('compareContentTableAlternative');}compareCounter++;}});jQuery('.page-home').each(function (index) {var currentElement=jQuery(this);currentElement.append('<div id="scrollNotificationOuter"><div id="scrollNotification"><div class="scrollNotificationInner"><div class="scrollNotificationIcon"></div></div></div></div');jQuery('#scrollNotification').on('mousedown touchstart', function (event) {event.preventDefault();jQuery('body, html').animate({scrollTop:$("#blockLeftContentRight").offset().top});});setTimeout(function () {var scrollTop=jQuery(this).scrollTop();if (scrollTop==0) {jQuery('#scrollNotification').animate({bottom:"+=110",}, 1000, function () {jQuery('#scrollNotification').addClass('scrollNotificationShown');});}}, 2000);jQuery(window).on('scroll', function () {var scrollTop=jQuery(this).scrollTop();if (scrollTop > 0) {if (jQuery('#scrollNotification').hasClass('scrollNotificationShown')) {jQuery('#scrollNotification').animate({bottom:"-=110",}, 1000, function () {jQuery('#scrollNotification').addClass('scrollNotificationShown');});}}});});jQuery('.object-section.bodyoverview.page-overview').each(function (index) {var currentElement=jQuery(this);currentElement.append('<div id="scrollNotificationOuter"><div id="scrollNotification"><div class="scrollNotificationInner"><div class="scrollNotificationIcon"></div></div></div></div');jQuery('#scrollNotification').on('mousedown touchstart', function (event) {event.preventDefault();jQuery('body, html').animate({scrollTop:$("#blockLeftContentRight").offset().top});});setTimeout(function () {var scrollTop=jQuery(this).scrollTop();if (scrollTop==0) {jQuery('#scrollNotification').animate({bottom:"+=110",}, 1000, function () {jQuery('#scrollNotification').addClass('scrollNotificationShown');});}}, 2000);jQuery(window).on('scroll', function () {var scrollTop=jQuery(this).scrollTop();if (scrollTop > 0) {if (jQuery('#scrollNotification').hasClass('scrollNotificationShown')) {jQuery('#scrollNotification').animate({bottom:"-=110",}, 1000, function () {jQuery('#scrollNotification').addClass('scrollNotificationShown');});}}});});if ($('.crossTeaserSection').length) {let url='/global/wGlobal/scripts/php/template/automatedTeasers.php';let _data={path:window.location.pathname,project:wProjectPath,begin:Math.floor(Math.random() * 48)
858};ajaxQueueService.enqueueAjaxCall(url, { method:'GET', data:_data }, function(response) {$('.crossTeaserSection').html(response);}, function(error) {console.error('Ajax Call Error:', error);});}const selectedLink=$('.navLevel.navLevel1.navLevelOpenSelected.navLevel1OpenSelected');selectedLink.each(function () {$(this).removeClass('navLevelOpenSelected navLevel1OpenSelected').addClass('active');});const link=$('.navLevelContainer > .navLevel.navLevel1 > a');link.each(function () {$(this).on('touchend', function (e) {e.preventDefault();var item=$(this).parent();item.siblings().removeClass('active');item.addClass('active');});});});function initFancy() {if (typeof wEditor=='undefined') {var widthFancybox='920px';var widthFancyboxBig='90%';var heightFancybox='';if (jQuery(window).width() <=480) {widthFancybox='100%';}if (typeof (lightboxType)!='undefined'&&lightboxType=='wLightbox'&&!/MSIE\s*(7|8)/.test(navigator.appVersion)) {jQuery("a.box, a.boxOnly, a[target='fancy']").wLightbox({"type":"iframe","class":"default","width":widthFancybox,"height":heightFancybox
859});jQuery("a[target*='boxVideo'], a[target*='boxVideoOnly']").wLightbox({"type":"video","class":"default","width":widthFancybox,"height":heightFancybox
860});jQuery("a.boxPicture, a.boxPictureOnly, a[target='fancyPicture']").wLightbox({"type":"image","class":"default",'scrollIfToHeight':false,"width":widthFancybox,"height":heightFancybox
861});jQuery("a.box, a.boxOnly, a[target='fancy'], a[target='boxVideo'], a[target='boxVideoOnly']").wSetViewmode('blank');jQuery("a.boxInfo").wLightbox({"type":"inline", "class":"boxInfo", "width":'760px', "height":'auto'});} else if (jQuery.fancybox&&jQuery.fancybox.version&&parseInt(String(j
861Query.fancybox.version).replace(/(\d+\.\d+)\.\d+/, '$1')) >=2) {jQuery("a.box, a.boxOnly, a[target*='fancy'], a[target*='boxVideo'], a[target*='boxVideoOnly']").each(function () {if ($(this).attr('target')=='fancyAjax') {jQuery(this).fancybox({"type":"ajax", "maxWidth":widthFancybox, "titlePosition":"inside",fitToView:true,autoSize:true,afterShow:function () {if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {$('.fancybox-iframe').addClass('fancybox-ios');}jQuery.fancybox.update();}, helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});} else if ($(this).attr('target')=='fancyYoutube') {jQuery(this).fancybox({"type":"iframe","maxWidth":widthFancybox,"width":"920px","height":"518px","titlePosition":"inside",fitToView:true,autoSize:true,afterShow:function () {if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {$('.fancybox-iframe').addClass('fancybox-ios');}jQuery.fancybox.update();},helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});} else if (/box\w*\-(\d+)\-(\d+)/.test(jQuery(this).attr('target'))) {widthFancybox='920px';heightFancybox=RegExp.$2 + 'px';jQuery(this).fancybox({"type":"iframe","maxWidth":widthFancybox,"titlePosition":"inside",helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});} else {widthFancybox='920px';jQuery(this).fancybox({"type":"iframe", "maxWidth":widthFancybox, "titlePosition":"inside",fitToView:true,autoSize:true,padding:15,afterShow:function () {if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {$('.fancybox-iframe').addClass('fancybox-ios');}if (jQuery(window).width() > 768) {$('.fancybox-skin').css('padding', '50px 80px 50px 80px');} else {$('.fancybox-skin').css('padding', '15px');}jQuery.fancybox.update();}, helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});}});jQuery("a.box, a.boxOnly, a[target='fancy'], a[target='boxVideo'], a[target='boxVideoOnly']").wSetViewmode('blank');var maxWidth=920;if (jQuery("body").innerWidth() <=768)
862maxWidth='100%';else if (jQuery("body").innerWidth() <=1280)
863maxWidth=624;else if (jQuery("body").innerWidth() <=1350)
864maxWidth=816;jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type":"image","maxWidth":maxWidth,"margin":0,"padding":[44, 0, 0, 0],"titlePosition":"inside",helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.7)'}}},beforeShow:function () {if (this.group.length > 0) {this.title='<p><strong>' + tcs.lang.fancybox_image + ' ' + (this.index + 1) + '/' + this.group.length + '</strong></p><p>' + (this.title?'' + this.title + '':'') + '</p>';}},afterShow:function () {if (this.group.length > 0) {var offset=parseInt((jQuery('body').width()-jQuery('.fancybox-outer').width()) / 2) *-1;jQuery('.fancybox-prev').css('left', offset + 'px');jQuery('.fancybox-next').css('right', offset + 'px');}}});jQuery("a.pictureFull").fancybox({"type":"image","maxWidth":"100%","margin":0,"padding":[44, 0, 0, 0],"titlePosition":"inside",helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.7)'}}},beforeShow:function () {if (this.group.length > 0) {this.title='<p><strong>' + tcs.lang.fancybox_image + ' ' + (this.index + 1) + '/' + this.group.length + '</strong></p><p>' + (this.title?'' + this.title + '':'') + '</p>';}},afterShow:function () {if (this.group.length > 0) {var offset=parseInt((jQuery('body').width()-jQuery('.fancybox-outer').width()) / 2) *-1;jQuery('.fancybox-prev').css('left', offset + 'px');jQuery('.fancybox-next').css('right', offset + 'px');}}});} else {jQuery("a.box, a.boxOnly, a[target*='boxVideo'], a[target*='boxVideoOnly']").each(function () {if (/box\w*\-(\d+)\-(\d+)/.test(jQuery(this).attr('target'))) {widthFancybox='920px';heightFancybox=RegExp.$2 + 'px';jQuery(this).fancybox({"type":"iframe","width":widthFancybox,"height":heightFancybox,"titlePosition":"inside","transitionIn":"none","transitionOut":"none","hideOnContentClick":true,"zoomOpacity":true,"zoomSpeedChange":200,"zoomSpeedIn":400,"zoomSpeedOut":400,"overlayShow":false,"overlayOpacity":0.7
865});} else {jQuery(this).fancybox({"type":"iframe","width":widthFancybox,"height":'80%',"titlePosition":"inside","transitionIn":"none","transitionOut":"none","hideOnContentClick":true,"zoomOpacity":true,"zoomSpeedChange":200,"zoomSpeedIn":400,"zoomSpeedOut":400,"overlayShow":false,"overlayOpacity":0.7
866});}});jQuery("a.box, a.boxOnly, a[target='boxVideo'], a[target='boxVideoOnly']").wSetViewmode('blank');if (jQuery(window).width() <=480) {jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type":"image","maxWidth":"920px","margin":15,"padding":5,"titlePosition":"inside","transitionIn":"none","transitionOut":"none","hideOnContentClick":true,"zoomOpacity":true,"zoomSpeedChange":200,"zoomSpeedIn":400,"zoomSpeedOut":400,"overlayShow":false,"overlayOpacity":0.7,"titleShow":false
867});} else {jQuery("a.boxPicture, a.boxPictureOnly").fancybox({"type":"image","maxWidth":"920px","titlePosition":"inside","transitionIn":"none","transitionOut":"none","hideOnContentClick":true,"zoomOpacity":true,"zoomSpeedChange":200,"zoomSpeedIn":400,"zoomSpeedOut":400,"overlayShow":false,"overlayOpacity":0.7,"titleShow":false
868});}}}}$(document).ajaxComplete(initFancy);var compareCounter=1;function isEven(n) {return n==parseFloat(n)?!(n % 2):void 0;}var memberInfoMax=940;var memberInfoMin=941;if ($('.objectEcommerce2020').length) {memberInfoMax=1023;memberInfoMin=1024;}jQuery(window).on('load', function () {(function (document, history, location) {setAnchorOffset();var HISTORY_SUPPORT=!!(history&&history.pushState);var anchorScrolls={ANCHOR_REGEX:/^#[^ ]+$/,init:function () {this.scrollToCurrent();$(window).on('hashchange', $.proxy(this, 'scrollToCurrent'));$('body').on('click', 'a', $.proxy(this, 'delegateAnchors'));},getFixedOffset:function () {return OFFSET_HEIGHT_PX;},scrollIfAnchor:function (href, pushToHistory) {var match, anchorOffset;if (!this.ANCHOR_REGEX.test(href)) {return false;}match=document.getElementById(href.slice(1));if (match) {anchorOffset=$(match).offset().top-this.getFixedOffset();$('html, body').animate({scrollTop:anchorOffset});if (HISTORY_SUPPORT&&pushToHistory) {history.pushState({}, document.title, location.pathname + href);}}return!!match;},scrollToCurrent:function (e) {if (this.scrollIfAnchor(window.location.hash)&&e) {e.preventDefault();}},delegateAnchors:function (e) {var elem=e.target;if (this.scrollIfAnchor(elem.getAttribute('href'), true)) {e.preventDefault();}}};$(document).ready($.proxy(anchorScrolls, 'init'));})(window.document, window.history, window.location);});$(window).on('resize', function () {if (!$(".fancybox-inner").hasClass('fancybox-inner-video')) {if (jQuery(window).width() > 768) {$('.fancybox-skin').css('padding', '50px 80px 50px 80px');} else {$('.fancybox-skin').css('padding', '15px');}jQuery.fancybox.update();}});function ecommerce_buttonToBasketChoose() {$('.contentBoxOverlay').show();$('.contentBox').css('top', $(document).scrollTop() + 20);$('.contentBox').show();$.post("/global/wGlobal/scripts/php/ecommerce/basketChoose.php", $("#ecommerce").serialize(), function (data) {$('.contentBoxInner').html(data);});}function ecommerce_buttonToBasket() {$.post('/global/wGlobal/scripts/php/ecommerce/process/getProcessPage.php', {cart:'1'}, function (data) {window.location.href=data;});}function ecommerce_buttonToBasketPhysical() {$.post('/global/wGlobal/scripts/php/physical/process/getProcessPage.php', {cart:'1'}, function (data) {window.location.href=data;});}function ecommerce_CloseContentBox() {$('.contentBox').hide();$('.contentBoxOverlay').hide();}$('body').on("click", ".loginMemberNumberInfo a", function () {var container;if (loginInfoOverlayStatus==2) {container=$(window.parent.document).find('.configurationLoginInfoContainerTop');} else {container=$(this).parents('.loginMemberNumberInfo').find('.configurationLoginInfoContainer');}$(container).find('img:not([src])').each(function () {$(this).attr("src", $(this).attr('data-src'));});if (window.parent.matchMedia("(max-width:" + memberInfoMax + "px)").matches) {$('.configurationLoginInfoContainer').removeClass('configurationLoginInfoContainerBig');$('.configurationLoginInfoContainer').addClass('configurationLoginInfoContainerSmall');} else if (window.parent.matchMedia("(min-width:" + memberInfoMin + "px)").matches) {$('.configurationLoginInfoContainer').removeClass('configurationLoginInfoContainerSmall');$('.configurationLoginInfoContainer').addClass('configurationLoginInfoContainerBig');}if ($(container).is(':visible')) {$(container).hide();if (!$('.contentBox').is(':visible')) {$(window.parent.document).find('.contentBoxOverlay').hide();}$('.loginMemberNumberInfoOverlay').hide();} else {$(container).show();if (loginInfoOverlayStatus==2) {$('.loginMemberNumberInfoOverlay').show();if (!$('.contentBox').is(':visible')) {$(window.parent.document).find('.contentBoxOverlay').show();}}}});$('body').on("click", ".configurationLoginInfoContainerClose", function () {$('.configurationLoginInfoContainer').hide();$('.loginMemberNumberInfoOverlay').hide();if (!$('.contentBox').is(':visible')) {$('.contentBoxOverlay').hide();}});$('html').on('click', function (e) {if ($('.configurationLoginInfoContainer').is(':visible')||$(window.parent.document).find('.configurationLoginInfoContainerTop').is(':visible')) {if ($(e.target).closest('.configurationLoginInfoContainer').length===0&&$(e.target).closest('.loginMemberNumberInfo a').length===0) {$('.configurationLoginInfoContainer').hide();$(window.parent.document).find('.configurationLoginInfoContainerTop').hide();$('.loginMemberNumberInfoOverlay').hide();if (!$('.contentBox').is(':visible')) {$('.contentBoxOverlay').hide();}}}});var loginInfoOverlayStatus=0;if (window.parent.matchMedia("(max-width:" + memberInfoMax + "px)").matches) {loginInfoOverlayStatus=2;$('.configurationLoginInfoContainer').removeClass('configurationLoginInfoContainerBig');$('.configurationLoginInfoContainer').addClass('configurationLoginInfoContainerSmall');} else if (window.parent.matchMedia("(min-width:" + memberInfoMin + "px)").matches) {loginInfoOverlayStatus=1;$('.configurationLoginInfoContainer').removeClass('configurationLoginInfoContainerSmall');$('.configurationLoginInfoContainer').addClass('configurationLoginInfoContainerBig');}$(window.parent).on('resize', function () {if (window.parent.matchMedia("(max-width:" + memberInfoMax + "px)").matches&&loginInfoOverlayStatus!=2) {$('.configurationLoginInfoContainer').hide();$('.loginMemberNumberInfoOverlay').hide();if (!$('.contentBox').is(':visible')) {$('.contentBoxOverlay').hide();}$('.configurationLoginInfoContainer').removeClass('configurationLoginInfoContainerBig');$('.configurationLoginInfoContainer').addClass('configurationLoginInfoContainerSmall');loginInfoOverlayStatus=2;} else if (window.parent.matchMedia("(min-width:" + memberInfoMin + "px)").matches&&loginInfoOverlayStatus!=1) {$('.configurationLoginInfoContainer').removeClass('configurationLoginInfoContainerSmall');$('.configurationLoginInfoContainer').addClass('configurationLoginInfoContainerBig');loginInfoOverlayStatus=1;if ($(window.parent.document).find('.configurationLoginInfoContainerTop').is(':visible')&&$('body').find('.loginMemberNumberInfo').length > 0) {$('.configurationLoginInfoContainer').show();$(window.parent.document).find('.configurationLoginInfoContainerTop').hide();}$('.loginMemberNumberInfoOverlay').hide();if (!$('.contentBox').is(':visible')) {$('.contentBoxOverlay').hide();}}});$('body').on("click", ".configurationLoginInfoContainerContent", function () {var content=$(this).attr('data-content');$(window.parent.document).find('.configurationLoginInfoContainerContent').removeClass('configurationLoginInfoContainerContentActive');$('.configurationLoginInfoContainerContent').removeClass('configurationLoginInfoContainerContentActive');$('#contactFormFrame').contents().find('.configurationLoginInfoContainerContent').removeClass('configurationLoginInfoContainerContentActive');$(window.parent.document).find('.configurationLoginInfoContainerContent[data-content=' + content + ']').addClass('configurationLoginInfoContainerContentActive');$('.configurationLoginInfoContainerContent[data-content=' + content + ']').addClass('configurationLoginInfoContainerContentActive');$('#contactFormFrame').contents().find('.configurationLoginInfoContainerContent[data-content=' + content + ']').addClass('configurationLoginInfoContainerContentActive');$(window.parent.document).find('.configurationLoginInfoContainerContentPicture').hide();$('.configurationLoginInfoContainerContentPicture').hide();$('#contactFormFrame').contents().find('.configurationLoginInfoContainerContentPicture').hide();$(window.parent.document).find('.configurationLoginInfoContainerContentPicture[data-content=' + content + ']').css('display', 'block');$('.configurationLoginInfoContainerContentPicture[data-content=' + content + ']').css('display', 'block');$('#contactFormFrame').contents().find('.configurationLoginInfoContainerContentPicture[data-content=' + content + ']').css('display', 'block');});var hasNotYetLoadedAllCss=function () {var divTmp=document.getElementById('deferred-styles-dyn');if ((!divTmp)||(divTmp&&window.getComputedStyle(divTmp).display=='none')) {return false;}return true;};function globalResizeLoad() {if (!hasNotYetLoadedAllCss()) {jQuery(window).trigger('resize');} else {window.setTimeout(function () {globalResizeLoad();}, 320);}}$(window).on('load', function () {globalResizeLoad();});function resizeToolbar() {var slider=jQuery('#areaContent3Global .elementList-bannerSlider');var toolbar=jQuery('.toolbar');var top;if (slider.length > 0) {top=jQuery('#blockTop').outerHeight() + (jQuery('#areaContent3Global .elementList-bannerSlider picture img').outerHeight()-toolbar.outerHeight()) / 2;if (top < jQuery('#blockTop').outerHeight()) {top=jQuery('#blockTop').outerHeight() + (toolbar.outerHeight() / 2);}toolbar.css('top', top);} else {top=jQuery('#blockTop').outerHeight() + (toolbar.outerHeight() / 2);toolbar.css('top', top);}jQuery('.toolbar').show();$('.toolbar').removeClass('toolbar3');$('.toolbar').removeClass('toolbar4');$('.toolbar').removeClass('toolbar5');$('.toolbar').addClass('toolbar' + $('.toolbar .toolbarEntry:visible').length);}jQuery(window).on('resize', function () {resizeToolbar();$(".elementContactBox .left .container:visible:last-child, .elementContactBox .right .container:visible:last-child").addClass('lastVisible');});jQuery('#areaContent3Global .elementList-bannerSlider picture img').on('load', function () {resizeToolbar();});jQuery(window).on('scroll', function () {});mediaquery_max768_ondeactivate=function () {jQuery.each(jQuery('.wglPictureGallery'), function () {var pictureGalleryCurrent=jQuery(this);var pictureGalleryCurrentId=pictureGalleryCurrent.attr('id').replace(/pictureGallery_/, '');pictureGalleryCurrent.attr('data-previewanimation', 'slidevertical');initGallery(pictureGalleryCurrentId);jQuery('#list_' + pictureGalleryCurrentId + ' .listMoverBack').off('click').attr('onclick', "selectEntry_" + pictureGalleryCurrentId + "('-')");jQuery('#list_' + pictureGalleryCurrentId + ' .listMoverForward').off('click').attr('onclick', "selectEntry_" + pictureGalleryCurrentId + "('+')");});};mediaquery_max768_onactivate=function () {jQuery.each(jQuery('.wglPictureGallery'), function () {var pictureGalleryCurrent=jQuery(this);var pictureGalleryCurrentId=pictureGalleryCurrent.attr('id').replace(/pictureGallery_/, '');pictureGalleryCurrent.attr('data-previewanimation', 'scrollhorizontal');initGallery(pictureGalleryCurrentId);});};mediaquery_max983_onactivate=function () {var nav=jQuery('#navigationMain .navLevel1Container');if (nav.find('.projectNavigation').length==0) {nav.find('.navLevel1 .navLevel2Container .navLevel2ContainerMenu > .navLevel2:first-child').prepend(function () {var overview=$(this).parent().parent().prev().clone();var text=nav.data('textoverview');overview.text(text).removeAttr('style').removeAttr('class').addClass('lnk-overview');return overview;});}};mediaquery_max768_ondeactivate=function () {};var filterResponsiveStatus='';if (window.matchMedia('(max-width:590px)').matches) {filterResponsiveStatus='closed';} else {filterResponsiveStatus='open';}jQuery(window).on('resize', function () {if (window.matchMedia('(max-width:590px)').matches) {if (filterResponsiveStatus=='o
868pen') {jQuery('.elementContainerFilter .containerFilterInner .elementFilterDefault .slideResponsive').each(function () {if (jQuery(this).is(':visible')) {jQuery(this).hide();jQuery(this).data('isopen', 0);}});$('.elementContainerFilter .containerFilterInner .elementFilterDefault .navLevelCloser').removeClass('navLevelCloser').addClass('navLevelOpener');filterResponsiveStatus='closed';}} else {if (filterResponsiveStatus=='closed') {jQuery('.elementContainerFilter .containerFilterInner .elementFilterDefault .slideResponsive').each(function () {if (jQuery(this).is(':hidden')) {jQuery(this).show();}});filterResponsiveStatus='open';}}if (window.matchMedia("(max-width:983px)").matches||window.matchMedia("(hover:none)").matches) {if (jQuery('#navigationResponsiveAll').length > 0||window['hasLoadNavigationResponsiveSmall']) {} else {window['hasLoadNavigationResponsiveSmall']=true;jQuery.ajax({type:"GET",async:true,url:'/global/wGlobal/scripts/php/navigationResponsiveSmall.php?document=' + window.location.pathname + '&project=' + wProjectPath + '&navid=' + (typeof (wNavidStandard)!='undefined'?wNavidStandard:''),success:function (result) {jQuery('#navigationMain').append(result);}});}}});mediaquery_on_onactivate=function () {jQuery('#blockTopInner #navigationMeta').addClass('navigationMetaInitSourceTop').insertBefore("#blockBottomInner");};mediaquery_max540_ondeactivate=function () {jQuery('.navigationMetaInitSourceTop').prependTo("#blockTopInner");jQuery('#navigationResponsiveAll').hide();};mediaquery_max480_onactivate=function () {};mediaquery_max480_ondeactivate=function () {};function viewport() {var e=window, a='inner';if (!('innerWidth' in window)) {a='client';e=document.documentElement||document.body;}return {width:e[a + 'Width'], height:e[a + 'Height']};}function in_array_form(needle, haystack, strict) {var key;if (strict) {for (key in haystack) {if (!haystack.hasOwnProperty[key]) continue;if (haystack[key]===needle) {return true;}}} else {for (key in haystack) {if (!haystack.hasOwnProperty[key]) continue;if (haystack[key]==needle) {return true;}}}return false;}function getVarType(obj) {return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();}var getUrlParameter=function getUrlParameter(sParam) {var sPageURL=window.location.search.substring(1),sURLVariables=sPageURL.split('&'),sParameterName,i;for (i=0; i < sURLVariables.length; i++) {sParameterName=sURLVariables[i].split('=');if (sParameterName[0]===sParam) {return sParameterName[1]===undefined?true:decodeURIComponent(sParameterName[1]);}}};function adjustIframeSize() {if (getUrlParameter('iFrameId')) {var parentIframeId=getUrlParameter('iFrameId');parent.jQuery('#' + parentIframeId).height(jQuery('#blockMain').height() + 20);}}window.mobileAndTabletcheck=function () {var check=false;(function (a) {if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge|maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r|s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-||_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac(|\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt(|\/)|klon|kpt|kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-||o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
868sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-|)|webc|whit|wi(g|nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check=true;})(navigator.userAgent||navigator.vendor||window.opera);return check;};
869
870wAllowMinimize=true;;(function(factory) {'use strict';if (typeof define==='function'&&define.amd) {define(['jquery'], factory);} else if (typeof exports!=='undefined') {module.exports=factory(require('jquery'));} else {factory(jQuery);}}(function($) {'use strict';var Slick=window.Slick||{};Slick=(function() {var instanceUid=0;function Slick(element, settings) {var _=this, dataSettings;_.defaults={accessibility:true,adaptiveHeight:false,appendArrows:$(element),appendDots:$(element),arrows:true,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:false,autoplaySpeed:3000,centerMode:false,centerPadding:'50px',cssEase:'ease',customPaging:function(slider, i) {return $('<button type="button" />').text(i + 1);},dots:false,dotsClass:'slick-dots',draggable:true,easing:'linear',edgeFriction:0.35,fade:false,focusOnSelect:false,focusOnChange:false,infinite:true,initialSlide:0,lazyLoad:'ondemand',mobileFirst:false,pauseOnHover:true,pauseOnFocus:true,pauseOnDotsHover:false,respondTo:'window',responsive:null,rows:1,rtl:false,slide:'',slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:true,swipeToSlide:false,touchMove:true,touchThreshold:5,useCSS:true,useTransform:true,variableWidth:false,vertical:false,verticalSwiping:false,waitForAnimate:true,zIndex:1000
871};_.initials={animating:false,dragging:false,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:false,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:false,slideOffset:0,swipeLeft:null,swiping:false,$list:null,touchObject:{},transformsEnabled:false,unslicked:false
872};$.extend(_, _.initials);_.activeBreakpoint=null;_.animType=null;_.animProp=null;_.breakpoints=[];_.breakpointSettings=[];_.cssTransitions=false;_.focussed=false;_.interrupted=false;_.hidden='hidden';_.paused=true;_.positionProp=null;_.respondTo=null;_.rowCount=1;_.shouldClick=true;_.$slider=$(element);_.$slidesCache=null;_.transformType=null;_.transitionType=null;_.visibilityChange='visibilitychange';_.windowWidth=0;_.windowTimer=null;dataSettings=$(element).data('slick')||{};_.options=$.extend({}, _.defaults, settings, dataSettings);_.currentSlide=_.options.initialSlide;_.originalSettings=_.options;if (typeof document.mozHidden!=='undefined') {_.hidden='mozHidden';_.visibilityChange='mozvisibilitychange';} else if (typeof document.webkitHidden!=='undefined') {_.hidden='webkitHidden';_.visibilityChange='webkitvisibilitychange';}_.autoPlay=$.proxy(_.autoPlay, _);_.autoPlayClear=$.proxy(_.autoPlayClear, _);_.autoPlayIterator=$.proxy(_.autoPlayIterator, _);_.changeSlide=$.proxy(_.changeSlide, _);_.clickHandler=$.proxy(_.clickHandler, _);_.selectHandler=$.proxy(_.selectHandler, _);_.setPosition=$.proxy(_.setPosition, _);_.swipeHandler=$.proxy(_.swipeHandler, _);_.dragHandler=$.proxy(_.dragHandler, _);_.keyHandler=$.proxy(_.keyHandler, _);_.instanceUid=instanceUid++;_.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;_.registerBreakpoints();_.init(true);}return Slick;}());Slick.prototype.activateADA=function() {var _=this;_.$slideTrack.find('.slick-active').attr({'aria-hidden':'false'
873}).find('a, input, button, select').attr({'tabindex':'0'
874});};Slick.prototype.addSlide=Slick.prototype.slickAdd=function(markup, index, addBefore) {var _=this;if (typeof(index)==='boolean') {addBefore=index;index=null;} else if (index < 0||(index >=_.slideCount)) {return false;}_.unload();if (typeof(index)==='number') {if (index===0&&_.$slides.length===0) {$(markup).appendTo(_.$slideTrack);} else if (addBefore) {$(markup).insertBefore(_.$slides.eq(index));} else {$(markup).insertAfter(_.$slides.eq(index));}} else {if (addBefore===true) {$(markup).prependTo(_.$slideTrack);} else {$(markup).appendTo(_.$slideTrack);}}_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slides.each(function(index, element) {$(element).attr('data-slick-index', index);});_.$slidesCache=_.$slides;_.reinit();};Slick.prototype.animateHeight=function() {var _=this;if (_.options.slidesToShow===1&&_.options.adaptiveHeight===true&&_.options.vertical===false) {var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(true);_.$list.animate({height:targetHeight
875}, _.options.speed);}};Slick.prototype.animateSlide=function(targetLeft, callback) {var animProps={},_=this;_.animateHeight();if (_.options.rtl===true&&_.options.vertical===false) {targetLeft=-targetLeft;}if (_.transformsEnabled===false) {if (_.options.vertical===false) {_.$slideTrack.animate({left:targetLeft
876}
876, _.options.speed, _.options.easing, callback);} else {_.$slideTrack.animate({top:targetLeft
877}, _.options.speed, _.options.easing, callback);}} else {if (_.cssTransitions===false) {if (_.options.rtl===true) {_.currentLeft=-(_.currentLeft);}$({animStart:_.currentLeft
878}).animate({animStart:targetLeft
879}, {duration:_.options.speed,easing:_.options.easing,step:function(now) {now=Math.ceil(now);if (_.options.vertical===false) {animProps[_.animType]='translate(' +
880now + 'px, 0px)';_.$slideTrack.css(animProps);} else {animProps[_.animType]='translate(0px,' +
881now + 'px)';_.$slideTrack.css(animProps);}},complete:function() {if (callback) {callback.call();}}});} else {_.applyTransition();targetLeft=Math.ceil(targetLeft);if (_.options.vertical===false) {animProps[_.animType]='translate3d(' + targetLeft + 'px, 0px, 0px)';} else {animProps[_.animType]='translate3d(0px,' + targetLeft + 'px, 0px)';}_.$slideTrack.css(animProps);if (callback) {setTimeout(function() {_.disableTransition();callback.call();}, _.options.speed);}}}};Slick.prototype.getNavTarget=function() {var _=this,asNavFor=_.options.asNavFor;if ( asNavFor&&asNavFor!==null ) {asNavFor=$(asNavFor).not(_.$slider);}return asNavFor;};Slick.prototype.asNavFor=function(index) {var _=this,asNavFor=_.getNavTarget();if ( asNavFor!==null&&typeof asNavFor==='object' ) {asNavFor.each(function() {var target=$(this).slick('getSlick');if(!target.unslicked) {target.slideHandler(index, true);}});}};Slick.prototype.applyTransition=function(slide) {var _=this,transition={};if (_.options.fade===false) {transition[_.transitionType]=_.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;} else {transition[_.transitionType]='opacity ' + _.options.speed + 'ms ' + _.options.cssEase;}if (_.options.fade===false) {_.$slideTrack.css(transition);} else {_.$slides.eq(slide).css(transition);}};Slick.prototype.autoPlay=function() {var _=this;_.autoPlayClear();if ( _.slideCount > _.options.slidesToShow ) {_.autoPlayTimer=setInterval( _.autoPlayIterator, _.options.autoplaySpeed );}};Slick.prototype.autoPlayClear=function() {var _=this;if (_.autoPlayTimer) {clearInterval(_.autoPlayTimer);}};Slick.prototype.autoPlayIterator=function() {var _=this,slideTo=_.currentSlide + _.options.slidesToScroll;if (!_.paused&&!_.interrupted&&!_.focussed ) {if ( _.options.infinite===false ) {if ( _.direction===1&&( _.currentSlide + 1 )===( _.slideCount-1 )) {_.direction=0;}else if ( _.direction===0 ) {slideTo=_.currentSlide-_.options.slidesToScroll;if ( _.currentSlide-1===0 ) {_.direction=1;}}}_.slideHandler( slideTo );}};Slick.prototype.buildArrows=function() {var _=this;if (_.options.arrows===true ) {_.$prevArrow=$(_.options.prevArrow).addClass('slick-arrow');_.$nextArrow=$(_.options.nextArrow).addClass('slick-arrow');if( _.slideCount > _.options.slidesToShow ) {_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');if (_.htmlExpr.test(_.options.prevArrow)) {_.$prevArrow.prependTo(_.options.appendArrows);}if (_.htmlExpr.test(_.options.nextArrow)) {_.$nextArrow.appendTo(_.options.appendArrows);}if (_.options.infinite!==true) {_.$prevArrow
882.addClass('slick-disabled')
883.attr('aria-disabled', 'true');}} else {_.$prevArrow.add( _.$nextArrow )
884.addClass('slick-hidden')
885.attr({'aria-disabled':'true','tabindex':'-1'
886});}}};Slick.prototype.buildDots=function() {var _=this,i, dot;if (_.options.dots===true) {_.$slider.addClass('slick-dotted');dot=$('<ul />').addClass(_.options.dotsClass);for (i=0; i <=_.getDotCount(); i +=1) {dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));}_.$dots=dot.appendTo(_.options.appendDots);_.$dots.find('li').first().addClass('slick-active');}};Slick.prototype.buildOut=function() {var _=this;_.$slides=
887_.$slider
888.children( _.options.slide + ':not(.slick-cloned)')
889.addClass('slick-slide');_.slideCount=_.$slides.length;_.$slides.each(function(index, element) {$(element)
890.attr('data-slick-index', index)
891.data('originalStyling', $(element).attr('style')||'');});_.$slider.addClass('slick-slider');_.$slideTrack=(_.slideCount===0)?
892$('<div class="slick-track"/>').appendTo(_.$slider):
893_.$slides.wrapAll('<div class="slick-track"/>').parent();_.$list=_.$slideTrack.wrap(
894'<div class="slick-list"/>').parent();_.$slideTrack.css('opacity', 0);if (_.options.centerMode===true||_.options.swipeToSlide===true) {_.options.slidesToScroll=1;}$('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');_.setupInfinite();_.buildArrows();_.buildDots();_.updateDots();_.setSlideClasses(typeof _.currentSlide==='number'?_.currentSlide:0);if (_.options.draggable===true) {_.$list.addClass('draggable');}};Slick.prototype.buildRows=function() {var _=this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;newSlides=document.createDocumentFragment();originalSlides=_.$slider.children();if(_.options.rows > 1) {slidesPerSection=_.options.slidesPerRow * _.options.rows;numOfSlides=Math.ceil(
895originalSlides.length / slidesPerSection
896);for(a=0; a < numOfSlides; a++){var slide=document.createElement('div');for(b=0; b < _.options.rows; b++) {var row=document.createElement('div');for(c=0; c < _.options.slidesPerRow; c++) {var target=(a * slidesPerSection + ((b * _.options.slidesPerRow) + c));if (originalSlides.get(target)) {row.appendChild(originalSlides.get(target));}}slide.appendChild(row);}newSlides.appendChild(slide);}_.$slider.empty().append(newSlides);_.$slider.children().children().children()
897.css({'width':(100 / _.options.slidesPerRow) + '%','display':'inline-block'
898});}};Slick.prototype.checkResponsive=function(initial, forceUpdate) {var _=this,breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint=false;var sliderWidth=_.$slider.width();var windowWidth=window.innerWidth||$(window).width();if (_.respondTo==='window') {respondToWidth=windowWidth;} else if (_.respondTo==='slider') {respondToWidth=sliderWidth;} else if (_.respondTo==='min') {respondToWidth=Math.min(windowWidth, sliderWidth);}if ( _.options.responsive&&
899_.options.responsive.length&&
900_.options.responsive!==null) {targetBreakpoint=null;for (breakpoint in _.breakpoints) {if (_.breakpoints.hasOwnProperty(breakpoint)) {if (_.originalSettings.mobileFirst===false) {if (respondToWidth < _.breakpoints[breakpoint]) {targetBreakpoint=_.breakpoints[breakpoint];}} else {if (respondToWidth > _.breakpoints[breakpoint]) {targetBreakpoint=_.breakpoints[breakpoint];}}}}if (targetBreakpoint!==null) {if (_.activeBreakpoint!==null) {if (targetBreakpoint!==_.activeBreakpoint||forceUpdate) {_.activeBreakpoint=
901targetBreakpoint;if (_.breakpointSettings[targetBreakpoint]==='unslick') {_.unslick(targetBreakpoint);} else {_.options=$.extend({}, _.originalSettings,_.breakpointSettings[
902targetBreakpoint]);if (initial===true) {_.currentSlide=_.options.initialSlide;}_.refresh(initial);}triggerBreakpoint=targetBreakpoint;}} else {_.activeBreakpoint=targetBreakpoint;if (_.breakpointSettings[targetBreakpoint]==='unslick') {_.unslick(targetBreakpoint);} else {_.options=$.extend({}, _.originalSettings,_.breakpointSettings[
903targetBreakpoint]);if (initial===true) {_.currentSlide=_.options.initialSlide;}_.refresh(initial);}triggerBreakpoint=targetBreakpoint;}} else {if (_.activeBreakpoint!==null) {_.activeBreakpoint=null;_.options=_.originalSettings;if (initial===true) {_.currentSlide=_.options.initialSlide;}_.refresh(initial);triggerBreakpoint=targetBreakpoint;}}if(!initial&&triggerBreakpoint!==false ) {_.$slider.trigger('breakpoint', [_, triggerBreakpoint]);}}};Slick.prototype.changeSlide=function(event, dontAnimate) {var _=this,$target=$(event.currentTarget),indexOffset, slideOffset, unevenOffset;if($target.is('a')) {event.preventDefault();}if(!$target.is('li')) {$target=$target.closest('li');}unevenOffset=(_.slideCount % _.options.slidesToScroll!==0);indexOffset=unevenOffset?0:(_.slideCount-_.currentSlide) % _.options.slidesToScroll;switch (event.data.message) {case 'previous':
904slideOffset=indexOffset===0?_.options.slidesToScroll:_.options.slidesToShow-indexOffset;if (_.slideCount > _.options.slidesToShow) {_.slideHandler(_.currentSlide-slideOffset, false, dontAnimate);}break;case 'next':
905slideOffset=indexOffset===0?_.options.slidesToScroll:indexOffset;if (_.slideCount > _.options.slidesToShow) {_.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);}break;case 'index':
906var index=event.data.index===0?0:
907event.data.index||$target.index() * _.options.slidesToScroll;_.slideHandler(_.checkNavigable(index), false, dontAnimate);$target.children().trigger('focus');break;default:
908return;}};Slick.prototype.checkNavigable=function(index) {var _=this,navigables, prevNavigable;navigables=_.getNavigableIndexes();prevNavigable=0;if (index > navigables[navigables.length-1]) {index=navigables[navigables.length-1];} else {for (var n in navigables) {if (index < navigables[n]) {index=prevNavigable;break;}prevNavigable=navigables[n];}}return index;};Slick.prototype.cleanUpEvents=function() {var _=this;if (_.options.dots&&_.$dots!==null) {$('li', _.$dots)
909.off('click.slick', _.changeSlide)
910.off('mouseenter.slick', $.proxy(_.interrupt, _, true))
911.off('mouseleave.slick', $.proxy(_.interrupt, _, false));if (_.options.accessibility===true) {_.$dots.off('keydown.slick', _.keyHandler);}}_.$slider.off('focus.slick blur.slick');if (_.options.arrows===true&&_.slideCount > _.options.slidesToShow) {_.$prevArrow&&_.$prevArrow.off('click.slick', _.changeSlide);_.$nextArrow&&_.$nextArrow.off('click.slick', _.changeSlide);if (_.options.accessibility===true) {_.$prevArrow&&_.$prevArrow.off('keydown.slick', _.keyHandler);_.$nextArrow&&_.$nextArrow.off('keydown.slick', _.keyHandler);}}_.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);_.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);_.$list.off('touchend.slick mouseup.slick', _.swipeHandler);_.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);_.$list.off('click.slick', _.clickHandler);$(document).off(_.visibilityChange, _.visibility);_.cleanUpSlideEvents();if (_.options.accessibility===true) {_.$list.off('keydown.slick', _.keyHandler);}if (_.options.focusOnSelect===true) {$(_.$slideTrack).children().off('click.slick', _.selectHandler);}$(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);$(window).off('resize.slick.slick-' + _.instanceUid, _.resize);$('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);$(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);};Slick.prototype.cleanUpSlideEvents=function() {var _=this;_.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));_.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));};Slick.prototype.cleanUpRows=function() {var _=this, originalSlides;if(_.options.rows > 1) {originalSlides=_.$slides.children().children();originalSlides.removeAttr('style');_.$slider.empty().append(originalSlides);}};Slick.prototype.clickHandler=function(event) {var _=this;if (_.shouldClick===false) {event.stopImmediatePropagation();event.stopPropagation();event.preventDefault();}};Slick.prototype.destroy=function(refresh) {var _=this;_.autoPlayClear();_.touchObject={};_.cleanUpEvents();$('.slick-cloned', _.$slider).detach();if (_.$dots) {_.$dots.remove();}if ( _.$prevArrow&&_.$prevArrow.length ) {_.$prevArrow
912.removeClass('slick-disabled slick-arrow slick-hidden')
913.removeAttr('aria-hidden aria-disabled tabindex')
914.css('display','');if ( _.htmlExpr.test( _.options.prevArrow )) {_.$prevArrow.remove();}}if ( _.$nextArrow&&_.$nextArrow.length ) {_.$nextArrow
915.removeClass('slick-disabled slick-arrow slick-hidden')
916.removeAttr('aria-hidden aria-disabled tabindex')
917.css('display','');if ( _.htmlExpr.test( _.options.nextArrow )) {_.$nextArrow.remove();}}if (_.$slides) {_.$slides
918.removeClass('slick-slide slick-active slick-center slick-visible slick-current')
919.removeAttr('aria-hidden')
920.removeAttr('data-slick-index')
921.each(function(){$(this).attr('style', $(this).data('originalStyling'));});_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.detach();_.$list.detach();_.$slider.append(_.$slides);}_.cleanUpRows();_.$slider.removeClass('slick-slider');_.$slider.removeClass('slick-initialized');_.$slider.removeClass('slick-dotted');_.unslicked=true;if(!refresh) {_.$slider.trigger('destroy', [_]);}};Slick.prototype.disableTransition=function(slide) {var _=this,transition={};transition[_.transitionType]='';if (_.options.fade===false) {_.$slideTrack.css(transition);} else {_.$slides.eq(slide).css(transition);}};Slick.prototype.fadeSlide=function(slideIndex, callback) {var _=this;if (_.cssTransitions===false) {_.$slides.eq(slideIndex).css({zIndex:_.options.zIndex
922});_.$slides.eq(slideIndex).animate({opacity:1
923}, _.options.speed, _.options.easing, callback);} else {_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:1,zIndex:_.options.zIndex
924});if (callback) {setTimeout(function() {_.disableTransition(slideIndex);callback.call();}, _.options.speed);}}};Slick.prototype.fadeSlideOut=function(slideIndex) {var _=this;if (_.cssTransitions===false) {_.$slides.eq(slideIndex).animate({opacity:0,zIndex:_.options.zIndex-2
925}, _.options.speed, _.options.easing);} else {_.applyTransition(slideIndex);_.$slides.eq(slideIndex).css({opacity:0,zIndex:_.options.zIndex-2
926});}};
926Slick.prototype.filterSlides=Slick.prototype.slickFilter=function(filter) {var _=this;if (filter!==null) {_.$slidesCache=_.$slides;_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.filter(filter).appendTo(_.$slideTrack);_.reinit();}};Slick.prototype.focusHandler=function() {var _=this;_.$slider
927.off('focus.slick blur.slick')
928.on('focus.slick blur.slick', '*', function(event) {event.stopImmediatePropagation();var $sf=$(this);setTimeout(function() {if( _.options.pauseOnFocus ) {_.focussed=$sf.is(':focus');_.autoPlay();}}, 0);});};Slick.prototype.getCurrent=Slick.prototype.slickCurrentSlide=function() {var _=this;return _.currentSlide;};Slick.prototype.getDotCount=function() {var _=this;var breakPoint=0;var counter=0;var pagerQty=0;if (_.options.infinite===true) {if (_.slideCount <=_.options.slidesToShow) {++pagerQty;} else {while (breakPoint < _.slideCount) {++pagerQty;breakPoint=counter + _.options.slidesToScroll;counter +=_.options.slidesToScroll <=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow;}}} else if (_.options.centerMode===true) {pagerQty=_.slideCount;} else if(!_.options.asNavFor) {pagerQty=1 + Math.ceil((_.slideCount-_.options.slidesToShow) / _.options.slidesToScroll);}else {while (breakPoint < _.slideCount) {++pagerQty;breakPoint=counter + _.options.slidesToScroll;counter +=_.options.slidesToScroll <=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow;}}return pagerQty-1;};Slick.prototype.getLeft=function(slideIndex) {var _=this,targetLeft,verticalHeight,verticalOffset=0,targetSlide,coef;_.slideOffset=0;verticalHeight=_.$slides.first().outerHeight(true);if (_.options.infinite===true) {if (_.slideCount > _.options.slidesToShow) {_.slideOffset=(_.slideWidth * _.options.slidesToShow) *-1;coef=-1
929if (_.options.vertical===true&&_.options.centerMode===true) {if (_.options.slidesToShow===2) {coef=-1.5;} else if (_.options.slidesToShow===1) {coef=-2
930}}verticalOffset=(verticalHeight * _.options.slidesToShow) * coef;}if (_.slideCount % _.options.slidesToScroll!==0) {if (slideIndex + _.options.slidesToScroll > _.slideCount&&_.slideCount > _.options.slidesToShow) {if (slideIndex > _.slideCount) {_.slideOffset=((_.options.slidesToShow-(slideIndex-_.slideCount)) * _.slideWidth) *-1;verticalOffset=((_.options.slidesToShow-(slideIndex-_.slideCount)) * verticalHeight) *-1;} else {_.slideOffset=((_.slideCount % _.options.slidesToScroll) * _.slideWidth) *-1;verticalOffset=((_.slideCount % _.options.slidesToScroll) * verticalHeight) *-1;}}}} else {if (slideIndex + _.options.slidesToShow > _.slideCount) {_.slideOffset=((slideIndex + _.options.slidesToShow)-_.slideCount) * _.slideWidth;verticalOffset=((slideIndex + _.options.slidesToShow)-_.slideCount) * verticalHeight;}}if (_.slideCount <=_.options.slidesToShow) {_.slideOffset=0;verticalOffset=0;}if (_.options.centerMode===true&&_.slideCount <=_.options.slidesToShow) {_.slideOffset=((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2)-((_.slideWidth * _.slideCount) / 2);} else if (_.options.centerMode===true&&_.options.infinite===true) {_.slideOffset +=_.slideWidth * Math.floor(_.options.slidesToShow / 2)-_.slideWidth;} else if (_.options.centerMode===true) {_.slideOffset=0;_.slideOffset +=_.slideWidth * Math.floor(_.options.slidesToShow / 2);}if (_.options.vertical===false) {targetLeft=((slideIndex * _.slideWidth) *-1) + _.slideOffset;} else {targetLeft=((slideIndex * verticalHeight) *-1) + verticalOffset;}if (_.options.variableWidth===true) {if (_.slideCount <=_.options.slidesToShow||_.options.infinite===false) {targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex);} else {targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);}if (_.options.rtl===true) {if (targetSlide[0]) {targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width()) *-1;} else {targetLeft=0;}} else {targetLeft=targetSlide[0]?targetSlide[0].offsetLeft *-1:0;}if (_.options.centerMode===true) {if (_.slideCount <=_.options.slidesToShow||_.options.infinite===false) {targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex);} else {targetSlide=_.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);}
930if (_.options.rtl===true) {if (targetSlide[0]) {targetLeft=(_.$slideTrack.width()-targetSlide[0].offsetLeft-targetSlide.width()) *-1;} else {targetLeft=0;}} else {targetLeft=targetSlide[0]?targetSlide[0].offsetLeft *-1:0;}targetLeft +=(_.$list.width()-targetSlide.outerWidth()) / 2;}}return targetLeft;};Slick.prototype.getOption=Slick.prototype.slickGetOption=function(option) {var _=this;return _.options[option];};Slick.prototype.getNavigableIndexes=function() {var _=this,breakPoint=0,counter=0,indexes=[],max;if (_.options.infinite===false) {max=_.slideCount;} else {breakPoint=_.options.slidesToScroll *-1;counter=_.options.slidesToScroll *-1;max=_.slideCount * 2;}while (breakPoint < max) {indexes.push(breakPoint);breakPoint=counter + _.options.slidesToScroll;counter +=_.options.slidesToScroll <=_.options.slidesToShow?_.options.slidesToScroll:_.options.slidesToShow;}return indexes;};Slick.prototype.getSlick=function() {return this;};Slick.prototype.getSlideCount=function() {var _=this,slidesTraversed, swipedSlide, centerOffset;centerOffset=_.options.centerMode===true?_.slideWidth * Math.floor(_.options.slidesToShow / 2):0;if (_.options.swipeToSlide===true) {_.$slideTrack.find('.slick-slide').each(function(index, slide) {if (slide.offsetLeft-centerOffset + ($(slide).outerWidth() / 2) > (_.swipeLeft *-1)) {swipedSlide=slide;return false;}});slidesTraversed=Math.abs($(swipedSlide).attr('data-slick-index')-_.currentSlide)||1;return slidesTraversed;} else {return _.options.slidesToScroll;}};Slick.prototype.goTo=Slick.prototype.slickGoTo=function(slide, dontAnimate) {var _=this;_.changeSlide({data:{message:'index',index:parseInt(slide)
931}}, dontAnimate);};Slick.prototype.init=function(creation) {var _=this;if (!$(_.$slider).hasClass('slick-initialized')) {$(_.$slider).addClass('slick-initialized');_.buildRows();_.buildOut();_.setProps();_.startLoad();_.loadSlider();_.initializeEvents();_.updateArrows();_.updateDots();_.checkResponsive(true);_.focusHandler();}if (creation) {_.$slider.trigger('init', [_]);}if (_.options.accessibility===true) {_.initADA();}if ( _.options.autoplay ) {_.paused=false;_.autoPlay();}};Slick.prototype.initADA=function() {var _=this,numDotGroups=Math.ceil(_.slideCount / _.options.slidesToShow),tabControlIndexes=_.getNavigableIndexes().filter(function(val) {return (val >=0)&&(val < _.slideCount);});_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({'aria-hidden':'true','tabindex':'-1'
932}).find('a, input, button, select').attr({'tabindex':'-1'
933});if (_.$dots!==null) {_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {var slideControlIndex=tabControlIndexes.indexOf(i);$(this).attr({'role':'tabpanel','id':'slick-slide' + _.instanceUid + i,'tabindex':-1
934});if (slideControlIndex!==-1) {$(this).attr({'aria-describedby':'slick-slide-control' + _.instanceUid + slideControlIndex
935});}});_.$dots.attr('role', 'tablist').find('li').each(function(i) {var mappedSlideIndex=tabControlIndexes[i];$(this).attr({'role':'presentation'
936});$(this).find('button').first().attr({'role':'tab','id':'slick-slide-control' + _.instanceUid + i,'aria-controls':'slick-slide' + _.instanceUid + mappedSlideIndex,'aria-label':(i + 1) + ' of ' + numDotGroups,'aria-selected':null,'tabindex':'-1'
937});}).eq(_.currentSlide).find('button').attr({'aria-selected':'true','tabindex':'0'
938}).end();}for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {_.$slides.eq(i).attr('tabindex', 0);}_.activateADA();};Slick.prototype.initArrowEvents=function() {var _=this;if (_.options.arrows===true&&_.slideCount > _.options.slidesToShow) {_.$prevArrow
939.off('click.slick')
940.on('click.slick', {message:'previous'
941}, _.changeSlide);_.$nextArrow
942.off('click.slick')
943.on('click.slick', {message:'next'
944}, _.changeSlide);if (_.options.accessibility===true) {_.$prevArrow.on('keydown.slick', _.keyHandler);_.$nextArrow.on('keydown.slick', _.keyHandler);}}};Slick.prototype.initDotEvents=function() {var _=this;if (_.options.dots===true) {$('li', _.$dots).on('click.slick', {message:'index'
945}, _.changeSlide);if (_.options.accessibility===true) {_.$dots.on('keydown.slick', _.keyHandler);}}if ( _.options.dots===true&&_.options.pauseOnDotsHover===true ) {$('li', _.$dots)
946.on('mouseenter.slick', $.proxy(_.interrupt, _, true))
947.on('mouseleave.slick', $.proxy(_.interrupt, _, false));}};Slick.prototype.initSlideEvents=function() {var _=this;if ( _.options.pauseOnHover ) {_.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));_.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));}};Slick.prototype.initializeEvents=function() {var _=this;_.initArrowEvents();_.initDotEvents();_.initSlideEvents();_.$list.on('touchstart.slick mousedown.slick', {action:'start'
948}, _.swipeHandler);_.$list.on('touchmove.slick mousemove.slick', {action:'move'
949}, _.swipeHandler);_.$list.on('touchend.slick mouseup.slick', {action:'end'
950}, _.swipeHandler);_.$list.on('touchcancel.slick mouseleave.slick', {action:'end'
951}, _.swipeHandler);_.$list.on('click.slick', _.clickHandler);$(document).on(_.visibilityChange, $.proxy(_.visibility, _));if (_.options.accessibility===true) {_.$list.on('keydown.slick', _.keyHandler);}if (_.options.focusOnSelect===true) {$(_.$slideTrack).children().on('click.slick', _.selectHandler);}$(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));$(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));$('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);$(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);$(_.setPosition);};Slick.prototype.initUI=function() {var _=this;if (_.options.arrows===true&&_.slideCount > _.options.slidesToShow) {_.$prevArrow.show();_.$nextArrow.show();}if (_.options.dots===true&&_.slideCount > _.options.slidesToShow) {_.$dots.show();}};Slick.prototype.keyHandler=function(event) {var _=this;if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {if (event.keyCode===37&&_.options.accessibility===true) {_.changeSlide({data:{message:_.options.rtl===true?'next':'previous'
952}});} else if (event.keyCode===39&&_.options.accessibility===true) {_.changeSlide({data:{message:_.options.rtl===true?'previous':'next'
953}});}}};Slick.prototype.lazyLoad=function() {var _=this,loadRange, cloneRange, rangeStart, rangeEnd;function loadImages(imagesScope) {$('img[data-lazy]', imagesScope).each(function() {var image=$(this),imageSource=$(this).attr('data-lazy'),imageSrcSet=$(this).attr('data-srcset'),imageSizes=$(this).attr('data-sizes')||_.$slider.attr('data-sizes'),imageToLoad=document.createElement('img');imageToLoad.onload=function() {image
954.animate({ opacity:0 }, 100, function() {if (imageSrcSet) {image
955.attr('srcset', imageSrcSet );if (imageSizes) {image
956.attr('sizes', imageSizes );}}image
957.attr('src', imageSource)
958.animate({ opacity:1 }, 200, function() {image
959.removeAttr('data-lazy data-srcset data-sizes')
960.removeClass('slick-loading');});_.$slider.trigger('lazyLoaded', [_, image, imageSource]);});};imageToLoad.onerror=function() {image
961.removeAttr( 'data-lazy' )
962.removeClass( 'slick-loading' )
963.addClass( 'slick-lazyload-error' );_.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);};imageToLoad.src=imageSource;});}if (_.options.centerMode===true) {if (_.options.infinite===true) {rangeStart=_.currentSlide + (_.options.slidesToShow / 2 + 1);rangeEnd=rangeStart + _.options.slidesToShow + 2;} else {rangeStart=Math.max(0, _.currentSlide-(_.options.slidesToShow / 2 + 1));rangeEnd=2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;}}
963 else {rangeStart=_.options.infinite?_.options.slidesToShow + _.currentSlide:_.currentSlide;rangeEnd=Math.ceil(rangeStart + _.options.slidesToShow);if (_.options.fade===true) {if (rangeStart > 0) rangeStart--;if (rangeEnd <=_.slideCount) rangeEnd++;}}loadRange=_.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);if (_.options.lazyLoad==='anticipated') {var prevSlide=rangeStart-1,nextSlide=rangeEnd,$slides=_.$slider.find('.slick-slide');for (var i=0; i < _.options.slidesToScroll; i++) {if (prevSlide < 0) prevSlide=_.slideCount-1;loadRange=loadRange.add($slides.eq(prevSlide));loadRange=loadRange.add($slides.eq(nextSlide));prevSlide--;nextSlide++;}}loadImages(loadRange);if (_.slideCount <=_.options.slidesToShow) {cloneRange=_.$slider.find('.slick-slide');loadImages(cloneRange);} else
964if (_.currentSlide >=_.slideCount-_.options.slidesToShow) {cloneRange=_.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);loadImages(cloneRange);} else if (_.currentSlide===0) {cloneRange=_.$slider.find('.slick-cloned').slice(_.options.slidesToShow *-1);loadImages(cloneRange);}};Slick.prototype.loadSlider=function() {var _=this;_.setPosition();_.$slideTrack.css({opacity:1
965});_.$slider.removeClass('slick-loading');_.initUI();if (_.options.lazyLoad==='progressive') {_.progressiveLazyLoad();}};Slick.prototype.next=Slick.prototype.slickNext=function() {var _=this;_.changeSlide({data:{message:'next'
966}});};Slick.prototype.orientationChange=function() {var _=this;_.checkResponsive();_.setPosition();};Slick.prototype.pause=Slick.prototype.slickPause=function() {var _=this;_.autoPlayClear();_.paused=true;};Slick.prototype.play=Slick.prototype.slickPlay=function() {var _=this;_.autoPlay();_.options.autoplay=true;_.paused=false;_.focussed=false;_.interrupted=false;};Slick.prototype.postSlide=function(index) {var _=this;if(!_.unslicked ) {_.$slider.trigger('afterChange', [_, index]);_.animating=false;if (_.slideCount > _.options.slidesToShow) {_.setPosition();}_.swipeLeft=null;if ( _.options.autoplay ) {_.autoPlay();}if (_.options.accessibility===true) {_.initADA();if (_.options.focusOnChange) {var $currentSlide=$(_.$slides.get(_.currentSlide));$currentSlide.attr('tabindex', 0).focus();}}}};Slick.prototype.prev=Slick.prototype.slickPrev=function() {var _=this;_.changeSlide({data:{message:'previous'
967}});};Slick.prototype.preventDefault=function(event) {event.preventDefault();};Slick.prototype.progressiveLazyLoad=function( tryCount ) {tryCount=tryCount||1;var _=this,$imgsToLoad=$( 'img[data-lazy]', _.$slider ),image,imageSource,imageSrcSet,imageSizes,imageToLoad;if ( $imgsToLoad.length ) {image=$imgsToLoad.first();imageSource=image.attr('data-lazy');imageSrcSet=image.attr('data-srcset');imageSizes=image.attr('data-sizes')||_.$slider.attr('data-sizes');imageToLoad=document.createElement('img');imageToLoad.onload=function() {if (imageSrcSet) {image
968.attr('srcset', imageSrcSet );if (imageSizes) {image
969.attr('sizes', imageSizes );}}image
970.attr( 'src', imageSource )
971.removeAttr('data-lazy data-srcset data-sizes')
972.removeClass('slick-loading');if ( _.options.adaptiveHeight===true ) {_.setPosition();}_.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);_.progressiveLazyLoad();};imageToLoad.onerror=function() {if ( tryCount < 3 ) {setTimeout( function() {_.progressiveLazyLoad( tryCount + 1 );}, 500 );} else {image
973.removeAttr( 'data-lazy' )
974.removeClass( 'slick-loading' )
975.addClass( 'slick-lazyload-error' );_.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);_.progressiveLazyLoad();}};imageToLoad.src=imageSource;} else {_.$slider.trigger('allImagesLoaded', [ _ ]);}};Slick.prototype.refresh=function( initializing ) {var _=this, currentSlide, lastVisibleIndex;lastVisibleIndex=_.slideCount-_.options.slidesToShow;if(!_.options.infinite&&( _.currentSlide > lastVisibleIndex )) {_.currentSlide=lastVisibleIndex;}if ( _.slideCount <=_.options.slidesToShow ) {_.currentSlide=0;}currentSlide=_.currentSlide;_.destroy(true);$.extend(_, _.initials, { currentSlide:currentSlide });_.init();if(!initializing ) {_.changeSlide({data:{message:'index',index:currentSlide
976}}, false);}};Slick.prototype.registerBreakpoints=function() {var _=this, breakpoint, currentBreakpoint, l,responsiveSettings=_.options.responsive||null;if ( $.type(responsiveSettings)==='array'&&responsiveSettings.length ) {_.respondTo=_.options.respondTo||'window';for ( breakpoint in responsiveSettings ) {l=_.breakpoints.length-1;if (responsiveSettings.hasOwnProperty(breakpoint)) {currentBreakpoint=responsiveSettings[breakpoint].breakpoint;while( l >=0 ) {if( _.breakpoints[l]&&_.breakpoints[l]===currentBreakpoint ) {_.breakpoints.splice(l,1);}l--;}_.breakpoints.push(currentBreakpoint);_.breakpointSettings[currentBreakpoint]=responsiveSettings[breakpoint].settings;}}_.breakpoints.sort(function(a, b) {return ( _.options.mobileFirst )?a-b:b-a;});}};Slick.prototype.reinit=function() {var _=this;_.$slides=
977_.$slideTrack
978.children(_.options.slide)
979.addClass('slick-slide');_.slideCount=_.$slides.length;if (_.currentSlide >=_.slideCount&&_.currentSlide!==0) {_.currentSlide=_.currentSlide-_.options.slidesToScroll;}if (_.slideCount <=_.options.slidesToShow) {_.currentSlide=0;}_.registerBreakpoints();_.setProps();_.setupInfinite();_.buildArrows();_.updateArrows();_.initArrowEvents();_.buildDots();_.updateDots();_.initDotEvents();_.cleanUpSlideEvents();_.initSlideEvents();_.checkResponsive(false, true);if (_.options.focusOnSelect===true) {$(_.$slideTrack).children().on('click.slick', _.selectHandler);}_.setSlideClasses(typeof _.currentSlide==='number'?_.currentSlide:0);_.setPosition();_.focusHandler();_.paused=!_.options.autoplay;_.autoPlay();_.$slider.trigger('reInit', [_]);};Slick.prototype.resize=function() {var _=this;if ($(window).width()!==_.windowWidth) {clearTimeout(_.windowDelay);_.windowDelay=window.setTimeout(function() {_.windowWidth=$(window).width();_.checkResponsive();if(!_.unslicked ) { _.setPosition(); }}, 50);}};Slick.prototype.removeSlide=Slick.prototype.slickRemove=function(index, removeBefore, removeAll) {var _=this;if (typeof(index)==='boolean') {removeBefore=index;index=removeBefore===true?0:_.slideCount-1;} else {index=removeBefore===true?--index:index;}if (_.slideCount < 1||index < 0||index > _.slideCount-1) {return false;}_.unload();if (removeAll===true) {_.$slideTrack.children().remove();} else {_.$slideTrack.children(this.options.slide).eq(index).remove();}_.$slides=_.$slideTrack.children(this.options.slide);_.$slideTrack.children(this.options.slide).detach();_.$slideTrack.append(_.$slides);_.$slidesCache=_.$slides;_.reinit();};Slick.prototype.setCSS=function(position) {var _=this,positionProps={},x, y;if (_.options.rtl===true) {position=-position;}x=_.positionProp=='left'?Math.ceil(position) + 'px':'0px';y=_.positionProp=='top'?Math.ceil(position) + 'px':'0px';positionProps[_.positionProp]=position;if (_.transformsEnabled===false) {_.$slideTrack.css(positionProps);} else {positionProps={};if (_.cssTransitions===false) {positionProps[_.animType]='translate(' + x + ', ' + y + ')';_.$slideTrack.css(positionProps);} else {positionProps[_.animType]='translate3d(' + x + ', ' + y + ', 0px)';_.$slideTrack.css(positionProps);}}};Slick.prototype.setDimensions=function() {var _=this;if (_.options.vertical===false) {if (_.options.centerMode===true) {_.$list.css({padding:('0px ' + _.options.centerPadding)
980});}} else {_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);if (_.options.centerMode===true) {_.$list.css({padding:(_.options.centerPadding + ' 0px')
981});}}_.listWidth=_.$list.width();_.listHeight=_.$list.height();if (_.options.vertical===false&&_.options.variableWidth===false) {_.slideWidth=Math.ceil(_.listWidth / _.options.slidesToShow);_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));} else if (_.options.variableWidth===true) {_.$slideTrack.width(5000 * _.slideCount);} else {_.slideWidth=Math.ceil(_.listWidth);_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));}var offset=_.$slides.first().outerWidth(true)-_.$slides.first().width();if (_.options.variableWidth===false) _.$slideTrack.children('.slick-slide').width(_.slideWidth-offset);};Slick.prototype.setFade=function() {var _=this,targetLeft;_.$slides.each(function(index, element) {targetLeft=(_.slideWidth * index) *-1;if (_.options.rtl===true) {$(element).css({position:'relative',right:targetLeft,top:0,zIndex:_.options.zIndex-2,opacity:0
982});} else {$(element).css({position:'relative',left:targetLeft,top:0,zIndex:_.options.zIndex-2,opacity:0
983});}});_.$slides.eq(_.currentSlide).css({zIndex:_.options.zIndex-1,opacity:1
984});};Slick.prototype.setHeight=function() {var _=this;if (_.options.slidesToShow===1&&_.options.adaptiveHeight===true&&_.options.vertical===false) {var targetHeight=_.$slides.eq(_.currentSlide).outerHeight(true);_.$list.css('height', targetHeight);}};Slick.prototype.setOption=
985Slick.prototype.slickSetOption=function() {var _=this, l, item, option, value, refresh=false, type;if( $.type( arguments[0] )==='object' ) {option=arguments[0];refresh=arguments[1];type='multiple';} else if ( $.type( arguments[0] )==='string' ) {option=arguments[0];value=arguments[1];refresh=arguments[2];if ( arguments[0]==='responsive'&&$.type( arguments[1] )==='array' ) {type='responsive';} else if ( typeof arguments[1]!=='undefined' ) {type='single';}}if ( type==='single' ) {_.options[option]=value;} else if ( type==='multiple' ) {$.each( option , function( opt, val ) {_.options[opt]=val;});} else if ( type==='responsive' ) {for ( item in value ) {if( $.type( _.options.responsive )!=='array' ) {_.options.responsive=[ value[item] ];} else {l=_.options.responsive.length-1;while( l >=0 ) {if( _.options.responsive[l].breakpoint===value[item].breakpoint ) {_.options.responsive.splice(l,1);}l--;}_.options.responsive.push( value[item] );}}}if ( refresh ) {_.unload();_.reinit();}};Slick.prototype.setPosition=function() {var _=this;_.setDimensions();_.setHeight();if (_.options.fade===false) {_.setCSS(_.getLeft(_.currentSlide));} else {_.setFade();}_.$slider.trigger('setPosition', [_]);};Slick.prototype.setProps=function() {var _=this,bodyStyle=document.body.style;_.positionProp=_.options.vertical===true?'top':'left';if (_.positionProp==='top') {_.$slider.addClass('slick-vertical');} else {_.$slider.removeClass('slick-vertical');}
985if (bodyStyle.WebkitTransition!==undefined||
986bodyStyle.MozTransition!==undefined||
987bodyStyle.msTransition!==undefined) {if (_.options.useCSS===true) {_.cssTransitions=true;}}if ( _.options.fade ) {if ( typeof _.options.zIndex==='number' ) {if( _.options.zIndex < 3 ) {_.options.zIndex=3;}} else {_.options.zIndex=_.defaults.zIndex;}}if (bodyStyle.OTransform!==undefined) {_.animType='OTransform';_.transformType='-o-transform';_.transitionType='OTransition';if (bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined) _.animType=false;}if (bodyStyle.MozTransform!==undefined) {_.animType='MozTransform';_.transformType='-moz-transform';_.transitionType='MozTransition';if (bodyStyle.perspectiveProperty===undefined&&bodyStyle.MozPerspective===undefined) _.animType=false;}if (bodyStyle.webkitTransform!==undefined) {_.animType='webkitTransform';_.transformType='-webkit-transform';_.transitionType='webkitTransition';if (bodyStyle.perspectiveProperty===undefined&&bodyStyle.webkitPerspective===undefined) _.animType=false;}if (bodyStyle.msTransform!==undefined) {_.animType='msTransform';_.transformType='-ms-transform';_.transitionType='msTransition';if (bodyStyle.msTransform===undefined) _.animType=false;}if (bodyStyle.transform!==undefined&&_.animType!==false) {_.animType='transform';_.transformType='transform';_.transitionType='transition';}_.transformsEnabled=_.options.useTransform&&(_.animType!==null&&_.animType!==false);};Slick.prototype.setSlideClasses=function(index) {var _=this,centerOffset, allSlides, indexOffset, remainder;allSlides=_.$slider
988.find('.slick-slide')
989.removeClass('slick-active slick-center slick-current')
990.attr('aria-hidden', 'true');_.$slides
991.eq(index)
992.addClass('slick-current');if (_.options.centerMode===true) {var evenCoef=_.options.slidesToShow % 2===0?1:0;centerOffset=Math.floor(_.options.slidesToShow / 2);if (_.options.infinite===true) {if (index >=centerOffset&&index <=(_.slideCount-1)-centerOffset) {_.$slides
993.slice(index-centerOffset + evenCoef, index + centerOffset + 1)
994.addClass('slick-active')
995.attr('aria-hidden', 'false');} else {indexOffset=_.options.slidesToShow + index;allSlides
996.slice(indexOffset-centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
997.addClass('slick-active')
998.attr('aria-hidden', 'false');}if (index===0) {allSlides
999.eq(allSlides.length-1-_.options.slidesToShow)
1000.addClass('slick-center');} else if (index===_.slideCount-1) {allSlides
1001.eq(_.options.slidesToShow)
1002.addClass('slick-center');}}_.$slides
1003.eq(index)
1004.addClass('slick-center');} else {if (index >=0&&index <=(_.slideCount-_.options.slidesToShow)) {_.$slides
1005.slice(index, index + _.options.slidesToShow)
1006.addClass('slick-active')
1007.attr('aria-hidden', 'false');} else if (allSlides.length <=_.options.slidesToShow) {allSlides
1008.addClass('slick-active')
1009.attr('aria-hidden', 'false');} else {remainder=_.slideCount % _.options.slidesToShow;indexOffset=_.options.infinite===true?_.options.slidesToShow + index:index;if (_.options.slidesToShow==_.options.slidesToScroll&&(_.slideCount-index) < _.options.slidesToShow) {allSlides
1010.slice(indexOffset-(_.options.slidesToShow-remainder), indexOffset + remainder)
1011.addClass('slick-active')
1012.attr('aria-hidden', 'false');} else {allSlides
1013.slice(indexOffset, indexOffset + _.options.slidesToShow)
1014.addClass('slick-active')
1015.attr('aria-hidden', 'false');}}}if (_.options.lazyLoad==='ondemand'||_.options.lazyLoad==='anticipated') {_.lazyLoad();}};Slick.prototype.setupInfinite=function() {var _=this,i, slideIndex, infiniteCount;if (_.options.fade===true) {_.options.centerMode=false;}if (_.options.infinite===true&&_.options.fade===false) {slideIndex=null;if (_.slideCount > _.options.slidesToShow) {if (_.options.centerMode===true) {infiniteCount=_.options.slidesToShow + 1;} else {infiniteCount=_.options.slidesToShow;}for (i=_.slideCount; i > (_.slideCount-
1016infiniteCount); i-=1) {slideIndex=i-1;$(_.$slides[slideIndex]).clone(true).attr('id', '')
1017.attr('data-slick-index', slideIndex-_.slideCount)
1018.prependTo(_.$slideTrack).addClass('slick-cloned');}for (i=0; i < infiniteCount  + _.slideCount; i +=1) {slideIndex=i;$(_.$slides[slideIndex]).clone(true).attr('id', '')
1019.attr('data-slick-index', slideIndex + _.slideCount)
1020.appendTo(_.$slideTrack).addClass('slick-cloned');}_.$slideTrack.find('.slick-cloned').find('[id]').each(function() {$(this).attr('id', '');});}}};Slick.prototype.interrupt=function( toggle ) {var _=this;if(!toggle ) {_.autoPlay();}_.interrupted=toggle;};Slick.prototype.selectHandler=function(event) {var _=this;var targetElement=
1021$(event.target).is('.slick-slide')?
1022$(event.target):
1023$(event.target).parents('.slick-slide');
1023var index=parseInt(targetElement.attr('data-slick-index'));if (!index) index=0;if (_.slideCount <=_.options.slidesToShow) {_.slideHandler(index, false, true);return;}_.slideHandler(index);};Slick.prototype.slideHandler=function(index, sync, dontAnimate) {var targetSlide, animSlide, oldSlide, slideLeft, targetLeft=null,_=this, navTarget;sync=sync||false;if (_.animating===true&&_.options.waitForAnimate===true) {return;}if (_.options.fade===true&&_.currentSlide===index) {return;}if (sync===false) {_.asNavFor(index);}targetSlide=index;targetLeft=_.getLeft(targetSlide);slideLeft=_.getLeft(_.currentSlide);_.currentLeft=_.swipeLeft===null?slideLeft:_.swipeLeft;if (_.options.infinite===false&&_.options.centerMode===false&&(index < 0||index > _.getDotCount() * _.options.slidesToScroll)) {if (_.options.fade===false) {targetSlide=_.currentSlide;if (dontAnimate!==true) {_.animateSlide(slideLeft, function() {_.postSlide(targetSlide);});} else {_.postSlide(targetSlide);}}return;} else if (_.options.infinite===false&&_.options.centerMode===true&&(index < 0||index > (_.slideCount-_.options.slidesToScroll))) {if (_.options.fade===false) {targetSlide=_.currentSlide;if (dontAnimate!==true) {_.animateSlide(slideLeft, function() {_.postSlide(targetSlide);});} else {_.postSlide(targetSlide);}}return;}if ( _.options.autoplay ) {clearInterval(_.autoPlayTimer);}if (targetSlide < 0) {if (_.slideCount % _.options.slidesToScroll!==0) {animSlide=_.slideCount-(_.slideCount % _.options.slidesToScroll);} else {animSlide=_.slideCount + targetSlide;}} else if (targetSlide >=_.slideCount) {if (_.slideCount % _.options.slidesToScroll!==0) {animSlide=0;} else {animSlide=targetSlide-_.slideCount;}} else {animSlide=targetSlide;}_.animating=true;_.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);oldSlide=_.currentSlide;_.currentSlide=animSlide;_.setSlideClasses(_.currentSlide);if ( _.options.asNavFor ) {navTarget=_.getNavTarget();navTarget=navTarget.slick('getSlick');if ( navTarget.slideCount <=navTarget.options.slidesToShow ) {navTarget.setSlideClasses(_.currentSlide);}}_.updateDots();_.updateArrows();if (_.options.fade===true) {if (dontAnimate!==true) {_.fadeSlideOut(oldSlide);_.fadeSlide(animSlide, function() {_.postSlide(animSlide);});} else {_.postSlide(animSlide);}_.animateHeight();return;}if (dontAnimate!==true) {_.animateSlide(targetLeft, function() {_.postSlide(animSlide);});} else {_.postSlide(animSlide);}};Slick.prototype.startLoad=function() {var _=this;if (_.options.arrows===true&&_.slideCount > _.options.slidesToShow) {_.$prevArrow.hide();_.$nextArrow.hide();}if (_.options.dots===true&&_.slideCount > _.options.slidesToShow) {_.$dots.hide();}_.$slider.addClass('slick-loading');};Slick.prototype.swipeDirection=function() {var xDist, yDist, r, swipeAngle, _=this;xDist=_.touchObject.startX-_.touchObject.curX;yDist=_.touchObject.startY-_.touchObject.curY;r=Math.atan2(yDist, xDist);swipeAngle=Math.round(r * 180 / Math.PI);if (swipeAngle < 0) {swipeAngle=360-Math.abs(swipeAngle);}if ((swipeAngle <=45)&&(swipeAngle >=0)) {return (_.options.rtl===false?'left':'right');}if ((swipeAngle <=360)&&(swipeAngle >=315)) {return (_.options.rtl===false?'left':'right');}if ((swipeAngle >=135)&&(swipeAngle <=225)) {return (_.options.rtl===false?'right':'left');}if (_.options.verticalSwiping===true) {if ((swipeAngle >=35)&&(swipeAngle <=135)) {return 'down';} else {return 'up';}}return 'vertical';};Slick.prototype.swipeEnd=function(event) {var _=this,slideCount,direction;_.dragging=false;_.swiping=false;if (_.scrolling) {_.scrolling=false;return false;}_.interrupted=false;_.shouldClick=( _.touchObject.swipeLength > 10 )?false:true;if ( _.touchObject.curX===undefined ) {return false;}if ( _.touchObject.edgeHit===true ) {_.$slider.trigger('edge', [_, _.swipeDirection() ]);}if ( _.touchObject.swipeLength >=_.touchObject.minSwipe ) {direction=_.swipeDirection();switch ( direction ) {case 'left':
1024case 'down':
1025slideCount=
1026_.options.swipeToSlide?
1027_.checkNavigable( _.currentSlide + _.getSlideCount() ):
1028_.currentSlide + _.getSlideCount();_.currentDirection=0;break;case 'right':
1029case 'up':
1030slideCount=
1031_.options.swipeToSlide?
1032_.checkNavigable( _.currentSlide-_.getSlideCount() ):
1033_.currentSlide-_.getSlideCount();_.currentDirection=1;break;default:
1034}if( direction!='vertical' ) {_.slideHandler( slideCount );_.touchObject={};_.$slider.trigger('swipe', [_, direction ]);}} else {if ( _.touchObject.startX!==_.touchObject.curX ) {_.slideHandler( _.currentSlide );_.touchObject={};}}};Slick.prototype.swipeHandler=function(event) {var _=this;if ((_.options.swipe===false)||('ontouchend' in document&&_.options.swipe===false)) {return;} else if (_.options.draggable===false&&event.type.indexOf('mouse')!==-1) {return;}_.touchObject.fingerCount=event.originalEvent&&event.originalEvent.touches!==undefined?
1035event.originalEvent.touches.length:1;_.touchObject.minSwipe=_.listWidth / _.options
1036.touchThreshold;if (_.options.verticalSwiping===true) {_.touchObject.minSwipe=_.listHeight / _.options
1037.touchThreshold;}switch (event.data.action) {case 'start':
1038_.swipeStart(event);break;case 'move':
1039_.swipeMove(event);break;case 'end':
1040_.swipeEnd(event);break;}};Slick.prototype.swipeMove=function(event) {var _=this,edgeWasHit=false,curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;touches=event.originalEvent!==undefined?event.originalEvent.touches:null;if (!_.dragging||_.scrolling||touches&&touches.length!==1) {return false;}curLeft=_.getLeft(_.currentSlide);_.touchObject.curX=touches!==undefined?touches[0].pageX:event.clientX;_.touchObject.curY=touches!==undefined?touches[0].pageY:event.clientY;_.touchObject.swipeLength=Math.round(Math.sqrt(
1041Math.pow(_.touchObject.curX-_.touchObject.startX, 2)));verticalSwipeLength=Math.round(Math.sqrt(
1042Math.pow(_.touchObject.curY-_.touchObject.startY, 2)));if (!_.options.verticalSwiping&&!_.swiping&&verticalSwipeLength > 4) {_.scrolling=true;return false;}if (_.options.verticalSwiping===true) {_.touchObject.swipeLength=verticalSwipeLength;}swipeDirection=_.swipeDirection();if (event.originalEvent!==undefined&&_.touchObject.swipeLength > 4) {_.swiping=true;event.preventDefault();}positionOffset=(_.options.rtl===false?1:-1) * (_.touchObject.curX > _.touchObject.startX?1:-1);if (_.options.verticalSwiping===true) {positionOffset=_.touchObject.curY > _.touchObject.startY?1:-1;}swipeLength=_.touchObject.swipeLength;_.touchObject.edgeHit=false;if (_.options.infinite===false) {if ((_.currentSlide===0&&swipeDirection==='right')||(_.currentSlide >=_.getDotCount()&&swipeDirection==='left')) {swipeLength=_.touchObject.swipeLength * _.options.edgeFriction;_.touchObject.edgeHit=true;}}if (_.options.vertical===false) {_.swipeLeft=curLeft + swipeLength * positionOffset;} else {_.swipeLeft=curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;}if (_.options.verticalSwiping===true) {_.swipeLeft=curLeft + swipeLength * positionOffset;}if (_.options.fade===true||_.options.touchMove===false) {return false;}if (_.animating===true) {_.swipeLeft=null;return false;}_.setCSS(_.swipeLeft);};Slick.prototype.swipeStart=function(event) {var _=this,touches;_.interrupted=true;if (_.touchObject.fingerCount!==1||_.slideCount <=_.options.slidesToShow) {_.touchObject={};return false;}if (event.originalEvent!==undefined&&event.originalEvent.touches!==undefined) {touches=event.originalEvent.touches[0];}_.touchObject.startX=_.touchObject.curX=touches!==undefined?touches.pageX:event.clientX;_.touchObject.startY=_.touchObject.curY=touches!==undefined?touches.pageY:event.clientY;_.dragging=true;};Slick.prototype.unfilterSlides=Slick.prototype.slickUnfilter=function() {var _=this;if (_.$slidesCache!==null) {_.unload();_.$slideTrack.children(this.options.slide).detach();_.$slidesCache.appendTo(_.$slideTrack);_.reinit();}};Slick.prototype.unload=function() {var _=this;$('.slick-cloned', _.$slider).remove();if (_.$dots) {_.$dots.remove();}if (_.$prevArrow&&_.htmlExpr.test(_.options.prevArrow)) {_.$prevArrow.remove();}if (_.$nextArrow&&_.htmlExpr.test(_.options.nextArrow)) {_.$nextArrow.remove();}_.$slides
1043.removeClass('slick-slide slick-active slick-visible slick-current')
1044.attr('aria-hidden', 'true')
1045.css('width', '');};
1045Slick.prototype.unslick=function(fromBreakpoint) {var _=this;_.$slider.trigger('unslick', [_, fromBreakpoint]);_.destroy();};Slick.prototype.updateArrows=function() {var _=this,centerOffset;centerOffset=Math.floor(_.options.slidesToShow / 2);if ( _.options.arrows===true&&
1046_.slideCount > _.options.slidesToShow&&
1047!_.options.infinite ) {_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');if (_.currentSlide===0) {_.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');} else if (_.currentSlide >=_.slideCount-_.options.slidesToShow&&_.options.centerMode===false) {_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');} else if (_.currentSlide >=_.slideCount-1&&_.options.centerMode===true) {_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');}}};Slick.prototype.updateDots=function() {var _=this;if (_.$dots!==null) {_.$dots
1048.find('li')
1049.removeClass('slick-active')
1050.end();_.$dots
1051.find('li')
1052.eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
1053.addClass('slick-active');}};Slick.prototype.visibility=function() {var _=this;if ( _.options.autoplay ) {if ( document[_.hidden] ) {_.interrupted=true;} else {_.interrupted=false;}}};$.fn.slick=function() {var _=this,opt=arguments[0],args=Array.prototype.slice.call(arguments, 1),l=_.length,i,ret;for (i=0; i < l; i++) {if (typeof opt=='object'||typeof opt=='undefined')
1054_[i].slick=new Slick(_[i], opt);else
1055ret=_[i].slick[opt].apply(_[i].slick, args);if (typeof ret!='undefined') return ret;}return _;};}));
1056
1057wAllowMinimize=true;jQuery.fn.endlessRiver=function (settings) {settings=jQuery.extend({speed:100,pause:true,buttons:false
1058}, settings);return this.each(function(){var j=jQuery;var $line=j(this);var id="ER_"+ new Date().getTime();$line.wrap("<div id=\""+id+"\"></div>");$line.css({margin:"0!important",padding:"0!important"
1059});var currentSpazio,currentTempo;var run=true;var initialOffset=$line.offset().left;var lineWidth=1;$line.children("li.tick-clones").remove();$line.addClass("newsticker");var $mask=$line.wrap("<div class='mask'></div>");var $tickercontainer=$line.parent().wrap("<div class='tickercontainer'></div>");var elements=$line.children("li");var fill=function(){lineWidth=1;$line.append(elements.clone(true).addClass("tick-clones"));$line.children("li").each(function (i) {lineWidth +=j(this, i).outerWidth(true);});};var l=$tickercontainer.outerWidth(true);while(lineWidth<l) fill();$line.width(lineWidth);$line.height($line.parent().height());function scrollnews(spazio, tempo) {$line.animate({left:'-=' + spazio}, tempo, "linear", function () {$line.children("li:first").appendTo($line);$line.css("left", 0);currentSpazio=$line.children("li:first").outerWidth(true);currentTempo=tempo / spazio * currentSpazio;if(run)
1060scrollnews(currentSpazio, currentTempo);});}currentSpazio=$line.children("li:first").outerWidth(true);currentTempo=currentSpazio / settings.speed * 1000;scrollnews(currentSpazio, currentTempo);function setHover(){$line.hover(pause,resume);}function setTouchToggle() {$line.parent().on('touchstart', function(event) {if (j(event.target).closest('a').length) return;event.preventDefault();if (run) {pause();} else {resume();}});}function pause(){run=false;$line.stop();}function resume() {run=true;var offset=$line.offset().left;var residualSpace=offset + $line.children("li:first").outerWidth(true)-initialOffset;var residualTime=currentTempo / currentSpazio * residualSpace;scrollnews(residualSpace, residualTime);}if (settings.pause) {if (('ontouchstart' in window)||navigator.msMaxTouchPoints) {setTouchToggle();} else {setHover();}}
1060if(settings.buttons){var $buttons=j('<ul class="er-controls">'+
1061'<li class="prev glyphicon glyphicon-chevron-left"></li>'+
1062'<li class="pause glyphicon glyphicon-pause"></li>'+
1063'<li class="next glyphicon glyphicon-chevron-right"></li>'+
1064'</ul>');$buttons.insertAfter($tickercontainer);j("body").on("click", "#"+id+" .er-controls > .pause", function(){if(!run) return false;j(this).toggleClass("pause glyphicon-pause play glyphicon-play");$line.unbind('mouseenter mouseleave');run=false;});j("body").on("click", "#"+id+" .er-controls > .play", function(){if(run) return false;j(this).toggleClass("pause glyphicon-pause play glyphicon-play");run=true;setHover();var offset=$line.offset().left;var residualSpace=offset + $line.children("li:first").outerWidth(true)-initialOffset;var residualTime=currentTempo / currentSpazio * residualSpace;scrollnews(residualSpace, residualTime);});var moving=false;j("body").on("click", "#"+id+" .er-controls > .next", function(){if(run){j("#"+id+" .er-controls > .pause").toggleClass("pause glyphicon-pause play glyphicon-play");run=false;return;}if(moving) return false;var spazio=$line.children("li:first").outerWidth(true);var tempo=spazio / settings.speed * 1000;moving=true;$line.stop(true,true).animate({left:'-=' + spazio}, tempo, "linear", function () {$line.children("li:first").appendTo($line);$line.css("left", 0);moving=false;});});j("body").on("click", "#"+id+" .er-controls > .prev", function(){if(run){j("#"+id+" .er-controls > .pause").toggleClass("pause glyphicon-pause play glyphicon-play");run=false;return;}if(moving) return false;var spazio=$line.children("li:last").outerWidth(true);$line.css("left", "-"+spazio+"px");$line.children("li:last").prependTo($line);var tempo=spazio / settings.speed * 1000;moving=true;$line.stop(true,true).animate({left:'+=' + spazio}, tempo, "linear", function(){moving=false;});});}});};
1065
1066wAllowMinimize=true;/**
1067* jquery.dlmenu.js v1.0.1
1068* http://www.codrops.com
1069*
1070* Licensed under the MIT license.
1071* http://www.opensource.org/licenses/mit-license.php
1072*
1073* Copyright 2013, Codrops
1074* http://www.codrops.com
1075*/
1076;( function( $, window, undefined ) {'use strict';var Modernizr=window.Modernizr, $body=$( 'body' );$.DLMenu=function( options, element ) {this.$el=$( element );this._init( options );};$.DLMenu.defaults={animationClasses:{ classin:'dl-animate-in-1', classout:'dl-animate-out-1' },onLevelClick:function( el, name ) { return false; },onLinkClick:function( el, ev ) { return false; },backLabel:'Zurück',overviewLabel:'Übersicht',useActiveItemAsBackLabel:false,useActiveItemAsLink:true,resetOnClose:true,open:false
1077};$.DLMenu.prototype={_init:function( options ) {this.options=$.extend( true, {}, $.DLMenu.defaults, options );this._config();this.animEndEventName=this._whichAnimationEvent() + '.dlmenu';this.transEndEventName=this._whichTransitionEvent() + '.dlmenu';this.supportAnimations=true;this.supportTransitions=true;this._initEvents();},_whichTransitionEvent:function(){var t,el=document.createElement("fakeelement");var transitions={"transition":"transitionend","OTransition":"oTransitionEnd","MozTransition":"transitionend","WebkitTransition":"webkitTransitionEnd"
1078};for (t in transitions){if (el.style[t]!==undefined){return transitions[t];}}},_whichAnimationEvent:function() {var t,el=document.createElement("fakeelement");var animations={"animation":"animationend","OAnimation":"oAnimationEnd","MozAnimation":"animationend","WebkitAnimation":"webkitAnimationEnd"
1079};for (t in animations){if (el.style[t]!==undefined){return animations[t];}}},_config:function() {this.open=this.options.open;this.$trigger=jQuery('#navigationMainToggler');this.$project=jQuery('#navigationMain .projectNavigation');this.$menu=this.$el.children( 'ul.dl-menu' );this.$menuitems=this.$menu.find( 'li:not(.dl-back)' );this.options.backLabel=this.$el.data('textback');this.options.overviewLabel=this.$el.data('textoverview');if (this.options.useActiveItemAsLink) {var label=this.options.overviewLabel;this.$el.find( 'ul.dl-submenu' ).prepend(function() {var parentli=$(this).parents('li:not(.dl-back):first').find('a:first');var bg=(parentli.css('background-image')!='')?'style="background-image:'+parentli.css('background-image').replace('"', '')+'"':'';return '<li class="dl-parent"><a href="' + parentli.attr('href') + '" '+bg+'>' + parentli.text() + '</a></li>';});}this.$el.find( 'ul.dl-submenu' ).prepend( '<li class="dl-back"><a href="#">
1079' + this.options.backLabel + '</a></li>' );this.$back=this.$menu.find( 'li.dl-back' );if (this.options.useActiveItemAsBackLabel) {this.$back.each(function() {var $this=$(this),parentLabel=$this.parents('li:first').find('a:first').text();$this.find('a').html(parentLabel);});}},_initEvents:function() {var self=this;this.$trigger.on( 'click.dlmenu', function() {if( self.open ) {self._closeMenu();}else {self._openMenu();}return false;} );this.$menuitems.on( 'click.dlmenu', function( event ) {event.stopPropagation();var $item=$(this),$submenu=$item.children( 'ul.dl-submenu' );if( ($submenu.length > 0)&&!($(event.currentTarget).hasClass('dl-subviewopen'))) {event.preventDefault();var $flyin=$submenu.clone().css( 'opacity', 0 ).insertAfter( self.$menu ),onAnimationEndFn=function() {self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classout ).addClass( 'dl-subview' );$item.addClass( 'dl-subviewopen' ).parents( '.dl-subviewopen:first' ).removeClass( 'dl-subviewopen' ).addClass( 'dl-subview' );$flyin.remove();};setTimeout( function() {self._calculateHeight($flyin.height());$flyin.addClass( self.options.animationClasses.classin );self.$menu.addClass( self.options.animationClasses.classout );if( self.supportAnimations ) {self.$menu.on( self.animEndEventName, onAnimationEndFn );}else {onAnimationEndFn.call();}self.options.onLevelClick( $item, $item.children( 'a:first' ).text() );} );return false;}else {self.options.onLinkClick( $item, event );}} );this.$back.on( 'click.dlmenu', function( event ) {var $this=$( this ),$submenu=$this.parents( 'ul.dl-submenu:first' ),$item=$submenu.parent(),$flyin=$submenu.clone().insertAfter( self.$menu );var onAnimationEndFn=function() {self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classin );$flyin.remove();};setTimeout( function() {self._calculateHeight();$flyin.addClass( self.options.animationClasses.classout );self.$menu.addClass( self.options.animationClasses.classin );if( self.supportAnimations ) {self.$menu.on( self.animEndEventName, onAnimationEndFn );}else {onAnimationEndFn.call();}$item.removeClass( 'dl-subviewopen' );var $subview=$this.parents( '.dl-subview:first' );if( $subview.is( 'li' ) ) {$subview.addClass( 'dl-subviewopen' );}$subview.removeClass( 'dl-subview' );} );return false;} );},_calculateHeight:function(height){var _self=this;setTimeout( function() {if (_self.$menu.hasClass('dl-animate-out')||_self.$menu.hasClass('dl-subview')) {}else {}if (height===undefined) {_self.$el.css('min-height', 1);_self.$el.css('min-height', parseInt(_self.$menu.css('top')) + _self.$menu.outerHeight(true) + 117);}else
1080_self.$el.css('min-height', height + 117);}, 200);},closeMenu:function() {if( this.open ) {this._closeMenu();}},_closeMenu:function() {var self=this,onTransitionEndFn=function() {self.$menu.off( self.transEndEventName );if( self.options.resetOnClose ){self._resetMenu();}};this.$el.removeClass( 'dl-open' );this.$el.parent().removeClass( 'open' );this.$menu.removeClass( 'dl-menuopen' );this.$menu.addClass( 'dl-menu-toggle' );this.$el.css('min-height', 1);this.$trigger.removeClass( 'dl-active' );if( this.supportTransitions ) {this.$menu.on( this.transEndEventName, onTransitionEndFn );}else {onTransitionEndFn.call();}this.open=false;},openMenu:function() {if(!this.open ) {this._openMenu();}},_openMenu:function() {var self=this;this.$el.addClass( 'dl-open' );this.$el.parent().addClass( 'open' );this.$menu.addClass( 'dl-menuopen dl-menu-toggle' ).on( this.transEndEventName, function() {$( this ).removeClass( 'dl-menu-toggle' );} );this.$trigger.addClass( 'dl-active' );this.open=true;this._calculateHeight();},_resetMenu:function() {this.$menu.removeClass( 'dl-subview' );this.$el.css('min-height', 1);this.$menuitems.removeClass( 'dl-subview dl-subviewopen' );}};var logError=function( message ) {if ( window.console ) {window.console.error( message );}};$.fn.dlmenu=function( options ) {if ( typeof options==='string' ) {var args=Array.prototype.slice.call( arguments, 1 );this.each(function() {var instance=$.data( this, 'dlmenu' );if (!instance ) {logError( "cannot call methods on dlmenu prior to initialization; " +
1081"attempted to call method '" + options + "'" );return;}if (!$.isFunction( instance[options] )||options.charAt(0)==="_" ) {logError( "no such method '" + options + "' for dlmenu instance" );return;}instance[ options ].apply( instance, args );});}else {this.each(function() {var instance=$.data( this, 'dlmenu' );if ( instance ) {instance._init();}else {instance=$.data( this, 'dlmenu', new $.DLMenu( options, this ) );}});}return this;};} )( jQuery, window );
1082
1083wAllowMinimize=true;jQuery(document).ready(function() {$(".elementText ol li").each(function( index ) {if($(this).html().indexOf('<strong')===0){$(this).addClass('startWithStrong');}});});
1084
1085wAllowMinimize=true;jQuery(document).ready(function() {if(!supportsSVG()){$(".pictureExtension-svg img").each(function(index, element){$(this).attr('src',$(this).attr('data-svg'));});}});function supportsSVG(){return!!document.createElementNS&&!!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect;}
1086
1087wAllowMinimize=true;function showMore(page, entriesPage){var nextPage=parseInt(page)+1;var filter=$(".elementContainerFilter form");var list=$('.showMoreContainer').parents('.elementList').find('.listDefault');var ajaxURL=list.attr('data-ajax');if(ajaxURL==''){ajaxURL=$(".elementContainerFilter form input[name='ajaxURL']").val();}else{$(".elementContainerFilter form input[name='ajaxURL']").val(ajaxURL);}$('.showMoreContainer .moreButton').before('<div class="sk-circle"><div class="sk-circle1 sk-child"/><div class="sk-circle2 sk-child"/><div class="sk-circle3 sk-child"/><div class="sk-circle4 sk-child"/><div class="sk-circle5 sk-child"/><div class="sk-circle6 sk-child"/><div class="sk-circle7 sk-child"/><div class="sk-circle8 sk-child"/><div class="sk-circle9 sk-child"/><div class="sk-circle10 sk-child"/><div class="sk-circle11 sk-child"/><div class="sk-circle12 sk-child"/></div>');$('.showMoreContainer .moreButton').css('display', 'none');$('.showMoreContainer .moreButton').attr("onclick", "showMore("+nextPage+", "+entriesPage+")");$.post("/global/wGlobal/scripts/php/items/list/setFilterData.php", filter.serialize(), function(){jQuery.ajax({type:"GET", url:ajaxURL+page, success:function(result){var html=$.parseHTML(result);var listEntry=$('.listEntry', html);var n=0;
1087$.each(listEntry, function(){$('.showMoreContainer').before(listEntry[n]);n++;});$('.showMoreContainer .moreButton').css('display', 'inline-block');$('.showMoreContainer .moreButton').prev().remove();if(n!=entriesPage){$('.showMoreContainer').css('display', 'none');}jQuery(".elementCampingList a[target*='fancy']").each(function(){jQuery(this).fancybox({"type":"iframe", "maxWidth":"920px", "titlePosition":"inside",fitToView:true,autoSize:true,afterShow:function(){if(navigator.userAgent.match(/(iPod|iPhone|iPad)/)){$('.fancybox-iframe').addClass('fancybox-ios');}jQuery.fancybox.update();}, helpers:{title:{type:'inside'}, overlay:{css:{'background':'rgba(0, 0, 0, 0.2)'}}}});});setTimeout(function(){ $(window).trigger('resize'); }, 500);}});});}$("html").on("mouseover touchstart",".listEntryInnerTCSCamping .boxLeftTop", function( event ){$(".listEntryInnerTCSCamping").find(".listCampingTitleTooltop").remove();if($(this).find('span').prop('offsetWidth') < $(this).find('span').prop('scrollWidth')){$(this).after('<span class="listCampingTitleTooltop">' + $(this).attr("data-title") + '</span>');}});$("html").on("mouseleave",".listEntryInnerTCSCamping .boxLeftTop", function( event ){$(".listEntryInnerTCSCamping").find(".listCampingTitleTooltop").remove();});function listCampingFavorite(element,event){event.stopPropagation();event.preventDefault();$.post("/global/wGlobal/scripts/php/objects/camping/setCampingFavorite.php", {camping:$(element).attr('data-camping')}, function(){$('.listEntryCampingFavorite[data-camping="'+$(element).attr('data-camping')+'"]').toggleClass('listEntryCampingFavoriteActive');$.post("/global/wGlobal/scripts/php/objects/camping/getFavoriteCount.php", function(data){$('.campingFunctionFavoriteCount').html(data);});});return false;}
1088/*! jCarousel - v0.3.9 - 2018-07-30
1089* http://sorgalla.com/jcarousel/
1090* Copyright (c) 2006-2018 Jan Sorgalla; Licensed MIT */
1091
1092/*! jCarousel - v0.3.9 - 2018-07-30
1093* http://sorgalla.com/jcarousel/
1094* Copyright (c) 2006-2018 Jan Sorgalla; Licensed MIT */
1095
1096!function(t){"use strict";var i=t.jCarousel={};i.version="0.3.9";var s=/^([+\-]=)?(.+)$/;i.parseTarget=function(t){var i=!1,e="object"!=typeof t?s.exec(t):null;return e?(t=parseInt(e[2],10)||0,e[1]&&(i=!0,"-="===e[1]&&(t*=-1))):"object"!=typeof t&&(t=parseInt(t,10)||0),{target:t,relative:i}},i.detectCarousel=function(t){for(var i;t.length>0;){if((i=t.filter("[data-jcarousel]")).length>0)return i;if((i=t.find("[data-jcarousel]")).length>0)return i;t=t.parent()}return null},i.base=function(s){return{version:i.version,_options:{},_element:null,_carousel:null,_init:t.noop,_create:t.noop,_destroy:t.noop,_reload:t.noop,create:function(){return this._element.attr("data-"+s.toLowerCase(),!0).data(s,this),!1===this._trigger("create")?this:(this._create(),this._trigger("createend"),this)},destroy:function(){return!1===this._trigger("destroy")?this:(this._destroy(),this._trigger("destroyend"),this._element.removeData(s).removeAttr("data-"+s.toLowerCase()),this)},reload:function(t){return!1===this._trigger("reload")?this:(t&&this.options(t),this._reload(),this._trigger("reloadend"),this)},element:function(){return this._element},options:function(i,s){if(0===arguments.length)return t.extend({},this._options);if("string"==typeof i){if(void 0===s)return void 0===this._options[i]?null:this._options[i];this._options[i]=s}else this._options=t.extend({},this._options,i);return this},carousel:function(){return this._carousel||(this._carousel=i.detectCarousel(this.options("carousel")||this._element),this._carousel||t.error('Could not detect carousel for plugin "'+s+'"')),this._carousel},_trigger:function(i,e,r){var n,o=!1;return r=[this].concat(r||[]),(e||this._element).each(function(){n=t.Event((s+":"+i).toLowerCase()),t(this).trigger(n,r),n.isDefaultPrevented()&&(o=!0)}),!o}}},i.plugin=function(s,e){var r=t[s]=function(i,s){this._element=t(i),this.options(s),this._init(),this.create()};return r.fn=r.prototype=t.extend({},i.base(s),e),t.fn[s]=function(i){var e=Array.prototype.slice.call(arguments,1),n=this;return"string"==typeof i?this.each(function(){var r=t(this).data(s);if(!r)return t.error("Cannot call methods on "+s+' prior to initialization; attempted to call method "'+i+'"');if(!t.isFunction(r[i])||"_"===i.charAt(0))return t.error('No such method "'+i+'" for '+s+" instance");var o=r[i].apply(r,e);return o!==r&&void 0!==o?(n=o,!1):void 0}):this.each(function(){var e=t(this).data(s);e instanceof r?e.reload(i):new r(this,i)}),n},r}}(jQuery),function(t,i){"use strict";var s=t(i),e=function(t){return parseFloat(t)||0};
1096t.jCarousel.plugin("jcarousel",{animating:!1,tail:0,inTail:!1,resizeState:null,resizeTimer:null,lt:null,vertical:!1,rtl:!1,circular:!1,underflow:!1,relative:!1,_options:{list:function(){return this.element().children().eq(0)},items:function(){return this.list().children()},animation:400,transitions:!1,wrap:null,vertical:null,rtl:null,center:!1},_list:null,_items:null,_target:t(),_first:t(),_last:t(),_visible:t(),_fullyvisible:t(),_init:function(){var t=this;return t.resizeState=s.width()+"x"+s.height(),this.onWindowResize=function(){t.resizeTimer&&clearTimeout(t.resizeTimer),t.resizeTimer=setTimeout(function(){var i=s.width()+"x"+s.height();i!==t.resizeState&&(t.resizeState=i,t.reload())},100)},this},_create:function(){this._reload(),s.on("resize.jcarousel",this.onWindowResize)},_destroy:function(){s.off("resize.jcarousel",this.onWindowResize)},_reload:function(){this.vertical=this.options("vertical"),null==this.vertical&&(this.vertical=e(this.list().height())>e(this.list().width())),this.rtl=this.options("rtl"),null==this.rtl&&(this.rtl=function(i){if("rtl"===(""+i.attr("dir")).toLowerCase())return!0;var s=!1;return i.parents("[dir]").each(function(){if(/rtl/i.test(t(this).attr("dir")))return s=!0,!1}),s}(this._element)),this.lt=this.vertical?"top":"left",this.relative="relative"===this.list().css("position"),this._list=null,this._items=null;var i=this.index(this._target)>=0?this._target:this.closest();this.circular="circular"===this.options("wrap"),this.underflow=!1;var s={left:0,top:0};return i.length>0&&(this._prepare(i),this.list().find("[data-jcarousel-clone]").remove(),this._items=null,this.underflow=this._fullyvisible.length>=this.items().length,this.circular=this.circular&&!this.underflow,s[this.lt]=this._position(i)+"px"),this.move(s),this},list:function(){if(null===this._list){var i=this.options("list");this._list=t.isFunction(i)?i.call(this):this._element.find(i)}return this._list},items:function(){if(null===this._items){var i=this.options("items");this._items=(t.isFunction(i)?i.call(this):this.list().find(i)).not("[data-jcarousel-clone]")}return this._items},index:function(t){return this.items().index(t)},closest:function(){var i,s=this,r=this.list().position()[this.lt],n=t(),o=!1,l=this.vertical?"bottom":this.rtl&&!this.relative?"left":"right";return this.rtl&&this.relative&&!this.vertical&&(r+=e(this.list().width())-this.clipping()),this.items().each(function(){if(n=t(this),o)return!1;var a=s.dimension(n);if((r+=a)>=0){if(i=a-e(n.css("margin-"+l)),!(Math.abs(r)-a+i/2<=0))return!1;o=!0}}),n},target:function(){return this._target},first:function(){return this._first},last:function(){return this._last},visible:function(){return this._visible},fullyvisible:function(){return this._fullyvisible},hasNext:function(){if(!1===this._trigger("hasnext"))return!0;var t=this.options("wrap"),i=this.items().length-1,s=this.options("center")?this._target:this._last;return!!(i>=0&&!this.underflow&&(t&&"first"!==t||this.index(s)<i||this.tail&&!this.inTail))},hasPrev:function(){if(!1===this._trigger("hasprev"))return!0;var t=this.options("wrap");return!!(this.items().length>0&&!this.underflow&&(t&&"last"!==t||this.index(this._first)>0||this.tail&&this.inTail))},clipping:function(){return e(this._element["inner"+(this.vertical?"Height":"Width")]())},dimension:function(t){return e(t["outer"+(this.vertical?"Height":"Width")](!0))},scroll:function(i,s,e){if(this.animating)return this;if(!1===this._trigger("scroll",null,[i,s]))return this;t.isFunction(s)&&(e=s,s=!0);var r=t.jCarousel.parseTarget(i);if(r.relative){var n,o,l,a,h,u,c,f,d=this.items().length-1,_=Math.abs(r.target),p=this.options("wrap");if(r.target>0){var g=this.index(this._last);if(g>=d&&this.tail)this.inTail?"both"===p||"last"===p?this._scroll(0,s,e):t.isFunction(e)&&e.call(this,!1):this._scrollTail(s,e);else if(n=this.index(this._target),this.underflow&&n===d&&("circular"===p||"both"===p||"last"===p)||!this.underflow&&g===d&&("both"===p||"last"===p))this._scroll(0,s,e);else if(l=n+_,this.circular&&l>d){for(f=d,h=this.items().get(-1);f++<l;)h=this.items().eq(0),(u=this._visible.index(h)>=0)&&h.after(h.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(h),u||((c={})[this.lt]=this.dimension(h),this.moveBy(c)),this._items=null;this._scroll(h,s,e)}else this._scroll(Math.min(l,d),s,e)}else if(this.inTail)this._scroll(Math.max(this.index(this._first)-_+1,0),s,e);else if(o=this.index(this._first),n=this.index(this._target),l=(a=this.underflow?n:o)-_,a<=0&&(this.underflow&&"circular"===p||"both"===p||"first"===p))this._scroll(d,s,e);else if(this.circular&&l<0){for(f=l,h=this.items().get(0);f++<0;){h=this.items().eq(-1),(u=this._visible.index(h)>=0)&&h.after(h.clone(!0).attr("data-jcarousel-clone",!0)),this.list().prepend(h),this._items=null;var m=this.dimension(h);(c={})[this.lt]=-m,this.moveBy(c)}this._scroll(h,s,e)}else this._scroll(Math.max(l,0),s,e)}else this._scroll(r.target,s,e);return this._trigger("scrollend"),this},moveBy:function(t,i){var s=this.list().position(),r=1,n=0;return this.rtl&&!this.vertical&&(r=-1,this.relative&&(n=e(this.list().width())-this.clipping())),t.left&&(t.left=e(s.left)+n+e(t.left)*r+"px"),t.top&&(t.top=e(s.top)+n+e(t.top)*r+"px"),this.move(t,i)},move:function(i,s){s=s||{};var e=this.options("transitions"),r=!!e,n=!!e.transforms,o=!!e.transforms3d,l=s.duration||0,a=this.list();if(!r&&l>0)a.animate(i,s);else{var h=s.complete||t.noop,u={};if(r){var c={transitionDuration:a.css("transitionDuration"),transitionTimingFunction:a.css("transitionTimingFunction"),transitionProperty:a.css("transitionProperty")},f=h;h=function(){t(this).css(c),f.call(this)},u={transitionDuration:(l>0?l/1e3:0)+"s",transitionTimingFunction:e.easing||s.easing,transitionProperty:l>
10960?n||o?"all":i.left?"left":"top":"none",transform:"none"}}o?u.transform="translate3d("+(i.left||0)+","+(i.top||0)+",0)":n?u.transform="translate("+(i.left||0)+","+(i.top||0)+")":t.extend(u,i),r&&l>0&&a.one("transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd",h),a.css(u),l<=0&&a.each(function(){h.call(this)})}},_scroll:function(i,s,r){if(this.animating)return t.isFunction(r)&&r.call(this,!1),this;if("object"!=typeof i?i=this.items().eq(i):void 0===i.jquery&&(i=t(i)),0===i.length)return t.isFunction(r)&&r.call(this,!1),this;this.inTail=!1,this._prepare(i);var n=this._position(i);if(n===e(this.list().position()[this.lt]))return t.isFunction(r)&&r.call(this,!1),this;var o={};return o[this.lt]=n+"px",this._animate(o,s,r),this},_scrollTail:function(i,s){if(this.animating||!this.tail)return t.isFunction(s)&&s.call(this,!1),this;var r=this.list().position()[this.lt];this.rtl&&this.relative&&!this.vertical&&(r+=e(this.list().width())-this.clipping()),this.rtl&&!this.vertical?r+=this.tail:r-=this.tail,this.inTail=!0;var n={};return n[this.lt]=r+"px",this._update({target:this._target.next(),fullyvisible:this._fullyvisible.slice(1).add(this._visible.last())}),this._animate(n,i,s),this},_animate:function(i,s,e){if(e=e||t.noop,!1===this._trigger("animate"))return e.call(this,!1),this;this.animating=!0;var r=this.options("animation"),n=t.proxy(function(){this.animating=!1;var t=this.list().find("[data-jcarousel-clone]");t.length>0&&(t.remove(),this._reload()),this._trigger("animateend"),e.call(this,!0)},this),o="object"==typeof r?t.extend({},r):{duration:r},l=o.complete||t.noop;return!1===s?o.duration=0:void 0!==t.fx.speeds[o.duration]&&(o.duration=t.fx.speeds[o.duration]),o.complete=function(){n(),l.call(this)},this.move(i,o),this},_prepare:function(i){var s,r,n,o=this.index(i),l=o,a=this.dimension(i),h=this.clipping(),u=this.vertical?"bottom":this.rtl?"left":"right",c=this.options("center"),f={target:i,first:i,last:i,visible:i,fullyvisible:a<=h?i:t()};if(c&&(a/=2,h/=2),a<h)for(;;){if(0===(s=this.items().eq(++l)).length){if(!this.circular)break;if(s=this.items().eq(0),i.get(0)===s.get(0))break;if((r=this._visible.index(s)>=0)&&s.after(s.clone(!0).attr("data-jcarousel-clone",!0)),this.list().append(s),!r){var d={};d[this.lt]=this.dimension(s),this.moveBy(d)}this._items=null}if(0===(n=this.dimension(s)))break;if(a+=n,f.last=s,f.visible=f.visible.add(s),a-e(s.css("margin-"+u))<=h&&(f.fullyvisible=f.fullyvisible.add(s)),a>=h)break}if(!this.circular&&!c&&a<h)for(l=o;!(--l<0||0===(s=this.items().eq(l)).length||0===(n=this.dimension(s))||(a+=n,f.first=s,f.visible=f.visible.add(s),a-e(s.css("margin-"+u))<=h&&(f.fullyvisible=f.fullyvisible.add(s)),a>=h)););return this._update(f),this.tail=0,c||"circular"===this.options("wrap")||"custom"===this.options("wrap")||this.index(f.last)!==this.items().length-1||(a-=e(f.last.css("margin-"+u)))>h&&(this.tail=a-h),this},_position:function(t){var i=this._first,s=e(i.position()[this.lt]),r=this.options("center"),n=r?this.clipping()/2-this.dimension(i)/2:0;return this.rtl&&!this.vertical?(this.relative?s-=e(this.list().width())-this.dimension(i):s-=this.clipping()-this.dimension(i),s+=n):s-=n,!r&&(this.index(t)>this.index(i)||this.inTail)&&this.tail?(s=this.rtl&&!this.vertical?s-this.tail:s+this.tail,this.inTail=!0):this.inTail=!1,-s},_update:function(i){var s,e=this,r={target:this._target,first:this._first,last:this._last,visible:this._visible,fullyvisible:this._fullyvisible},n=this.index(i.first||r.first)<this.index(r.first),o=function(s){var o=[],l=[];i[s].each(function(){r[s].index(this)<0&&o.push(this)}),r[s].each(function(){i[s].index(this)<0&&l.push(this)}),n?o=o.reverse():l=l.reverse(),e._trigger(s+"in",t(o)),e._trigger(s+"out",t(l)),e["_"+s]=i[s]};for(s in i)o(s);return this}})}(jQuery,window),function(t){"use strict";t.jcarousel.fn.scrollIntoView=function(i,s,e){var r,n=t.jCarousel.parseTarget(i),o=this.index(this._fullyvisible.first()),l=this.index(this._fullyvisible.last());if((r=n.relative?n.target<0?Math.max(0,o+n.target):l+n.target:"object"!=typeof n.target?n.target:this.index(n.target))<o)return this.scroll(r,s,e);if(r>=o&&r<=l)return t.isFunction(e)&&e.call(this,!1),this;for(var a,h=this.items(),u=this.clipping(),c=this.vertical?"bottom":this.rtl?"left":"right",f=0;0!==(a=h.eq(r)).length;){if((f+=this.dimension(a))>=u){f-(parseFloat(a.css("margin-"+c))||0)!==u&&r++;break}if(r<=0)break;r--}return this.scroll(r,s,e)}}(jQuery),function(t){"use strict";
1096t.jCarousel.plugin("jcarouselControl",{_options:{target:"+=1",event:"click",method:"scroll"},_active:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onReload=t.proxy(this._reload,this),this.onEvent=t.proxy(function(i){i.preventDefault();var s=this.options("method");t.isFunction(s)?s.call(this):this.carousel().jcarousel(this.options("method"),this.options("target"))},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarousel:reloadend jcarousel:scrollend",this.onReload),this._element.on(this.options("event")+".jcarouselcontrol",this.onEvent),this._reload()},_destroy:function(){this._element.off(".jcarouselcontrol",this.onEvent),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend jcarousel:scrollend",this.onReload)},_reload:function(){var i,s=t.jCarousel.parseTarget(this.options("target")),e=this.carousel();if(s.relative)i=e.jcarousel(s.target>0?"hasNext":"hasPrev");else{var r="object"!=typeof s.target?e.jcarousel("items").eq(s.target):s.target;i=e.jcarousel("target").index(r)>=0}return this._active!==i&&(this._trigger(i?"active":"inactive"),this._active=i),this}})}(jQuery),function(t){"use strict";t.jCarousel.plugin("jcarouselPagination",{_options:{perPage:null,item:function(t){return'<a href="#'+t+'">'+t+"</a>"},event:"click",method:"scroll"},_carouselItems:null,_pages:{},_items:{},_currentPage:null,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onReload=t.proxy(this._reload,this),this.onScroll=t.proxy(this._update,this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy).on("jcarou
1096sel:reloadend",this.onReload).on("jcarousel:scrollend",this.onScroll),this._reload()},_destroy:function(){this._clear(),this.carousel().off("jcarousel:destroy",this.onDestroy).off("jcarousel:reloadend",this.onReload).off("jcarousel:scrollend",this.onScroll),this._carouselItems=null},_reload:function(){var i=this.options("perPage");if(this._pages={},this._items={},t.isFunction(i)&&(i=i.call(this)),null==i)this._pages=this._calculatePages();else for(var s,e=parseInt(i,10)||0,r=this._getCarouselItems(),n=1,o=0;0!==(s=r.eq(o++)).length;)this._pages[n]?this._pages[n]=this._pages[n].add(s):this._pages[n]=s,o%e==0&&n++;this._clear();var l=this,a=this.carousel().data("jcarousel"),h=this._element,u=this.options("item"),c=this._getCarouselItems().length;t.each(this._pages,function(i,s){var e=l._items[i]=t(u.call(l,i,s));e.on(l.options("event")+".jcarouselpagination",t.proxy(function(){var t=s.eq(0);if(a.circular){var e=a.index(a.target()),r=a.index(t);parseFloat(i)>parseFloat(l._currentPage)?r<e&&(t="+="+(c-e+r)):r>e&&(t="-="+(e+(c-r)))}a[this.options("method")](t)},l)),h.append(e)}),this._update()},_update:function(){var i,s=this.carousel().jcarousel("target");t.each(this._pages,function(t,e){if(e.each(function(){if(s.is(this))return i=t,!1}),i)return!1}),this._currentPage!==i&&(this._trigger("inactive",this._items[this._currentPage]),this._trigger("active",this._items[i])),this._currentPage=i},items:function(){return this._items},reloadCarouselItems:function(){return this._carouselItems=null,this},_clear:function(){this._element.empty(),this._currentPage=null},_calculatePages:function(){for(var t,i,s=this.carousel().data("jcarousel"),e=this._getCarouselItems(),r=s.clipping(),n=0,o=0,l=1,a={};0!==(t=e.eq(o++)).length;)n+(i=s.dimension(t))>r&&(l++,n=0),n+=i,a[l]?a[l]=a[l].add(t):a[l]=t;return a},_getCarouselItems:function(){return this._carouselItems||(this._carouselItems=this.carousel().jcarousel("items")),this._carouselItems}})}(jQuery),function(t,i){"use strict";var s,e;t.each({hidden:"visibilitychange",mozHidden:"mozvisibilitychange",msHidden:"msvisibilitychange",webkitHidden:"webkitvisibilitychange"},function(t,r){if(void 0!==i[t])return s=t,e=r,!1}),t.jCarousel.plugin("jcarouselAutoscroll",{_options:{target:"+=1",interval:3e3,autostart:!0,method:"scroll"},_timer:null,_started:!1,_init:function(){this.onDestroy=t.proxy(function(){this._destroy(),this.carousel().one("jcarousel:createend",t.proxy(this._create,this))},this),this.onAnimateEnd=t.proxy(this._start,this),this.onVisibilityChange=t.proxy(function(){i[s]?this._stop():this._start()},this)},_create:function(){this.carousel().one("jcarousel:destroy",this.onDestroy),t(i).on(e,this.onVisibilityChange),this.options("autostart")&&this.start()},_destroy:function(){this._stop(),this.carousel().off("jcarousel:destroy",this.onDestroy),t(i).off(e,this.onVisibilityChange)},_start:function(){if(this._stop(),this._started)return this.carousel().one("jcarousel:animateend",this.onAnimateEnd),this._timer=setTimeout(t.proxy(function(){this.carousel().jcarousel(this.options("method"),this.options("target"))},this),this.options("interval")),this},_stop:function(){return this._timer&&(this._timer=clearTimeout(this._timer)),this.carousel().off("jcarousel:animateend",this.onAnimateEnd),this},start:function(){return this._started=!0,this._start(),this},stop:function(){return this._started=!1,this._stop(),this}})}(jQuery,document);
1097
1098const AJAX_TECHNICAL_ERROR = "Ein technischer Fehler ist aufgetreten. Bitte versuchen Sie es später noc
vendor: 21,704 bytes, lines 1098-1174
1098hmals oder kontaktieren Sie uns unter 0844 888 111.";
1099
1100const PROGRESS_BAR_PERSONAL_DATA_SCHEMA = [
1101    {
1102        "stepName": "dataVerification",
1103        "maxTime": 2,
1104        "label": "Überprüfung der Daten"
1105    },
1106    {
1107        "stepName": "createAccount",
1108        "maxTime": 5,
1109        "label": "Konto wird erstellt"
1110    },
1111    {
1112        "stepName": "getAccount",
1113        "maxTime": 2,
1114        "label": "Konto wird geladen"
1115    },
1116    {
1117        "stepName": "IDITPortfolioPolicies",
1118        "maxTime": 3,
1119        "label": "Policen werden geladen"
1120    },
1121    {
1122        "stepName": "IDITGetPortfolio",
1123        "maxTime": 3,
1124        "label": "Portfolio wird geladen"
1125    },
1126    {
1127        "stepName": "IDITPortfolioProposals",
1128        "maxTime": 1,
1129        "label": "Offerten werden geladen"
1130    },
1131    {
1132        "stepName": "IDITGetBuyable",
1133        "maxTime": 10,
1134        "label": "Kaufbare Produkte werden geladen"
1135    },
1136    {
1137        "stepName": "IDITCreateProposal",
1138        "maxTime": 5,
1139        "label": "Offerte wird erstellt"
1140    },
1141    {
1142        "stepName": "IDITValidateCart",
1143        "maxTime": 8,
1144        "label": "Validierung der Offerte"
1145    },
1146    {
1147        "stepName": "createCart",
1148        "maxTime": 1,
1149        "label": "Warenkorb wird erstellt"
1150    },
1151    {
1152        "stepName": "done",
1153        "maxTime": 1,
1154        "label": "Abgeschlossen"
1155    }
1156];
1157
1158const PLEASE_WAIT_MESSAGE = "Nur noch ein bisschen Geduld..."
1159
1160const CARD_ASSISTANCE_NO_MATCHING_DATA="Nessun dato rilevato";
1161const CARD_ASSISTANCE_EMPTY_ARRAY="Keine Daten eingegeben";
1162
1163/**
1164 * @popperjs/core v2.11.6 - MIT License
1165 */
1166
1167/**
1168 * @popperjs/core v2.11.6 - MIT License
1169 */
1170
1171!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function w(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:w(b(e))}function x(e,n){var r;void 0===n&&(n=[]);var o=w(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(x(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e){return e.split("-")[0]}function N(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _(e,r,o){return r===H?I(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):I(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function F(e,t,o,s){var f="clippingParents"===t?function(e){var t=x(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&N(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=_(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),_(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?C(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,w=Y("number"!=typeof b?b:G(b,k)),x=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?x:m],E=F(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=I(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+w.top,bottom:B.bottom-E.bottom+w.bottom,left:E.left-B.left+w.left,right:B.right-E.right+w.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?K:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?x(e):e.contextElement?x(e.contextElement):[],popper:x(t)};var s,p,d=function(e){var t=q(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(Q(t,n)){f.rects={reference:y(t,E(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!Q(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var $={passive:!0};var ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,$)})),f&&c.addEventListener("resize",r.update,$),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,$)})),f&&c.removeEventListener("resize",r.update,$)}},data:{}};var te={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=X({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,h=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,w="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=w.x,b=w.y;var x=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),j=P,M=D,k=window;if(u){var W=E(r),H="clientHeight",T="clientWidth";if(W===t(r)&&"static"!==m(W=d(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),W=W,i===D||(i===P||i===L)&&a===B)M=A,b-=(h&&W===k&&k.visualViewport?k.visualViewport.height:W[H])-o.height,b*=p?1:-1;if(i===P||(i===D||i===A)&&a===B)j=L,y-=(h&&W===k&&k.visualViewport?k.visualViewport.width:W[T])-o.width,y*=p?1:-1}var R,S=Object.assign({position:c},u&&ne),V=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:s(t*r)/r||0,y:s(n*r)/r||0}}({x:y,y:b}):{x:y,y:b};return y=V.x,b=V.y,p?Object.assign({},S,((R={})[M]=O?"0":"",R[j]=x?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=O?b+"px":"",n[j]=x?y+"px":"",n.transform="",n))}var oe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:C(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ie={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=S.reduce((function(e,n){return e[n]=function(e,t,n){var r=C(e),o=[P,D].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[C(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=C(v),g=f||(y===v||!h?[fe(v)]:function(e){if(C(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(C(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k<b.length;k++){var B=b[k],H=C(B),T=U(B)===W,R=[D,A].indexOf(H)>=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;w[S]>x[S]&&(q=fe(q));var N=fe(q),I=[];if(i&&I.push(V[H]<=0),s&&I.push(V[q]<=0,V[N]<=0),I.every((function(e){return e}))){E=B,j=!1;break}O.set(B,I)}if(j)for(var _=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},F=h?3:1;F>0;F--){if("break"===_(F))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),w=C(t.placement),x=U(t.placement),O=!x,j=z(w),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,N="y"===j?D:P,I="y"===j?A:L,_="y"===j?"height":"width",F=k[j],X=F+b[N],Y=F-b[I],G=m?-H[_]/2:0,K=x===W?B[_]:H[_],Q=x===W?-H[_]:-B[_],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[N],ne=ee[I],re=de(0,B[_],$[_]),oe=O?B[_]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[_]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=F+ie-fe,pe=de(m?a(X,F+oe-fe-se):X,F,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-F}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(w),we=null!=(ue=null==S?void 0:S[M])?ue:0,xe=be?ye:me-B[ve]-H[ve]-we+R.altAxis,Oe=be?me+B[ve]+H[ve]-we-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(xe,me,Oe):de(m?xe:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=C(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,w=p[l],x=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(w,O,x),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&N(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),we=[ee,te,oe,ie,ae,le,he,me,ge],xe=Z({defaultModifiers:we});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=xe,e.createPopperLite=be,e.defaultModifiers=we,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})}));
1172//# sourceMappingURL=popper.min.js.map
1173
1174
vendor: 25,717 bytes, lines 1175-1176
1175!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e="undefined"!=typeof window&&"undefined"!=typeof document,n=!!e&&!!window.msCrypto,r={passive:!0,capture:!0},o=function(){return document.body};function i(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function a(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function s(t,e){return"function"==typeof t?t.apply(void 0,e):t}function u(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function p(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function c(t){return[].concat(t)}function f(t,e){-1===t.indexOf(e)&&t.push(e)}function l(t){return t.split("-")[0]}function d(t){return[].slice.call(t)}function v(t){return Object.keys(t).reduce((function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e}),{})}function m(){return document.createElement("div")}function g(t){return["Element","Fragment"].some((function(e){return a(t,e)}))}function h(t){return a(t,"MouseEvent")}function b(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function y(t){return g(t)?[t]:function(t){return a(t,"NodeList")}(t)?d(t):Array.isArray(t)?t:d(document.querySelectorAll(t))}function w(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function x(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function E(t){var e,n=c(t)[0];return null!=n&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function O(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}function C(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var T={isTouch:!1},A=0;function L(){T.isTouch||(T.isTouch=!0,window.performance&&document.addEventListener("mousemove",D))}function D(){var t=performance.now();t-A<20&&(T.isTouch=!1,document.removeEventListener("mousemove",D)),A=t}function k(){var t=document.activeElement;if(b(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var R=Object.assign({appendTo:o,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),P=Object.keys(R);function j(t){var e=(t.plugins||[]).reduce((function(e,n){var r,o=n.name,i=n.defaultValue;o&&(e[o]=void 0!==t[o]?t[o]:null!=(r=R[o])?r:i);return e}),{});return Object.assign({},t,e)}function M(t,e){var n=Object.assign({},e,{content:s(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(j(Object.assign({},R,{plugins:e}))):P).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function V(t,e){t.innerHTML=e}function I(t){var e=m();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",g(t)?e.appendChild(t):V(e,t)),e}function S(t,e){g(e.content)?(V(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?V(t,e.content):t.textContent=e.content)}function B(t){var e=t.firstElementChild,n=d(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function N(t){var e=m(),n=m();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=m();function o(n,r){var o=B(e),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||S(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(I(r.arrow))):i.appendChild(I(r.arrow)):s&&i.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),S(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props),{popper:e,onUpdate:o}}N.$$tippy=!0;var H=1,U=[],_=[];function z(e,a){var p,g,b,y,A,L,D,k,P=M(e,Object.assign({},R,j(v(a)))),V=!1,I=!1,S=!1,N=!1,z=[],F=u(wt,P.interactiveDebounce),W=H++,X=(k=P.plugins).filter((function(t,e){return k.indexOf(t)===e})),Y={id:W,reference:e,popper:m(),popperInstance:null,props:P,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:X,clearDelayTimeouts:function(){clearTimeout(p),clearTimeout(g),cancelAnimationFrame(b)},setProps:function(t){if(Y.state.isDestroyed)return;at("onBeforeUpdate",[Y,t]),bt();var n=Y.props,r=M(e,Object.assign({},n,v(t),{ignoreAttributes:!0}));Y.props=r,ht(),n.interactiveDebounce!==r.interactiveDebounce&&(pt(),F=u(wt,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?c(n.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");ut(),it(),J&&J(n,r);Y.popperInstance&&(Ct(),At().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));at("onAfterUpdate",[Y,t])},setContent:function(t){Y.setProps({content:t})},show:function(){var t=Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=T.isTouch&&!Y.props.touch,a=i(Y.props.duration,0,R.duration);if(t||e||n||r)return;if(et().hasAttribute("disabled"))return;if(at("onShow",[Y],!1),!1===Y.props.onShow(Y))return;Y.state.isVisible=!0,tt()&&($.style.visibility="visible");it(),dt(),Y.state.isMounted||($.style.transition="none");if(tt()){var u=rt(),p=u.box,c=u.content;w([p,c],0)}L=function(){var t;if(Y.state.isVisible&&!N){if(N=!0,$.offsetHeight,$.style.transition=Y.props.moveTransition,tt()&&Y.props.animation){var e=rt(),n=e.box,r=e.content;w([n,r],a),x([n,r],"visible")}st(),ut(),f(_,Y),null==(t=Y.popperInstance)||t.forceUpdate(),at("onMount",[Y]),Y.props.animation&&tt()&&function(t,e){mt(t,e)}(a,(function(){Y.state.isShown=!0,at("onShown",[Y])}))}},function(){var t,e=Y.props.appendTo,n=et();t=Y.props.interactive&&e===o||"parent"===e?n.parentNode:s(e,[n]);t.contains($)||t.appendChild($);Y.state.isMounted=!0,Ct()}()},hide:function(){var t=!Y.state.isVisible,e=Y.state.isDestroyed,n=!Y.state.isEnabled,r=i(Y.props.duration,1,R.duration);if(t||e||n)return;if(at("onHide",[Y],!1),!1===Y.props.onHide(Y))return;Y.state.isVisible=!1,Y.state.isShown=!1,N=!1,V=!1,tt()&&($.style.visibility="hidden");if(pt(),vt(),it(!0),tt()){var o=rt(),a=o.box,s=o.content;Y.props.animation&&(w([a,s],r),x([a,s],"hidden"))}st(),ut(),Y.props.animation?tt()&&function(t,e){mt(t,(function(){!Y.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&e()}))}(r,Y.unmount):Y.unmount()},hideWithInteractivity:function(t){nt().addEventListener("mousemove",F),f(U,F),F(t)},enable:function(){Y.state.isEnabled=!0},disable:function(){Y.hide(),Y.state.isEnabled=!1},unmount:function(){Y.state.isVisible&&Y.hide();if(!Y.state.isMounted)return;Tt(),At().forEach((function(t){t._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($);_=_.filter((function(t){return t!==Y})),Y.state.isMounted=!1,at("onHidden",[Y])},destroy:function(){if(Y.state.isDestroyed)return;Y.clearDelayTimeouts(),Y.unmount(),bt(),delete e._tippy,Y.state.isDestroyed=!0,at("onDestroy",[Y])}};if(!P.render)return Y;var q=P.render(Y),$=q.popper,J=q.onUpdate;$.setAttribute("data-tippy-root",""),$.id="tippy-"+Y.id,Y.popper=$,e._tippy=Y,$._tippy=Y;var G=X.map((function(t){return t.fn(Y)})),K=e.hasAttribute("aria-expanded");return ht(),ut(),it(),at("onCreate",[Y]),P.showOnCreate&&Lt(),$.addEventListener("mouseenter",(function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&nt().addEventListener("mousemove",F)})),Y;function Q(){var t=Y.props.touch;return Array.isArray(t)?t:[t,0]}function Z(){return"hold"===Q()[0]}function tt(){var t;return!(null==(t=Y.props.render)||!t.$$tippy)}function et(){return D||e}function nt(){var t=et().parentNode;return t?E(t):document}function rt(){return B($)}function ot(t){return Y.state.isMounted&&!Y.state.isVisible||T.isTouch||y&&"focus"===y.type?0:i(Y.props.delay,t?0:1,R.delay)}function it(t){void 0===t&&(t=!1),$.style.pointerEvents=Y.props.interactive&&!t?"":"none",$.style.zIndex=""+Y.props.zIndex}function at(t,e,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[t]&&n[t].apply(n,e)})),n)&&(r=Y.props)[t].apply(r,e)}function st(){var t=Y.props.aria;if(t.content){var n="aria-"+t.content,r=$.id;c(Y.props.triggerTarget||e).forEach((function(t){var e=t.getAttribute(n);if(Y.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var o=e&&e.replace(r,"").trim();o?t.setAttribute(n,o):t.removeAttribute(n)}}))}}function ut(){!K&&Y.props.aria.expanded&&c(Y.props.triggerTarget||e).forEach((function(t){Y.props.interactive?t.setAttribute("aria-expanded",Y.state.isVisible&&t===et()?"true":"false"):t.removeAttribute("aria-expanded")}))}function pt(){nt().removeEventListener("mousemove",F),U=U.filter((function(t){return t!==F}))}function ct(t){if(!T.isTouch||!S&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!Y.props.interactive||!C($,n)){if(c(Y.props.triggerTarget||e).some((function(t){return C(t,n)}))){if(T.isTouch)return;if(Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else at("onClickOutside",[Y,t]);!0===Y.props.hideOnClick&&(Y.clearDelayTimeouts(),Y.hide(),I=!0,setTimeout((function(){I=!1})),Y.state.isMounted||vt())}}}function ft(){S=!0}function lt(){S=!1}function dt(){var t=nt();t.addEventListener("mousedown",ct,!0),t.addEventListener("touchend",ct,r),t.addEventListener("touchstart",lt,r),t.addEventListener("touchmove",ft,r)}function vt(){var t=nt();t.removeEventListener("mousedown",ct,!0),t.removeEventListener("touchend",ct,r),t.removeEventListener("touchstart",lt,r),t.removeEventListener("touchmove",ft,r)}function mt(t,e){var n=rt().box;function r(t){t.target===n&&(O(n,"remove",r),e())}if(0===t)return e();O(n,"remove",A),O(n,"add",r),A=r}function gt(t,n,r){void 0===r&&(r=!1),c(Y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),z.push({node:e,eventType:t,handler:n,options:r})}))}function ht(){var t;Z()&&(gt("touchstart",yt,{passive:!0}),gt("touchend",xt,{passive:!0})),(t=Y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(gt(t,yt),t){case"mouseenter":gt("mouseleave",xt);break;case"focus":gt(n?"focusout":"blur",Et);break;case"focusin":gt("focusout",Et)}}))}function bt(){z.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),z=[]}function yt(t){var e,n=!1;if(Y.state.isEnabled&&!Ot(t)&&!I){var r="focus"===(null==(e=y)?void 0:e.type);y=t,D=t.currentTarget,ut(),!Y.state.isVisible&&h(t)&&U.forEach((function(e){return e(t)})),"click"===t.type&&(Y.props.trigger.indexOf("mouseenter")<0||V)&&!1!==Y.props.hideOnClick&&Y.state.isVisible?n=!0:Lt(t),"click"===t.type&&(V=!n),n&&!r&&Dt(t)}}function wt(t){var e=t.target,n=et().contains(e)||$.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,a=l(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=e.top-r+u>i,v=r-e.bottom-p>i,m=e.left-n+c>i,g=n-e.right-f>i;return d||v||m||g}))}(At().concat($).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:P}:null})).filter(Boolean),t)&&(pt(),Dt(t))}function xt(t){Ot(t)||Y.props.trigger.indexOf("click")>=0&&V||(Y.props.interactive?Y.hideWithInteractivity(t):Dt(t))}function Et(t){Y.props.trigger.indexOf("focusin")<0&&t.target!==et()||Y.props.interactive&&t.relatedTarget&&$.contains(t.relatedTarget)||Dt(t)}function Ot(t){return!!T.isTouch&&Z()!==t.type.indexOf("touch")>=0}function Ct(){Tt();var n=Y.props,r=n.popperOptions,o=n.placement,i=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,u=tt()?B($).arrow:null,p=a?{getBoundingClientRect:a,contextElement:a.contextElement||et()}:e,c=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(tt()){var n=rt().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];tt()&&u&&c.push({name:"arrow",options:{element:u,padding:3}}),c.push.apply(c,(null==r?void 0:r.modifiers)||[]),Y.popperInstance=t.createPopper(p,$,Object.assign({},r,{placement:o,onFirstUpdate:L,modifiers:c}))}function Tt(){Y.popperInstance&&(Y.popperInstance.destroy(),Y.popperInstance=null)}function At(){return d($.querySelectorAll("[data-tippy-root]"))}function Lt(t){Y.clearDelayTimeouts(),t&&at("onTrigger",[Y,t]),dt();var e=ot(!0),n=Q(),r=n[0],o=n[1];T.isTouch&&"hold"===r&&o&&(e=o),e?p=setTimeout((function(){Y.show()}),e):Y.show()}function Dt(t){if(Y.clearDelayTimeouts(),at("onUntrigger",[Y,t]),Y.state.isVisible){if(!(Y.props.trigger.indexOf("mouseenter")>=0&&Y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&V)){var e=ot(!1);e?g=setTimeout((function(){Y.state.isVisible&&Y.hide()}),e):b=requestAnimationFrame((function(){Y.hide()}))}}else vt()}}function F(t,e){void 0===e&&(e={});var n=R.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",L,r),window.addEventListener("blur",k);var o=Object.assign({},e,{plugins:n}),i=y(t).reduce((function(t,e){var n=e&&z(e,o);return n&&t.push(n),t}),[]);return g(t)?i[0]:i}F.defaultProps=R,F.setDefaultProps=function(t){Object.keys(t).forEach((function(e){R[e]=t[e]}))},F.currentInput=T;var W=Object.assign({},t.applyStyles,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}}),X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(null==(e=t.props.render)||!e.$$tippy)return{};var n=B(t.popper),r=n.box,o=n.content,i=t.props.animateFill?function(){var t=m();return t.className="tippy-backdrop",x([t],"hidden"),t}():null;return{onCreate:function(){i&&(r.insertBefore(i,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));o.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,x([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&x([i],"hidden")}}}};var q={clientX:0,clientY:0},$=[];function J(t){var e=t.clientX,n=t.clientY;q={clientX:e,clientY:n}}var G={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=E(t.props.triggerTarget||e),r=!1,o=!1,i=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){n.addEventListener("mousemove",f)}function p(){n.removeEventListener("mousemove",f)}function c(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),o=t.props.followCursor,i=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),u=i-s.left,p=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=i,r=a;"initial"===o&&(n=t.left+u,r=t.top+p);var s="horizontal"===o?t.top:r,c="vertical"===o?t.right:n,f="horizontal"===o?t.bottom:r,l="vertical"===o?t.left:n;return{width:c-l,height:f-s,top:s,right:c,bottom:f,left:l}}})}function l(){t.props.followCursor&&($.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",J)}(n))}function d(){0===($=$.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",J)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var i=n.followCursor;r||void 0!==i&&a.followCursor!==i&&(d(),i?(l(),!t.state.isMounted||o||s()||u()):(p(),c()))},onMount:function(){t.props.followCursor&&!o&&(i&&(f(q),i=!1),s()||u())},onTrigger:function(t,e){h(e)&&(q={clientX:e.clientX,clientY:e.clientY}),o="focus"===e.type},onHidden:function(){t.props.followCursor&&(c(),p(),i=!0)}}}};var K={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,o=!1,i=[],a={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var a=o.state;t.props.inlinePositioning&&(-1!==i.indexOf(a.placement)&&(i=[]),e!==a.placement&&-1===i.indexOf(a.placement)&&(i.push(a.placement),t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var o=n[0],i=n[n.length-1],a="top"===t,s=o.top,u=i.bottom,p=a?o.left:i.left,c=a?o.right:i.right;return{top:s,bottom:u,left:p,right:c,width:c-p,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return"left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(l(t),n.getBoundingClientRect(),d(n.getClientRects()),r)}(a.placement)}})),e=a.placement)}};function s(){var e;o||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,a),o=!0,t.setProps(e),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(e,n){if(h(n)){var o=d(t.reference.getClientRects()),i=o.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY})),a=o.indexOf(i);r=a>-1?a:r}},onHidden:function(){r=-1}}}};var Q={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var o=null,i=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Z(o,s)||u&&Z(i,u))&&t.popperInstance&&t.popperInstance.update(),o=s,i=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function Z(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return e&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}('.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}'),F.setDefaultProps({plugins:[Y,G,K,Q],render:N}),F.createSingleton=function(t,e){var n;void 0===e&&(e={});var r,o=t,i=[],a=[],s=e.overrides,u=[],f=!1;function l(){a=o.map((function(t){return c(t.props.triggerTarget||t.reference)})).reduce((function(t,e){return t.concat(e)}),[])}function d(){i=o.map((function(t){return t.reference}))}function v(t){o.forEach((function(e){t?e.enable():e.disable()}))}function g(t){return o.map((function(e){var n=e.setProps;return e.setProps=function(o){n(o),e.reference===r&&t.setProps(o)},function(){e.setProps=n}}))}function h(t,e){var n=a.indexOf(e);if(e!==r){r=e;var u=(s||[]).concat("content").reduce((function(t,e){return t[e]=o[n].props[e],t}),{});t.setProps(Object.assign({},u,{getReferenceClientRect:"function"==typeof u.getReferenceClientRect?u.getReferenceClientRect:function(){var t;return null==(t=i[n])?void 0:t.getBoundingClientRect()}}))}}v(!1),d(),l();var b={fn:function(){return{onDestroy:function(){v(!0)},onHidden:function(){r=null},onClickOutside:function(t){t.props.showOnCreate&&!f&&(f=!0,r=null)},onShow:function(t){t.props.showOnCreate&&!f&&(f=!0,h(t,i[0]))},onTrigger:function(t,e){h(t,e.currentTarget)}}}},y=F(m(),Object.assign({},p(e,["overrides"]),{plugins:[b].concat(e.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],[W])})})),w=y.show;y.show=function(t){if(w(),!r&&null==t)return h(y,i[0]);if(!r||null!=t){if("number"==typeof t)return i[t]&&h(y,i[t]);if(o.indexOf(t)>=0){var e=t.reference;return h(y,e)}return i.indexOf(t)>=0?h(y,t):void 0}},y.showNext=function(){var t=i[0];if(!r)return y.show(0);var e=i.indexOf(r);y.show(i[e+1]||t)},y.showPrevious=function(){var t=i[i.length-1];if(!r)return y.show(t);var e=i.indexOf(r),n=i[e-1]||t;y.show(n)};var x=y.setProps;return y.setProps=function(t){s=t.overrides||s,x(t)},y.setInstances=function(t){v(!0),u.forEach((function(t){return t()})),o=t,v(!1),d(),l(),u=g(y),y.setProps({triggerTarget:a})},u=g(y),y},F.delegate=function(t,e){var n=[],o=[],i=!1,a=e.target,s=p(e,["target"]),u=Object.assign({},s,{trigger:"manual",touch:!1}),f=Object.assign({touch:R.touch},s,{showOnCreate:!0}),l=F(t,u);function d(t){if(t.target&&!i){var n=t.target.closest(a);if(n){var r=n.getAttribute("data-tippy-trigger")||e.trigger||R.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof f.touch||"touchstart"!==t.type&&r.indexOf(X[t.type])<0)){var s=F(n,f);s&&(o=o.concat(s))}}}}function v(t,e,r,o){void 0===o&&(o=!1),t.addEventListener(e,r,o),n.push({node:t,eventType:e,handler:r,options:o})}return c(l).forEach((function(t){var e=t.destroy,a=t.enable,s=t.disable;t.destroy=function(t){void 0===t&&(t=!0),t&&o.forEach((function(t){t.destroy()})),o=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,o=t.options;e.removeEventListener(n,r,o)})),n=[],e()},t.enable=function(){a(),o.forEach((function(t){return t.enable()})),i=!1},t.disable=function(){s(),o.forEach((function(t){return t.disable()})),i=!0},function(t){var e=t.reference;v(e,"touchstart",d,r),v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d)}(t)})),l},F.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;_.forEach((function(t){var e=!1;if(n&&(e=b(n)?t.reference===n:t.popper===n.popper),!e){var o=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:o})}}))},F.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',F}));
1176//# sourceMappingURL=tippy-bundle.umd.min.js.map
1177
1178
1179const BREAKPOINT_SM = 523; // From mobile to tablet
1180const BREAKPOINT_LG = 966; // From tablet to desktop
1181const BREAKPOINT_983 = 983;
1182
1183wAllowMinimize=true;jQuery(document).ready(function() {var inView=isScrolledIntoViewMain($('#navigationMain'));if(inView==false&&window.matchMedia('(min-width:'+BREAKPOINT_983+'px)').matches){$('.stickyBarMain').addClass('visible');}else{$('.stickyBarMain').removeClass('visible');}$( window ).on('scroll',function() {if(inView!=isScrolledIntoViewMain($('#navigationMain'))){inView=isScrolledIntoViewMain($('#navigationMain'));if(inView==false&&window.matchMedia('(min-width:'+BREAKPOINT_983+'px)').matches){$('.stickyBarMain').addClass('visible');}else{$('.stickyBarMain').removeClass('visible');}}});$("#navigationMain div.navLevel1, #navigationMainSticky div.navLevel1").on("mouseenter", function() {$(this).children('.navLevel2Container').stop(true).delay(500).slideDown(0);}).on("mouseleave", function(){$(this).children('.navLevel2Container').stop(true).delay(250).slideUp(0);});$("#navigationMain .navLevel1Container, #navigationMainSticky .navLevel1Container").on("mouseenter", function() {$('.navigationOverlay').stop(true).delay(500).slideDown(0)
1184}).on("mouseleave", function(){$('.navigationOverlay').stop(true).delay(250).slideUp(0);});$("#navigationMain .navLevel2ContainerClose a, #navigationMainSticky .navLevel2ContainerClose a").on('click',function() {$(this).parent().parent().parent().parent().slideUp(0);});$('#navigationMain').on('click','#mobileMenuSmall .navLevel1Open > a, #mobileMenuSmall .navLevel1OpenLast > a, #mobileMenuSmall .navLevel2Open > a, #mobileMenuSmall .navLevel2OpenLast > a',function(e) {if ((e.target.offsetWidth-e.offsetX) < 53) {e.preventDefault();$(this).next().toggle();$(this).toggleClass('navMobileMenuOpen');}});});window.matchMedia('(min-width:'+BREAKPOINT_SM+'px)').addEventListener('change', event=> {if (event.matches) {$('.navLevel2Container:hidden').removeAttr("style");}})
1185window.matchMedia('(min-width:'+BREAKPOINT_983+'px)').addEventListener('change', event=> {if (isScrolledIntoViewMain($('#navigationMain'))===false&&event.matches) {$('.stickyBarMain').addClass('visible');} else {$('.stickyBarMain').removeClass('visible');}})
1186function isScrolledIntoViewMain(elem){var docViewTop=$(window).scrollTop();var docViewBottom=docViewTop + $(window).height();var elemTop=$(elem).offset().top;var elemBottom=elemTop + $(elem).height();if(docViewTop >=elemBottom){return false;}return true;}
1187
1188jQuery(document).ready(function() {
1189
1190  $("#blockTop #searchBox .searchLink").on('click',function() {
1191    $('#frmSearch').submit();
1192  });
1193
1194});
1195
1196jQuery(document).ready(function() {
1197  jQuery("#stickyBar .switcher").on('click',function(){
1198    $(this).parent().toggleClass('closed');
1199    $(this).parent().toggleClass('open');
1200  });
1201});
1202
1203
1204ajaxQueueService.enqueueAjaxCall('/global/wGlobal/scripts/php/ecommerce/saveCookie.php', { method: 'POST' });
1205
1206var datePickerReload = false;
1207
1208var isSmallDevice = 0;
1209if (window.matchMedia("(max-width: 768px)").matches) {
1210    isSmallDevice = 1;
1211}
1212
1213$(window).on('resize', function () {
1214    if (window.matchMedia("(max-width: 768px)").matches) {
1215        isSmallDevice = 1;
1216    }
1217});
1218
1219$.fn.isInViewport = function () {
1220    var elementTop = $(this).offset().top;
1221    var elementBottom = elementTop + $(this).outerHeight();
1222
1223    var viewportTop = $(window).scrollTop();
1224    var viewportBottom = viewportTop + $(window).height();
1225
1226    return elementBottom > viewportTop && elementTop < viewportBottom;
1227};
1228
1229function ecomKeyupDelay(callback, ms) {
1230    var timer = 0;
1231    return function () {
1232        var context = this, args = arguments;
1233        clearTimeout(timer);
1234        timer = setTimeout(function () {
1235            callback.apply(context, args);
1236        }, ms || 0);
1237    };
1238}
1239
1240function checkNavigationBasketSticky() {
1241    if (jQuery(".ecommerce .contentLeft .basketNavigationCheck").isInViewport()) {
1242        $(".ecommerce .contentLeft .basketNavigation").addClass('basketNavigation-fixed');
1243    } else {
1244        $(".ecommerce .contentLeft .basketNavigation").removeClass('basketNavigation-fixed');
1245    }
1246}
1247
1248$(document).ready(function () {
1249    if ($('.ecommerce .contentLeft .basketNavigationCheck').is(':visible')) {
1250        checkNavigationBasketSticky();
1251    }
1252
1253    jQuery(window).on('scroll', function () {
1254        if ($('.ecommerce .contentLeft .basketNavigationCheck').is(':visible')) {
1255            checkNavigationBasketSticky();
1256        }
1257    });
1258
1259    $(window).on('resize', function () {
1260        if ($('.phoneContainer').length) {
1261            var width100 = $('.phoneContainer div:first-child').width();
1262            var width30 = (width100 / 100) * 30;
1263            $('.phoneContainer input.phone').prev().css('width', width30);
1264        }
1265    });
1266});
1267
1268function ecommerce_MembershipChoice(answer, element) {
1269    if (!$(element).hasClass('choiceEntryActive')) {
1270        $(element).parent().find('.choiceEntry').removeClass('choiceEntryActive');
1271        $(element).addClass('choiceEntryActive');
1272        var file;
1273        if (answer == 'yes') {
1274            file = '/global/wGlobal/scripts/php/ecommerce/process/ad
1274dToBasket/addToBasket.php';
1275        } else if (answer == 'no') {
1276            file = '/global/wGlobal/scripts/php/ecommerce/process/addToBasket/alreadyMemberNo.php';
1277        }
1278        $('.loadingBox').show();
1279        $('.contentBox').hide();
1280        $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1281        if (window.matchMedia("(max-width: 768px)").matches) {
1282            $('.ecommerce .noticeMembership').hide();
1283        }
1284        $.post(file, {alreadyMember: answer}, function (data) {
1285            if (answer == 'no') {
1286                $(".loadingBox").hide();
1287                $(".contentBox").show();
1288                $(".contentBox").css("top", $(document).scrollTop() + 20);
1289            }
1290            $('.ecommerce .membershipContent').html(data);
1291        });
1292    }
1293}
1294
1295function ecommerce_MembershipChoicePhysical(answer, element, isMandatory = false) {
1296    if (!$(element).hasClass('choiceEntryActive')) {
1297        $(element).parent().find('.choiceEntry').removeClass('choiceEntryActive');
1298        $(element).addClass('choiceEntryActive');
1299        var file;
1300        if (answer == 'yes') {
1301            file = $(window.location).attr('origin') + '/global/wGlobal/scripts/php/physical/process/addToBasket/alreadyMemberYes.php';
1302            window.location.href = file;
1303        } else if (answer == 'no' && !isMandatory) {
1304            file = '/global/wGlobal/scripts/php/physical/process/addToBasket/addToBasket.php';
1305            $('.loadingBox').show();
1306            $('.contentBox').hide();
1307            $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1308            $.post(file, {isSmallDevice: isSmallDevice, alreadyAskedMembership: '1'}, function (data) {
1309                $('.ecommerce .membershipContent').html(data);
1310            });
1311        } else {
1312            ecommerce_CloseContentBox();
1313        }
1314    }
1315}
1316
1317function ecommerce_ETIChoice(answer, element) {
1318    if (!$(element).hasClass('choiceEntryActive')) {
1319        $(element).parent().find('.choiceEntry').removeClass('choiceEntryActive');
1320        $(element).addClass('choiceEntryActive');
1321        var file;
1322        if (answer == 'yes') {
1323            file = '/global/wGlobal/scripts/php/ecommerce/process/addToBasket/alreadyMemberYes.php';
1324        } else if (answer == 'no') {
1325            file = '/global/wGlobal/scripts/php/ecommerce/process/addToBasket/etiNo.php';
1326        }
1327        $('.loadingBox').show();
1328        $('.contentBox').hide();
1329        $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1330        if (window.matchMedia("(max-width: 768px)").matches) {
1331            $('.ecommerce .noticeMembership').hide();
1332        }
1333        $.post(file, function (data) {
1334            $(".loadingBox").hide();
1335            $(".contentBox").show();
1336            $(".contentBox").css("top", $(document).scrollTop() + 20);
1337            $('.ecommerce .membershipContent').html(data);
1338        });
1339    }
1340}
1341
1342function ecommerce_MembershipOptionalChoice(answer, element) {
1343    if (!$(element).hasClass('choiceEntryActive')) {
1344        $(element).parent().find('.choiceEntry').removeClass('choiceEntryActive');
1345        $(element).addClass('choiceEntryActive');
1346        $('.membershipOptionalContentYes').hide();
1347        $('.membershipOptionalContent').hide();
1348        if (answer == 'yes') {
1349            $('.membershipOptionalContentYes').show();
1350            $('.proposedProductList').slick("getSlick").refresh();
1351            $('.membershipOptionalContent').show();
1352        } else if (answer == 'no') {
1353            $('.loadingBox').show();
1354            $('.contentBox').hide();
1355            $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1356
1357            $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1358                $('.contentBox .ecommerce').html(data);
1359            });
1360        }
1361    }
1362}
1363
1364function ecommerce_selectUpgrade(element) {
1365    if (!$(element).hasClass('upgradeOptionActive')) {
1366        var container = $(element).parent();
1367        container.find('.upgradeOptionActive').removeClass('upgradeOptionActive');
1368        $(element).addClass('upgradeOptionActive');
1369        container.find('input').val($(element).attr('data-value'));
1370
1371        $.post("/global/wGlobal/scripts/php/ecommerce/getPrice.php", $(element).closest('.upgradeForm').serialize() + '&productFilter=' + $(element).closest('.upgradeProduct').attr('data-product'), function (data) {
1372            $(element).closest('.upgradeProduct').find('.upgradePrice').html(data);
1373        });
1374
1375        $.post("/global/wGlobal/scripts/php/ecommerce/process/ad
1375dToBasket/upgradeNotice.php", $(element).closest('.upgradeForm').serialize() + '&productFilter=' + $(element).closest('.upgradeProduct').attr('data-product'), function (data) {
1376            $(element).closest('.upgradeProduct').find('.upgradeNotice').html(data);
1377        });
1378    }
1379}
1380
1381function ecommerce_selectUpgradeOptional(element) {
1382    if ($(element).val() == 'acquisition' && $(element).is(':checked')) {
1383        $(element).closest('.upgradeOptionalProduct').find('.upgradeOptionalFormEntrySelect input').prop('checked', false);
1384        $(element).closest('.upgradeOptionalProduct').find('.upgradeOptionalFormEntrySelect input').attr('disabled', 'disabled');
1385    } else if ($(element).val() == 'upgrade' && $(element).is(':checked')) {
1386        $(element).closest('.upgradeOptionalProduct').find('.upgradeOptionalFormEntrySelect input').removeAttr('disabled');
1387    }
1388
1389    $('.upgradeOptionalProduct').each(function (index) {
1390        if ($(this).find('input:checked').length > 0) {
1391            if ($(this).find('input[value=upgrade]:checked').length > 0) {
1392                if ($(this).find('.upgradeOptionalFormEntrySelect input:checked').length > 0) {
1393                    $('.upgradeButtons .ecommerceButtonForward').removeClass('ecommerceButtonBuyInactive');
1394                } else {
1395                    $('.upgradeButtons .ecommerceButtonForward').addClass('ecommerceButtonBuyInactive');
1396                }
1397            } else {
1398                $('.upgradeButtons .ecommerceButtonForward').removeClass('ecommerceButtonBuyInactive');
1399            }
1400        } else {
1401            $('.upgradeButtons .ecommerceButtonForward').addClass('ecommerceButtonBuyInactive');
1402        }
1403    });
1404}
1405
1406function ecommerce_upgradeOptionalSend(element) {
1407    if (!$(element).hasClass('ecommerceButtonBuyInactive')) {
1408
1409        $('.loadingBox').show();
1410        $('.contentBox').hide();
1411        $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1412
1413        var buy = true;
1414        $('.upgradeOptionalProduct').each(function (index) {
1415            if ($(this).find('input[value=upgrade]:checked').length > 0) {
1416                buy = false;
1417            }
1418        });
1419
1420        if (buy == true) {
1421            $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', $('.upgradeOpionalForm').serialize() + '&optionalUpgradeProcess=1', function (data) {
1422                $('.contentBox .ecommerce').html(data);
1423            });
1424        } else {
1425            $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/upgrade.php', $('.upgradeOpionalForm').serialize() + '&optionalUpgradeProcess=1', function (data) {
1426                $(".loadingBox").hide();
1427                $(".contentBox").show();
1428                $(".contentBox").css("top", $(document).scrollTop() + 20);
1429                $('.contentBox .ecommerce').html(data);
1430            });
1431        }
1432    }
1433}
1434
1435function ecommerce_upgradeAddToBasket() {
1436    $('.loadingBox').show();
1437    $('.contentBox').hide();
1438    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1439    var total = $('.upgradeForm').length;
1440    $('.upgradeForm').each(function (index) {
1441        $.post("/global/wGlobal/scripts/php/ecommerce/process/addToBasket/upgradeSelect.php", $(this).serialize(), function (data) {
1442            if (index === total - 1) {
1443                $.post("/global/wGlobal/scripts/php/ecommerce/process/addToBasket/upgradeSend.php", $(this).serialize(), function (data) {
1444                    if (data == 'Upgrade') {
1445                        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', function (data) {
1446                            $('.contentBox .ecommerce').html(data);
1447                        });
1448                    } else {
1449                        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/setReplaceFormData.php', {upgradeProcess: 1}, function () {
1450                            $.post('/global/wGlobal/scripts/php/ecommerce/process/getProcessPage.php', function (data) {
1451                                window.location.href = data;
1452                            });
1453                        });
1454                    }
1455                });
1456            }
1457        });
1458    });
1459
1460}
1461
1462function ecommerce_upgradePortfolio(element, event) {
1463    event.stopPropagation();
1464    $('.loadingBox').show();
1465    $('.contentBoxOverlay').show();
1466    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1467
1468    $.post("/global/wGlobal/scripts/php/ecommerce/process/addToBasket/initialize.php", function (data) {
1469        $('.contentBoxInner').html(data);
1470        $.post("/global/wGlobal/scripts/php/ecommerce/process/addToBasket/start.php", {portfolioUpgrade: $(element).next().val()}, function (data) {
1471            $('.contentBoxInner').html(data);
1472        });
1473    });
1474}
1475
1476function ecommerce_upgradePortfolioMembership(redirect) {
1477    window.location.href = redirect;
1478}
1479
1480function ecommerce_membershipUpgradeLogin(checkOptions) {
1481    $('.loadingBox').show();
1482    $('.contentBoxOverlay').show();
1483    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1484
1485    $.post("/global/wGlobal/scripts/php/ecommerce/process/addToBasket/initialize.php", function (data) {
1486        $('.contentBoxInner').html(data);
1487        var noOption = 0;
1488        if (checkOptions == 1 && $('.selectContainer').length == 0) {
1489            noOption = 1;
1490        }
1491        $.post("/global/wGlobal/scripts/php/ecommerce/process/addToBasket/start.php", $("#ecommerce").serialize() + '&membershipUpgradeLogin=1&noOption=' + noOption, function (data) {
1492            $('.contentBoxInner').html(data);
1493        });
1494    });
1495}
1496
1497function ecommerce_SelectProduct(element) {
1498    $('.loadingBox').show();
1499    $('.contentBox').hide();
1500    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1501
1502    $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/selectProduct.php', {
1503        product: $(element).attr('data-value'),
1504        age: $(element).attr('data-age')
1505    }, function () {
1506        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1507            $('.contentBox .ecommerce').html(data);
1508        });
1509    });
1510}
1511
1512function ecommerce_goToBasket() {
1513    $.post('/global/wGlobal/scripts/php/ecommerce/process/getProcessPage.php', function (data) {
1514        window.location.href = data;
1515    });
1516}
1517
1518function ecommerce_goToBasketPhysical() {
1519    $.post('/global/wGlobal/scripts/php/physical/process/getProcessPage.php', function (data) {
1520        window.location.href = data;
1521    });
1522}
1523
1524function ecommerce_goToReplaceForm(element) {
1525    $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/setReplaceFormData.php', {
1526        productRemove: element.attr('data-product-remove'),
1527        productAdd: element.attr('data-product-add')
1528    }, function () {
1529        $.post('/global/wGlobal/scripts/php/ecommerce/process/getProcessPage.php', function (data) {
1530            window.location.href = data;
1531        });
1532    });
1533}
1534
1535function ecommerce_replaceProduct(element) {
1536    $('.loadingBox').show();
1537    $('.contentBox').hide();
1538    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1539    $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/replaceProduct.php', {
1540        productRemove: element.attr('data-product-remove'),
1541        productAdd: element.attr('data-product-add'),
1542        alreadyInAddToBasket: element.attr('data-alreadyInAddToBasket')
1543    }, function () {
1544        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1545            $('.contentBox .ecommerce').html(data);
1546        });
1547    });
1548
1549}
1550
1551function ecommerce_resetValidation(element) {
1552    if (element == '') {
1553        $('.ecommerce label').removeClass('invalidInput');
1554        $('.ecommerce input').removeClass('invalidInput');
1555        $('.ecommerce textarea').removeClass('invalidInput');
1556        $('.ecommerce .familyMemberError').removeClass('familyMemberError');
1557        $('.ecommerce .wglErrorMessageInline').remove();
1558        $('.ecommerce .formEntry').removeClass('hasError');
1559        $('.ecommerce .multiInput').removeClass('hasError');
1560    } else {
1561        var label = $(element).parent().prev('label');
1562        $(label).removeClass('invalidInput');
1563        $(element).removeClass('invalidInput');
1564        $(element).siblings('.wglErrorMessageInline').remove();
1565        $(element).closest('.formEntry').removeClass('hasError');
1566        $(element).closest('.multiInput').removeClass('hasError');
1567        if ((element).attr('name') == 'engravingValue') {
1568            $('.engravingTextError').hide();
1569            $('.engravingTextInfo').hide();
1570            if ($('input[name="engravingType"]:checked').val() == '01') {
1571                $('.engravingTextInfoInitials').show();
1572            } else if ($('input[name="engravingType"]:checked').val() == '02') {
1573                $('.engravingTextInfoName').show();
1574            }
1575        }
1576    }
1577}
1578
1579function ecommerce_addToBasketMember(redirect) {
1580    $('.ecommerceLoginError').html('');
1581    ecommerce_resetValidation('');
1582    $('.loadingBox').show();
1583    $('.contentBox').hide();
1584    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1585
1586    if ($('.ecommerce input[name="prename"]').val() != '' || $('.ecommerce input[name="surname"]').val() != '' || $('.ecommerce input[name="membernumber"]').val() != '') {
1587
1588        ecommerce_validateField($('.ecommerce input[name="prename"]'), 'required', 40, '');
1589        ecommerce_validateField($('.ecommerce input[name="surname"]'), 'required', 80, '');
1590        ecommerce_validateField($('.ecommerce input[name="membernumber"]'), 'memberNumber', 0, '');
1591
1592        $.post('/global/wGlobal/scripts/php/ecommerce/process/ad
1592dToBasket/loginMember.php', $('.ecommerce .memberLogin').serialize(), function (data) {
1593            if (data != '1') {
1594                ecommerce_showError(data, $('.ecommerceLoginError'));
1595
1596                $(".loadingBox").hide();
1597                $(".contentBox").show();
1598                $(".contentBox").css("top", $(document).scrollTop() + 20);
1599            } else if (redirect != '') {
1600                window.location.href = redirect;
1601            } else {
1602                $('.ecommerce').hide();
1603                $('html, body').animate({
1604                    scrollTop: $(".contentBox").offset().top - 20
1605                }, 500);
1606                $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1607                    $('.contentBox .ecommerce').html(data);
1608                    $('.ecommerce').show();
1609                });
1610            }
1611
1612        });
1613
1614    } else if ($('.ecommerce input[name="mailLogin"]').val() != '' || $('.ecommerce input[name="passwordLogin"]').val() != '') {
1615
1616        ecommerce_validateField($('.ecommerce input[name="mailLogin"]'), 'required', '', '');
1617        ecommerce_validateField($('.ecommerce input[name="passwordLogin"]'), 'required', '', '');
1618
1619        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMemberOnline.php', $('.ecommerce .memberLogin').serialize(), function (data) {
1620            if (data != '1') {
1621                ecommerce_showError(data, $('.ecommerceLoginError'));
1622
1623                $(".loadingBox").hide();
1624                $(".contentBox").show();
1625                $(".contentBox").css("top", $(document).scrollTop() + 20);
1626            } else if (redirect != '') {
1627                window.location.href = redirect;
1628            } else {
1629                $('.ecommerce').hide();
1630                $('html, body').animate({
1631                    scrollTop: $(".contentBox").offset().top - 20
1632                }, 500);
1633                $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1634                    $('.contentBox .ecommerce').html(data);
1635                    $('.ecommerce').show();
1636                });
1637            }
1638
1639        });
1640
1641    } else {
1642
1643        ecommerce_showError('memberLogin_noInput', $('.ecommerceLoginError'));
1644
1645        $(".loadingBox").hide();
1646        $(".contentBox").show();
1647        $(".contentBox").css("top", $(document).scrollTop() + 20);
1648
1649    }
1650}
1651
1652function ecommerce_addToBasketMemberPhysical() {
1653    $('.ecommerceLoginError').html('');
1654    ecommerce_resetValidation('');
1655    $('.loadingBox').show();
1656    $('.contentBox').hide();
1657    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
1658
1659    if ($('.ecommerce input[name="prename"]').val() != '' || $('.ecommerce input[name="surname"]').val() != '' || $('.ecommerce input[name="membernumber"]').val() != '') {
1660
1661        ecommerce_validateField($('.ecommerce input[name="prename"]'), 'required', 40, '');
1662        ecommerce_validateField($('.ecommerce input[name="surname"]'), 'required', 80, '');
1663        ecommerce_validateField($('.ecommerce input[name="membernumber"]'), 'memberNumber', 0, '');
1664
1665        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMember.php', $('.ecommerce .memberLogin').serialize(), function (data) {
1666            if (data != '1') {
1667                ecommerce_showError(data, $('.ecommerceLoginError'));
1668
1669                $(".loadingBox").hide();
1670                $(".contentBox").show();
1671                $(".contentBox").css("top", $(document).scrollTop() + 20);
1672            } else {
1673                $('.ecommerce').hide();
1674                $('html, body').animate({
1675                    scrollTop: $(".contentBox").offset().top - 20
1676                }, 500);
1677                $.post('/global/wGlobal/scripts/php/physical/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1678                    $('.contentBox .ecommerce').html(data);
1679                    $('.ecommerce').show();
1680                });
1681            }
1682
1683        });
1684
1685    } else if ($('.ecommerce input[name="mailLogin"]').val() != '' || $('.ecommerce input[name="passwordLogin"]').val() != '') {
1686
1687        ecommerce_validateField($('.ecommerce input[name="mailLogin"]'), 'required', '', '');
1688        ecommerce_validateField($('.ecommerce input[name="passwordLogin"]'), 'required', '', '');
1689
1690        $.post('/global/wGlobal/scripts/php/ecommerce/process/ad
1690dToBasket/loginMemberOnline.php', $('.ecommerce .memberLogin').serialize(), function (data) {
1691            if (data != '1') {
1692                ecommerce_showError(data, $('.ecommerceLoginError'));
1693
1694                $(".loadingBox").hide();
1695                $(".contentBox").show();
1696                $(".contentBox").css("top", $(document).scrollTop() + 20);
1697            } else {
1698                $('.ecommerce').hide();
1699                $('html, body').animate({
1700                    scrollTop: $(".contentBox").offset().top - 20
1701                }, 500);
1702                $.post('/global/wGlobal/scripts/php/physical/process/addToBasket/addToBasket.php', {isSmallDevice: isSmallDevice}, function (data) {
1703                    $('.contentBox .ecommerce').html(data);
1704                    $('.ecommerce').show();
1705                });
1706            }
1707
1708        });
1709
1710    } else {
1711
1712        ecommerce_showError('memberLogin_noInput', $('.ecommerceLoginError'));
1713
1714        $(".loadingBox").hide();
1715        $(".contentBox").show();
1716        $(".contentBox").css("top", $(document).scrollTop() + 20);
1717
1718    }
1719}
1720
1721var _errorMessageCache = _errorMessageCache || {};
1722function ecommerce_showError(error, element, isFailProcess = false) {
1723    if (isFailProcess) {
1724        return ecommerce_printError(error, element);
1725    }
1726    if (_errorMessageCache[error]) {
1727        return ecommerce_printError(_errorMessageCache[error], element);
1728    }
1729    return $.post('/global/wGlobal/scripts/php/ecommerce/process/getError.php', { error: encodeURIComponent(error) }, function (data) {
1730        _errorMessageCache[error] = data;
1731        ecommerce_printError(data, element);
1732    });
1733}
1734
1735function ecommerce_printError(error, element) {
1736    if (checkEncodeURI(error)) {
1737        error = decodeURIComponent(error);
1738    }
1739    $(element).html(error);
1740    $('input[name="birthdayPicker"]').each(function (index) {
1741        if ($(this).is(":focus")) {
1742            $(this).datepicker("hide");
1743            $(this).datepicker("show");
1744        }
1745    });
1746}
1747
1748/**
1749 * Check if the given string is encoded by testing if it contains
1750 * a percent sign not followed by a space
1751 *
1752 * @param str
1753 * @returns {boolean}
1754 */
1755function checkEncodeURI(str) {
1756    return /\%(?! )/i.test(str)
1757}
1758
1759function ecommerce_validateField(element, validation, maxlength, values, country) {
1760    var value = $(element).val();
1761    var label = $(element).parent().prev('label');
1762    var name = $(element).attr('name');
1763    var form = $(element).closest('form');
1764    var check = true;
1765    if ($(element).hasClass('memberNumber')) {
1766        name = 'membernumber';
1767    }
1768    if ($(element).hasClass('birthday')) {
1769        if ($(element).attr('type') != 'date' && $(element).attr('name') != 'birthdayPicker') {
1770            value = $(element).parent().parent().find('select[name$="jahr"]').val() + '-' + $(element).parent().parent().find('select[name$="monat"]').val() + '-' + $(element).parent().parent().find('select[name$="tag"]').val();
1771        }
1772        name = 'birthday';
1773        ecommerce_resetValidation($(element).parent().parent().find('select[name$="jahr"]'));
1774        ecommerce_resetValidation($(element).parent().parent().find('select[name$="monat"]'));
1775        ecommerce_resetValidation($(element).parent().parent().find('select[name$="tag"]'));
1776        ecommerce_resetValidation($(element).parent().parent().find('input[name$="birthdayPicker"]'));
1777    }
1778
1779    if (name == 'passwordRepeat') {
1780        if ($(element).parent().parent().parent().find('input[name$="password"]').val() != '' && $(element).parent().parent().parent().find('input[name$="password"]').val() != $(element).parent().parent().parent().find('input[name$="passwordRepeat"]').val()) {
1781            check = false;
1782        } else {
1783            ecommerce_resetValidation($(element).parent().parent().parent().find('input[name$="passwordRepeat"]'));
1784        }
1785    }
1786
1787    if ($(element).attr('type') == 'radio' || $(element).attr('type') == 'checkbox') {
1788        value = $(element).parent().find(':checked').val();
1789    }
1790    if ($(element).attr('type') == 'checkbox') {
1791        label = $(element).parent().find('label');
1792    }
1793
1794    var split = name.split('_');
1795    if (typeof split[1] !== 'undefined') {
1796        name = split[1];
1797    }
1798
1799    if (name == 'phone') {
1800        var phoneType = '';
1801        if ($('select[name="' + split[0] + '_phoneTypeExtended"]').closest('.phoneType').is(':visible')) {
1802            phoneType = $('select[name="' + split[0] + '_phoneTypeExtended"]').val();
1803        }
1804
1805        $.post('/global/wGlobal/scripts/php/ecommerce/process/validatePhone.php', {
1806            value: value,
1807            country: $('select[name="' + split[0] + '_phoneCountry"]').val(),
1808            type: phoneType
1809        }, function (data) {
1810
1811            ecommerce_resetValidation($(element));
1812
1813            if (data != '1' || check == false) {
1814                $(element).addClass('invalidInput');
1815                $(label).addClass('invalidInput');
1816                $(element).closest('.formEntry').addClass('hasError');
1817                $(element).closest('.multiInput').addClass('hasError');
1818
1819                if (!$(element).next('.wglErrorMessageInline').length && !$(element).hasClass('noError')) {
1820                    $(element).after('<div class="wglErrorMessageInline"></div>');
1821                    if (data != '0') {
1822                        ecommerce_showError('invalidInput_' + data + 'Prefix' + name, $(element).next('.wglErrorMessageInline'));
1823                    } else {
1824                        ecommerce_showError('invalidInput_' + name, $(element).next('.wglErrorMessageInline'));
1825                    }
1826                }
1827            } else {
1828                $(label).removeClass('invalidInput');
1829                $(element).removeClass('invalidInput');
1830                $(element).siblings('.wglErrorMessageInline').remove();
1831                $(element).closest('.formEntry').removeClass('hasError');
1832                $(element).closest('.multiInput').removeClass('hasError');
1833            }
1834
1835            if ($(form).attr('data-phoneRequired') == '1') {
1836                var phoneFound = false;
1837                $(form).find('.phoneContainer .phone').each(function (index) {
1838                    if ($(this).val() != '') {
1839                        phoneFound = true;
1840                    }
1841                });
1842                if (!phoneFound) {
1843                    var element2 = $(form).find('.phoneContainer').eq(0).find('.phone');
1844                    var label2 = $(form).find('.phoneContainer').eq(0).find('.phoneLabel');
1845                    $(element2).addClass('invalidInput');
1846                    $(label2).addClass('invalidInput');
1847                    $(element2).closest('.formEntry').addClass('hasError');
1848                    $(element2).closest('.multiInput').addClass('hasError');
1849
1850                    if (!$(element2).next('.wglErrorMessageInline').length && !$(element2).hasClass('noError')) {
1851                        $(element2).after('<div class="wglErrorMessageInline"></div>');
1852                        ecommerce_showError('missingPhone', $(element2).next('.wglErrorMessageInline'));
1853                    }
1854                }
1855            }
1856        });
1857
1858    } else {
1859
1860        $.post('/global/wGlobal/scripts/php/ecommerce/process/validateField.php', {
1861            value: value,
1862            type: validation,
1863            maxlength: maxlength,
1864            values: values,
1865            maxPossibleEffectiveDate: null,
1866            country: country
1867        }, function (data) {
1868            if (data == 'unvalid_zip_for_borderer') {
1869                if (!$(element).next('.wglErrorMessageInline').length && !$(element).hasClass('noError')) {
1870                    $(element).after('<div class="wglErrorMessageInline"></div>');
1871                    ecommerce_showError('invalidInput_plzOther', $(element).next('.wglErrorMessageInline'));
1872
1873                }
1874            } else if (data != '1' || check == false) {
1875                $(element).addClass('invalidInput');
1876                if ($(element).hasClass('birthday')) {
1877                    $(element).parent().parent().find('select[name$="jahr"]').addClass('invalidInput');
1878                    $(element).parent().parent().find('select[name$="monat"]').addClass('invalidInput');
1879                    $(element).parent().parent().find('select[name$="tag"]').addClass('invalidInput');
1880                    $(element).parent().parent().find('input[name$="birthdayPicker"]').addClass('invalidInput');
1881                }
1882                $(label).addClass('invalidInput');
1883
1884                $(element).closest('.formEntry').addClass('hasError');
1885                $(element).closest('.multiInput').addClass('hasError');
1886
1887                if ((element).attr('name') == 'engravingValue') {
1888                    $('.engravingTextError').hide();
1889                    $('.engravingTextInfo').hide();
1890                    if (value != '') {
1891                        if ($('input[name="engravingType"]:checked').val() == '01') {
1892                            $('.engravingTextErrorInitials').show();
1893                        } else if ($('input[name="engravingType"]:checked').val() == '02') {
1894                            $('.engravingTextErrorName').show();
1895                        }
1896                    } else {
1897                        if ($('input[name="engravingType"]:checked').val() == '01') {
1898                            $('.engravingTextInfoInitials').show();
1899                        } else if ($('input[name="engravingType"]:checked').val() == '02') {
1900                            $('.engravingTextInfoName').show();
1901                        }
1902                    }
1903                }
1904
1905                /*if($(element).attr('name') == 'plz' && $(element).attr('data-country') != ''){
1906          if(!$(label).parent().siblings('.wglErrorMessageInline').length && !$(element).hasClass('noError')){
1907            $(label).parent().siblings('.clearBoth').after('<div class="wglErrorMessageInline" style="line-height: 16px;"></div>');
1908            ecommerce_showError('invalidInput_'+name+$(element).attr('data-country'),$(label).parent().siblings('.wglErrorMessageInline'));
1909          }
1910        }else */
1911                if (($(element).hasClass('birthday') && $(element).attr('type') != 'date' && $(element).attr('name') != 'birthdayPicker') || $(element).attr("type") == 'radio' || $(element).attr("type") == 'checkbox') {
1912                    if (!$(label).next().children('.wglErrorMessageInline').length && !$(element).hasClass('noError')) {
1913                        $(label).next().children('br').remove();
1914                        $(label).next().append('<br /><div class="wglErrorMessageInline"></div>');
1915                        ecommerce_showError('invalidInput_' + name, $(label).next().children('.wglErrorMessageInline'));
1916                    }
1917                } else if ($(element).prop("tagName") == 'SELECT') {
1918                    if (!$(element).next().next('.wglErrorMessageInline').length && !$(element).hasClass('noError')) {
1919                        $(element).next().after('<div class="wglErrorMessageInline"></div>');
1920                        ecommerce_showError('invalidInput_' + name, $(element).next().next('.wglErrorMessageInline'));
1921                    }
1922                } else {
1923                    if (!$(element).next('.wglErrorMessageInline').length && !$(element).hasClass('noError')) {
1924                        $(element).after('<div class="wglErrorMessageInline"></div>');
1925                        ecommerce_showError('invalidInput_' + name, $(element).next('.wglErrorMessageInline'));
1926                    }
1927                }
1928            } else {
1929                $(label).removeClass('invalidInput');
1930                $(element).removeClass('invalidInput');
1931                $(element).siblings('.wglErrorMessageInline').remove();
1932                $(element).closest('.formEntry').removeClass('hasError');
1933                $(element).closest('.multiInput').removeClass('hasError');
1934                if ($(element).attr('name') == 'plz' && $(element).attr('data-country') != '') {
1935                    $(label).parent().siblings('.wglErrorMessageInline').remove();
1936                }
1937                $('input[name="birthdayPicker"]').each(function (index) {
1938                    if ($(this).is(":focus")) {
1939                        $(this).datepicker("hide");
1940                        $(this).datepicker("show");
1941                    }
1942                });
1943                if ((element).attr('name') == 'engravingValue') {
1944                    $('.engravingTextError').hide();
1945                    $('.engravingTextInfo').hide();
1946                    if ($('input[name="engravingType"]:checked').val() == '01') {
1947                        $('.engravingTextInfoInitials').show();
1948                    } else if ($('input[name="engravingType"]:checked').val() == '02') {
1949                        $('.engravingTextInfoName').show();
1950                    }
1951                }
1952            }
1953        });
1954
1955    }
1956}
1957
1958function ecommerce_basketBack(location) {
1959    window.location.href = location;
1960}
1961
1962function ecommerce_basketRemoveProduct(product) {
1963
1964    ecommerceLoadingShow();
1965
1966    $.fancybox.close();
1967    $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/removeProduct.php', {product: product}, function (data) {
1968        $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/start.php', function (data) {
1969            $('.objectEcommerce').html(data);
1970
1971            ecommerceLoadingHide();
1972        });
1973    });
1974}
1975
1976function ecommerce_basketRemoveCampaignBox() {
1977    $('.ecommerceBasketRemoveCampaignOpen').trigger('click');
1978}
1979
1980function ecommerce_basketRemoveCampaign() {
1981    ecommerceLoadingShow();
1982    $.fancybox.close();
1983    $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/clearBasket.php', function (data) {
1984        $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/start.php', function (data) {
1985            $('.objectEcommerce').html(data);
1986
1987            ecommerceLoadingHide();
1988        });
1989    });
1990}
1991
1992function ecommerce_basketRemoveProductPhysical(product, variant) {
1993    ecommerceLoadingShow();
1994    $.fancybox.close();
1995    $.post('/global/wGlobal/scripts/php/physical/process/basket/removeProduct.php', {
1996        product: product,
1997        variant: variant
1998    }, function (data) {
1999        $.post('/global/wGlobal/scripts/php/physical/process/basket/start.php', function (data) {
2000            $('.objectEcommerce').html(data);
2001
2002            ecommerceLoadingHide();
2003        });
2004    });
2005}
2006
2007function ecommerce_basketChangeQuantity(element) {
2008    var name = $(element).attr('name');
2009    var value = $(element).val();
2010
2011    ecommerceLoadingShow();
2012
2013    $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/changeQuantity.php', {
2014        name: name,
2015        value: value
2016    }, function (data) {
2017        $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/start.php', function (data) {
2018            $('.objectEcommerce').html(data);
2019
2020            ecommerceLoadingHide();
2021        });
2022    });
2023}
2024
2025function ecommerce_basketChangeQuantityPhysical(element) {
2026    var name = $(element).attr('data-product');
2027    var variant = $(element).attr('data-variant');
2028    var value = $(element).val();
2029
2030    ecommerceLoadingShow();
2031
2032    $.post('/global/wGlobal/scripts/php/physical/process/basket/changeQuantity.php', {
2033        name: name,
2034        variant: variant,
2035        value: value
2036    }, function (data) {
2037        $.post('/global/wGlobal/scripts/php/physical/process/basket/start.php', function (data) {
2038            $('.objectEcommerce').html(data);
2039
2040            ecommerceLoadingHide();
2041        });
2042    });
2043}
2044
2045function ecommerce_basketForward() {
2046    $('.loadingBox').show();
2047    $('.contentBoxOverlay').show();
2048    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
2049
2050    $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/send.php', $('.ecommerce .basketForm').serialize(), function (data) {
2051        if (data != '1') {
2052            ecommerce_showError(data, $('.ecommerceLoginError'));
2053
2054            $('.loadingBox').hide();
2055            $('.contentBoxOverlay').hide();
2056            $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2057
2058        } else {
2059            location.reload();
2060        }
2061
2062    });
2063}
2064
2065function ecommerce_basketForwardPhysical(isLadOrder = false) {
2066    ecommerceLoadingShow();
2067    $('html, body').animate({
2068        scrollTop: $(".contentBasket").offset().top - 20
2069    }, 500);
2070    if(document.forms['basketForm'].reportValidity()) {
2071        $.post('/global/wGlobal/scripts/php/physical/process/basket/send.php', $('.ecommerce .basketForm').serialize(), function (data) {
2072            if (data != '1') {
2073                ecommerce_showError(data, $('.ecommerceLoginError'));
2074
2075                ecommerceLoadingHide();
2076
2077            } else {
2078                location.reload();
2079            }
2080
2081        });
2082    } else {
2083        ecommerce_showError('incompleteDatas', $('.ecommerceLoginError'));
2084        if (isLadOrder) {
2085            validateLadOrderDatas();
2086        }
2087        ecommerceLoadingHide();
2088    }
2089}
2090function validateLadOrderDatas()
2091{
2092    if (!$('input.livingSituation').is(":checked")) {
2093        $('label.livingSituationLabel').addClass("redColor");
2094    } else {
2095        $('label.livingSituationLabel').removeClass("redColor");
2096    }
2097    if (!$('input.utilization').is(":checked")) {
2098        $('label.utilizationLabel').addClass("redColor");
2099    } else {
2100        $('label.utilizationLabel').removeClass("redColor");
2101    }
2102    if ($('input.utilization').is(":checked") && $('input#eCar').val() == "") {
2103        $('input#eCar').addClass("invalidInput");
2104    } else {
2105        $('input#eCar').removeClass("invalidInput");
2106    }
2107    if (!$('input.termsOfUse').is(":checked")) {
2108        $('label.termsOfUseLabel').addClass("redColor");
2109    } else {
2110        $('label.termsOfUseLabel').removeClass("redColor");
2111    }
2112    if (!$('input.note').is(":checked")) {
2113        $('label.noteLabel').addClass("redColor");
2114    } else {
2115        $('label.noteLabel').removeClass("redColor");
2116    }
2117    if (!$('input.noteInstallationSocketCEE').is(":checked")) {
2118        $('label.noteInstallationSocketCEELabel').addClass("redColor");
2119    } else {
2120        $('label.noteInstallationSocketCEELabel').removeClass("redColor");
2121    }
2122}
2123
2124function ecommerce_getCountry(elementLand, elementPLZ) {
2125
2126    if (elementLand == '') {
2127        elementLand = $('input[name="land"]');
2128    }
2129
2130    if (elementPLZ == '') {
2131        elementPLZ = $('input[name="plz"]');
2132    }
2133
2134    if ($(elementPLZ).val() != '' && /^\d+$/.test($(elementPLZ).val())) {
2135        $.ajax({
2136            type: "GET",
2137            url: "/global/wGlobal/scripts/php/ecommerce/process/personalData/getLand.php",
2138            data: {
2139                zipCode: $(elementPLZ).val()
2140            },
2141            success: function (data) {
2142                if (data != '') {
2143                    $(elementLand).val(data);
2144                }
2145            },
2146            error: function (x, t, m) {
2147            }
2148        });
2149    }
2150}
2151
2152function ecommerce_getLocation(location, street, elementLand, elementPLZ, elementOrt, elementStrasse) {
2153
2154    if (elementLand == '') {
2155        elementLand = $('input[name="land"]');
2156    }
2157
2158    if (elementPLZ == '') {
2159        elementPLZ = $('input[name="plz"]');
2160    }
2161
2162    if (elementOrt == '') {
2163        elementOrt = $('select[name="ort"]');
2164    }
2165
2166    if (elementStrasse == '') {
2167        elementStrasse = $('input[name="strasse"]');
2168    }
2169
2170    if (street == '') {
2171        street = $(elementStrasse).val();
2172    }
2173
2174    $(elementOrt).html('<option value=""></option>');
2175    $(elementOrt).prop('disabled', true);
2176    $(elementOrt).selectmenu('refresh');
2177
2178    var label = $(elementPLZ).parent().prev('label');
2179    $(label).removeClass('invalidInput');
2180    $(elementPLZ).removeClass('invalidInput');
2181    $(elementPLZ).next('.wglErrorMessageInline').remove();
2182    $(elementPLZ).closest('.formEntry').removeClass('hasError');
2183    $(elementPLZ).closest('.multiInput').removeClass('hasError');
2184
2185    if ($(elementPLZ).val() != '' && /^\d+$/.test($(elementPLZ).val())) {
2186        $.ajax({
2187            type: "GET",
2188            url: "/global/wGlobal/scripts/php/ecommerce/process/personalData/getLocation.php",
2189            data: {
2190                language: getLanguageFromHtmlTag(),
2191                zipCode: $(elementPLZ).val(),
2192                country: $(elementLand).val(),
2193                currentValue: location},
2194            success: function (data) {
2195                if (data == '') {
2196                    $(elementPLZ).addClass('invalidInput');
2197                    $(label).addClass('invalidInput');
2198                    $(elementPLZ).closest('.formEntry').addClass('hasError');
2199                    $(elementPLZ).closest('.multiInput').addClass('hasError');
2200                    if ($(elementPLZ).attr('data-country') != '') {
2201                        if (!$(label).parent().siblings('.wglErrorMessageInline').length && !$(elementPLZ).hasClass('noError')) {
2202                            $(label).parent().siblings('.clearBoth').after('<div class="wglErrorMessageInline" style="line-height: 16px;"></div>');
2203                            ecommerce_showError('invalidInput_plz' + $(elementPLZ).attr('data-country'), $(label).parent().siblings('.wglErrorMessageInline'));
2204                        }
2205                    } else {
2206                        if (!$(elementPLZ).next('.wglErrorMessageInline').length && !$(elementPLZ).hasClass('noError')) {
2207                            $(elementPLZ).after('<div class="wglErrorMessageInline"></div>');
2208                            ecommerce_showError('noLocationFound', $(elementPLZ).next('.wglErrorMessageInline'));
2209                        }
2210                    }
2211                } else {
2212                    $(elementOrt).html(data);
2213                    $(elementOrt).prop('disabled', false);
2214                    $(elementOrt).selectmenu('refresh');
2215                    if ($(elementOrt).val() != '') {
2216                        ecommerce_checkStreet(street, elementPLZ, elementOrt, elementStrasse);
2217                    }
2218                    ecommerce_getCountry(elementLand, elementPLZ);
2219                    ecommerce_resetValidation($(elementOrt));
2220                }
2221            },
2222            error: function (x, t, m) {
2223            }
2224        });
2225    }
2226}
2227
2228function ecommerce_checkStreet(street, elementPLZ, elementOrt, elementStrasse) {
2229
2230    if (elementPLZ == '') {
2231        elementPLZ = $('input[name="plz"]');
2232    }
2233
2234    if (elementOrt == '') {
2235        elementOrt = $('select[name="ort"]');
2236    }
2237
2238    if (elementStrasse == '') {
2239        elementStrasse = $('input[name="strasse"]');
2240    }
2241
2242    if (street != '' && elementOrt.val() != '') {
2243        $.ajax({
2244            type: "GET",
2245            url: "/global/wGlobal/scripts/php/ecommerce/process/personalData/checkStreet.php",
2246            data: {
2247                language: getLanguageFromHtmlTag(),
2248                zipCode: $(elementPLZ).val(),
2249                locality: $(elementOrt).val(),
2250                currentValue: street,
2251                streetField: $(elementStrasse).attr('id')
2252            },
2253            success: function (data) {
2254                if (data != '1') {
2255                    $('.streetCorrection').html(data);
2256                    $('.streetCorrectionOpen').trigger('click');
2257                }
2258            },
2259            error: function (x, t, m) {
2260            }
2261        });
2262    }
2263}
2264
2265function ecommerce_personalDataBack() {
2266    ecommerceLoadingShow();
2267    $.post('/global/wGlobal/scripts/php/ecommerce/process/backToBasket.php', $('.ecommerce #personalData').serialize(), function () {
2268        window.history.replaceState('', '', location.href.replace("s=personalData", ""));
2269        location.reload();
2270    });
2271}
2272
2273function ecommerce_personalDataBackPhysical() {
2274    $.post('/global/wGlobal/scripts/php/physical/process/backToBasket.php', {}, function () {
2275        location.reload();
2276    });
2277}
2278
2279function ecommerce_personalDataSend() {
2280    $('.loadingBox').show();
2281    $('.contentBoxOverlay').show();
2282    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
2283
2284    $('.ecommerceLoginError').html('');
2285    ecommerce_resetValidation('');
2286
2287    if ($('input[name="prename"]').length > 0) {
2288        ecommerce_validateField($('input[name="prename"]'), 'textRequired', 40, '');
2289        ecommerce_validateField($('input[name="name"]'), 'textRequired', 80, '');
2290        if ($('input[name="birthdayPicker"]').is(':visible')) {
2291            ecommerce_validateField($('input[name="birthdayPicker"]'), 'geburtstag', '', '');
2292        } else {
2293            ecommerce_validateField($('input[name="birthday"]'), 'geburtstag', '', '');
2294        }
2295    }
2296
2297    ecommerce_validateField($('input[name="gender"]'), 'required', 0, '1|2');
2298    ecommerce_validateField($('input[name="email"]'), 'email', 60, '');
2299    ecommerce_validateField($('select[name="sprache"]'), 'required', 0, 'D|F|I');
2300
2301    if ($('input[name="plz"]').length > 0) {
2302        ecommerce_validateField($('input[name="plz"]'), 'required', 4, '');
2303        ecommerce_validateField($('select[name="ort"]'), 'required', '', '');
2304        ecommerce_validateField($('input[name="strasse"]'), 'required', '', '');
2305        ecommerce_validateField($('input[name="strNr"]'), 'streetNumber', 8, '');
2306        ecommerce_validateField($('input[name="zuAdresse"]'), '', 28, '');
2307    }
2308
2309    if ($('input[name="delivery_alternativeAdress"]').is(':checked')) {
2310        ecommerce_validateField($('input[name="delivery_plz"]'), 'required', 4, '');
2311        ecommerce_validateField($('select[name="delivery_ort"]'), 'required', '', '');
2312        ecommerce_validateField($('input[name="delivery_strasse"]'), 'required', '', '');
2313        ecommerce_validateField($('input[name="delivery_strNr"]'), 'streetNumber', 8, '');
2314    }
2315
2316    $(".personalDataForm .phoneContainer:visible").each(function (index) {
2317        var phoneContainer = $(this);
2318        ecommerce_validateField($(phoneContainer).find('.phone'), '', '', '');
2319        if ($(phoneContainer).find('.phoneTypeExtended').is(':visible')) {
2320            if ($(phoneContainer).find('.phone').val() != '') {
2321                ecommerce_validateField($(phoneContainer).find('.phoneTypeExtended select'), 'required', '', '');
2322            }
2323        }
2324    });
2325
2326    $('.additionalDataForm select[name$=typeCycleMotorbike]').each(function (index) {
2327        ecommerce_validateField($(this), 'required', '', '');
2328    });
2329    $('.additionalDataForm input[name$=brand]').each(function (index) {
2330        ecommerce_validateField($(this), 'required', '', '');
2331    });
2332    $('.additionalDataForm input[name$=color]').each(function (index) {
2333        ecommerce_validateField($(this), 'required', '', '');
2334    });
2335
2336    $('.additionalDataForm input[name$=zipCode]').each(function (index) {
2337        ecommerce_validateField($(this), 'required', 4, '');
2338    });
2339    $('.additionalDataForm select[name$=locality]').each(function (index) {
2340        ecommerce_validateField($(this), 'required', '', '');
2341    });
2342    $('.additionalDataForm input[name$=streetName]').each(function (index) {
2343        ecommerce_validateField($(this), 'required', '', '');
2344    });
2345    $('.additionalDataForm input[name$="streetNumber"]').each(function (index) {
2346        ecommerce_validateField($(this), 'streetNumberRequired', 8, '');
2347    });
2348
2349    $.post('/global/wGlobal/scripts/php/ecommerce/process/personalData/send.php', $('.ecommerce .ecommerceForm').serialize(), function (dataSend) {
2350        if (dataSend != '1' && dataSend != '2') {
2351            ecommerce_showError(dataSend, $('.ecommerceLoginError'));
2352
2353            $('.loadingBox').hide();
2354            $('.contentBoxOverlay').hide();
2355            $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2356
2357            if ($('.invalidInput').length) {
2358                $('html, body').animate({
2359                    scrollTop: $(".invalidInput").offset().top - 20
2360                }, 500);
2361            }
2362        } else {
2363
2364            $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2365                if (dataSend == '2') {
2366                    location.reload();
2367                } else {
2368                    $('.objectEcommerce').html(data);
2369
2370                    $('.loadingBox').hide();
2371                    $('.contentBoxOverlay').hide();
2372                    $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2373
2374                    $('html, body').animate({
2375                        scrollTop: $(".ecommerce").offset().top
2376                    }, 500);
2377                }
2378            });
2379
2380        }
2381
2382    });
2383
2384}
2385
2386function ecommerce_personalDataSendPhysical(recaptchaResponse) {
2387
2388    if (!recaptchaResponse) {
2389        stopSpinner(
2390            AJAX_TECHNICAL_ERROR,
2391            '.ecommerceLoginError',
2392            '.personalDataButtons',
2393            '.ecommerceLoading',
2394            true
2395        );
2396    }
2397
2398    $('.personalDataButtons').hide();
2399    $('.ecommerceLoading').show();
2400    $('.ecommerceLoginError').html('');
2401    ecommerce_resetValidation('');
2402
2403    if ($('input[name="prename"]').length > 0) {
2404        ecommerce_validateField($('input[name="prename"]'), 'textRequired', 40, '');
2405        ecommerce_validateField($('input[name="name"]'), 'textRequired', 80, '');
2406        ecommerce_validateField($('select[name="tag"]'), 'geburtstag', '', '');
2407        ecommerce_validateField($('select[name="monat"]'), 'geburtstag', '', '');
2408        ecommerce_validateField($('select[name="jahr"]'), 'geburtstag', '', '');
2409    }
2410
2411    ecommerce_validateField($('select[name="customerType"]'), 'required', '');
2412
2413    if ($('select[name="customerType"]').val() != 'Privat' && $('select[name="customerType"]').val() != '') {
2414        ecommerce_validateField($('textarea[name="institution"]'), 'required', '', '');
2415    }
2416
2417    ecommerce_validateField($('input[name="gender"]'), 'required', 0, '1|2');
2418    ecommerce_validateField($('input[name="email"]'), 'email', 60, '');
2419    ecommerce_validateField($('select[name="sprache"]'), 'required', 0, 'D|F|I');
2420
2421    if ($('input[name="plz"]').length > 0) {
2422        ecommerce_validateField($('input[name="plz"]'), 'required', 4, '');
2423        ecommerce_validateField($('select[name="ort"]'), 'required', '', '');
2424        ecommerce_validateField($('input[name="strasse"]'), 'required', '', '');
2425        ecommerce_validateField($('input[name="strNr"]'), 'required', 8, '');
2426        ecommerce_validateField($('input[name="zuAdresse"]'), '', 28, '');
2427    }
2428
2429    $(".phoneContainer:visible").each(function (index) {
2430        var phoneContainer = $(this);
2431        ecommerce_validateField($(phoneContainer).find('.phone'), '', '', '');
2432        if ($(phoneContainer).find('.phoneTypeExtended').is(':visible')) {
2433            if ($(phoneContainer).find('.phone').val() != '') {
2434                ecommerce_validateField($(phoneContainer).find('.phoneTypeExtended select'), 'required', '', '');
2435            }
2436        }
2437    });
2438
2439    $.post('/global/wGlobal/scripts/php/physical/process/personalData/send.php', $('.ecommerce .ecommerceForm').serialize() + "&recaptchaToken=" + recaptchaResponse)
2440        .done(function (data) {
2441            if (data != '1') {
2442                stopSpinner(
2443                    data,
2444                    '.ecommerceLoginError',
2445                    '.personalDataButtons',
2446                    '.ecommerceLoading'
2447                );
2448                grecaptcha.reset();
2449            } else {
2450                $.post('/global/wGlobal/scripts/php/physical/process/start.php', {})
2451                    .done(function (data) {
2452                        $('.objectEcommerce').html(data);
2453                        $('html, body').animate({
2454                            scrollTop: $(".ecommerce").offset().top
2455                        }, 500);
2456                    })
2457                    .fail(function () {
2458                        stopSpinner(
2459                            AJAX_TECHNICAL_ERROR,
2460                            '.ecommerceLoginError',
2461                            '.personalDataButtons',
2462                            '.ecommerceLoading',
2463                            true
2464                        );
2465                    });
2466            }
2467        })
2468        .fail(function () {
2469            stopSpinner(
2470                AJAX_TECHNICAL_ERROR,
2471                '.ecommerceLoginError',
2472                '.personalDataButtons',
2473                '.ecommerceLoading',
2474                true
2475            );
2476        });
2477}
2478
2479function ecommerce_productDataBack() {
2480    $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {goTo: 'personalData'}, function (data) {
2481        $('.objectEcommerce').html(data);
2482        $('html, body').animate({
2483            scrollTop: $(".ecommerce").offset().top
2484        }, 500);
2485    });
2486}
2487
2488function ecommerce_productDataSend() {
2489
2490    $('.familyFormContent').hide();
2491    $('.familyFormContent').html('');
2492    $('.ecommerceButtonAdd').show();
2493
2494    $('.loadingBox').show();
2495    $('.contentBoxOverlay').show();
2496    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
2497
2498    $('.ecommerceLoginError').html('');
2499    ecommerce_resetValidation('');
2500
2501    $('select[name$=typeCycleMotorbike]').each(function (index) {
2502        ecommerce_validateField($(this), 'required', '', '');
2503    });
2504    $('input[name$=brand]').each(function (index) {
2505        ecommerce_validateField($(this), 'required', '', '');
2506    });
2507    $('input[name$=color]').each(function (index) {
2508        ecommerce_validateField($(this), 'required', '', '');
2509    });
2510
2511    $('input[name$=zipCode]').each(function (index) {
2512        ecommerce_validateField($(this), 'required', 4, '');
2513    });
2514    $('select[name$=locality]').each(function (index) {
2515        ecommerce_validateField($(this), 'required', '', '');
2516    });
2517    $('input[name$=streetName]').each(function (index) {
2518        ecommerce_validateField($(this), 'required', '', '');
2519    });
2520    $('input[name$="streetNumber"]').each(function (index) {
2521        ecommerce_validateField($(this), 'streetNumberRequired', 8, '');
2522    });
2523
2524    /*ecommerce_validateField($('input[name="startDateType"]'),'required',0,'auto|manual');
2525      $('input[name$=cartEffectiveStartDate]').each(function() {
2526        if($(this).parent().parent().parent().parent().find('input[name$="startDateType"]:checked').val() == 'manual'){
2527          ecommerce_validateField($(this),'dateFuture','','');
2528        }
2529      });*/
2530
2531    $.post('/global/wGlobal/scripts/php/ecommerce/process/additionalData/send.php', $('.ecommerce .ecommerceFormData').serialize(), function (data) {
2532        if (data != '1') {
2533            ecommerce_showError(data, $('.ecommerceLoginError'));
2534
2535            $('.loadingBox').hide();
2536            $('.contentBoxOverlay').hide();
2537            $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2538
2539            if ($('.invalidInput').length) {
2540                $('html, body').animate({
2541                    scrollTop: $(".invalidInput").offset().top - 20
2542                }, 500);
2543            }
2544        } else {
2545
2546            $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2547                $('.objectEcommerce').html(data);
2548
2549                $('.loadingBox').hide();
2550                $('.contentBoxOverlay').hide();
2551                $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2552
2553                $('html, body').animate({
2554                    scrollTop: $(".ecommerce").offset().top
2555                }, 500);
2556            });
2557
2558        }
2559
2560    });
2561
2562}
2563
2564function ecommerce_paymentBack() {
2565    $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {goTo: 'additionalData'}, function (data) {
2566        $('.objectEcommerce').html(data);
2567        $('html, body').animate({
2568            scrollTop: $(".ecommerce").offset().top
2569        }, 500);
2570    });
2571}
2572
2573function ecommerce_paymentSend() {
2574
2575    $('.loadingBox').show();
2576    $('.contentBoxOverlay').show();
2577    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
2578
2579    $('.ecommerceLoginError').html('');
2580    ecommerce_resetValidation('');
2581
2582    if ($('input[name="insurance"]').length > 0) {
2583        ecommerce_validateField($('input[name="insurance"]'), 'required', '', '1');
2584    }
2585
2586    $.post('/global/wGlobal/scripts/php/ecommerce/process/payment/send.php', $('.ecommerce .paymentForm').serialize(), function (data) {
2587        if (data != '1') {
2588            ecommerce_showError(data, $('.ecommerceLoginError'));
2589
2590            $('.loadingBox').hide();
2591            $('.contentBoxOverlay').hide();
2592            $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2593
2594            if ($('.invalidInput').length) {
2595                $('html, body').animate({
2596                    scrollTop: $(".invalidInput").offset().top - 20
2597                }, 500);
2598            }
2599        } else {
2600
2601            if ($('select[name="zahlung"]').val() == 'Invoice' || $('.paymentOptions').length == 0) {
2602
2603                $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2604                    $('.objectEcommerce').html(data);
2605
2606                    $('.loadingBox').hide();
2607                    $('.contentBoxOverlay').hide();
2608                    $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2609
2610                    $('html, body').animate({
2611                        scrollTop: $(".ecommerce").offset().top
2612                    }, 500);
2613                });
2614
2615            } else {
2616
2617                $.post('/global/wGlobal/scripts/php/ecommerce/process/payment/getPaymentPage.php', {}, function (data) {
2618
2619                    $('.loadingBox').hide();
2620                    $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2621
2622                    $('.paymentBox').show();
2623                    $('.paymentBox iframe').attr('src', data);
2624
2625                });
2626
2627            }
2628
2629        }
2630
2631    });
2632
2633}
2634
2635function ecommerce_paymentConfirmationSend() {
2636
2637    $.post('/global/wGlobal/scripts/php/ecommerce/process/payment/confirmationSend.php', function (data) {
2638
2639        $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2640            $('.objectEcommerce').html(data);
2641            $('html, body').animate({
2642                scrollTop: $(".ecommerce").offset().top
2643            }, 500);
2644        });
2645
2646    });
2647
2648}
2649
2650function ecommerce_paymentUpdatePrice() {
2651    $('.loadingBox').show();
2652    $('.contentBoxOverlay').show();
2653    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
2654
2655    $('.ecommerceLoginError').html('');
2656    ecommerce_resetValidation('');
2657
2658    $.post('/global/wGlobal/scripts/php/ecommerce/process/payment/updatePrice.php', $('.ecommerce .paymentForm').serialize(), function (data) {
2659        if (data != '1') {
2660            ecommerce_showError(data, $('.ecommerceLoginError'));
2661
2662            $('.loadingBox').hide();
2663            $('.contentBoxOverlay').hide();
2664            $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2665
2666            if ($('.invalidInput').length) {
2667                $('html, body').animate({
2668                    scrollTop: $(".invalidInput").offset().top - 20
2669                }, 500);
2670            }
2671        } else {
2672
2673            $.post('/global/wGlobal/scripts/php/ecommerce/process/payment/showSmallBasket.php', $('.ecommerce .paymentForm').serialize(), function (data) {
2674
2675                $('.basketListSmall').replaceWith(data);
2676
2677                $('.loadingBox').hide();
2678                $('.contentBoxOverlay').hide();
2679                $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
2680
2681            });
2682
2683        }
2684
2685    });
2686}
2687
2688function ecommerce_updateBasketButton() {
2689    $.post('/global/wGlobal/scripts/php/ecommerce/basketButton.php', function (data) {
2690        $('.topBasketButton').replaceWith(data);
2691    });
2692}
2693
2694function ecommerce_campaignLoginSend() {
2695    $('.addToBasketButtons').hide();
2696    $('.ecommerceLoading').show();
2697    $('.ecommerceLoginError').html('');
2698    ecommerce_resetValidation('');
2699
2700    if ($('.ecommerce input[name="prename"]').val() != '' || $('.ecommerce input[name="surname"]').val() != '' || $('.ecommerce input[name="membernumber"]').val() != '') {
2701
2702        ecommerce_validateField($('.ecommerce input[name="prename"]'), 'required', 40, '');
2703        ecommerce_validateField($('.ecommerce input[name="surname"]'), 'required', 80, '');
2704        ecommerce_validateField($('.ecommerce input[name="membernumber"]'), 'memberNumber', 0, '');
2705
2706        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMember.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2707            if (data != '1') {
2708                ecommerce_showError(data, $('.ecommerceLoginError'));
2709
2710                $('.addToBasketButtons').show();
2711                $('.ecommerceLoading').hide();
2712            } else {
2713                $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2714                    $('.objectEcommerce').html(data);
2715                    $('html, body').animate({
2716                        scrollTop: $(".ecommerce").offset().top
2717                    }, 500);
2718                });
2719            }
2720
2721        });
2722
2723    } else if ($('.ecommerce input[name="mailLogin"]').val() != '' || $('.ecommerce input[name="passwordLogin"]').val() != '') {
2724
2725        ecommerce_validateField($('.ecommerce input[name="mailLogin"]'), 'required', '', '');
2726        ecommerce_validateField($('.ecommerce input[name="passwordLogin"]'), 'required', '', '');
2727
2728        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMemberOnline.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2729            if (data != '1') {
2730                ecommerce_showError(data, $('.ecommerceLoginError'));
2731
2732                $('.addToBasketButtons').show();
2733                $('.ecommerceLoading').hide();
2734            } else {
2735                $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2736                    $('.objectEcommerce').html(data);
2737                    $('html, body').animate({
2738                        scrollTop: $(".ecommerce").offset().top
2739                    }, 500);
2740                });
2741            }
2742
2743        });
2744
2745    } else {
2746
2747        ecommerce_showError('memberLogin_noInput', $('.ecommerceLoginError'));
2748
2749        $('.addToBasketButtons').show();
2750        $('.ecommerceLoading').hide();
2751
2752    }
2753}
2754
2755function ecommerce_campaignSelectSend(element) {
2756
2757    $('.campaignSelectContent').hide();
2758    $('.ecommerceSpacer').hide();
2759    $('.paymentButtons').hide();
2760    $('.ecommerceLoading').show();
2761
2762    $.post('/global/wGlobal/scripts/php/ecommerce/process/campaignSelect/send.php', {numOffer: $(element).attr('data-value')}, function (data) {
2763
2764        $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2765            $('.objectEcommerce').html(data);
2766            $('html, body').animate({
2767                scrollTop: $(".ecommerce").offset().top
2768            }, 500);
2769        });
2770
2771    });
2772
2773}
2774
2775function ecommerce_sessionRestoreLoginSend() {
2776    $('.addToBasketButtons').hide();
2777    $('.addToBasketLink').hide();
2778    $('.ecommerceLoading').show();
2779    $('.ecommerceLoginError').html('');
2780    ecommerce_resetValidation('');
2781
2782    if ($('.ecommerce input[name="prename"]').val() != '' || $('.ecommerce input[name="surname"]').val() != '' || $('.ecommerce input[name="membernumber"]').val() != '') {
2783
2784        ecommerce_validateField($('.ecommerce input[name="prename"]'), 'required', 40, '');
2785        ecommerce_validateField($('.ecommerce input[name="surname"]'), 'required', 80, '');
2786        ecommerce_validateField($('.ecommerce input[name="membernumber"]'), 'memberNumber', 0, '');
2787
2788        $.post('/global/wGlobal/scripts/php/ecommerce/process/ad
2788dToBasket/loginMember.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2789            if (data != '1') {
2790                ecommerce_showError(data, $('.ecommerceLoginError'));
2791
2792                $('.addToBasketButtons').show();
2793                $('.addToBasketLink').show();
2794                $('.ecommerceLoading').hide();
2795            } else {
2796                $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2797                    $('.objectEcommerce').html(data);
2798                    $('html, body').animate({
2799                        scrollTop: $(".ecommerce").offset().top
2800                    }, 500);
2801                });
2802            }
2803
2804        });
2805
2806    } else if ($('.ecommerce input[name="mailLogin"]').val() != '' || $('.ecommerce input[name="passwordLogin"]').val() != '') {
2807
2808        ecommerce_validateField($('.ecommerce input[name="mailLogin"]'), 'required', '', '');
2809        ecommerce_validateField($('.ecommerce input[name="passwordLogin"]'), 'required', '', '');
2810
2811        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMemberOnline.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2812            if (data != '1') {
2813                ecommerce_showError(data, $('.ecommerceLoginError'));
2814
2815                $('.addToBasketButtons').show();
2816                $('.addToBasketLink').show();
2817                $('.ecommerceLoading').hide();
2818            } else {
2819                $.post('/global/wGlobal/scripts/php/ecommerce/process/start.php', {}, function (data) {
2820                    $('.objectEcommerce').html(data);
2821                    $('html, body').animate({
2822                        scrollTop: $(".ecommerce").offset().top
2823                    }, 500);
2824                });
2825            }
2826
2827        });
2828
2829    } else {
2830
2831        ecommerce_showError('memberLogin_noInput', $('.ecommerceLoginError'));
2832
2833        $('.addToBasketButtons').show();
2834        $('.ecommerceLoading').hide();
2835
2836    }
2837}
2838
2839function ecommerce_sessionRestoreClearBasket() {
2840    $('.addToBasketButtons').hide();
2841    $('.addToBasketLink').hide();
2842    $('.ecommerceLoading').show();
2843    $('.ecommerceLoginError').html('');
2844    ecommerce_resetValidation('');
2845
2846    $.post('/global/wGlobal/scripts/php/ecommerce/sessionDelete.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2847        location.reload();
2848    });
2849
2850}
2851
2852function ecommerce_mastercardForm() {
2853    $('.masterCardForm').submit();
2854}
2855
2856function ecommerce_resizeIframe(iframe) {
2857    iframe.height = iframe.contentWindow.document.body.scrollHeight + "px";
2858}
2859
2860function ecommerce_inegilibilitySend() {
2861    $('.personalDataButtons').hide();
2862    $('.ecommerceLoading').show();
2863    $('.ecommerceLoginError').html('');
2864    ecommerce_resetValidation('');
2865
2866    ecommerce_validateField($('textarea[name="message"]'), 'required', 0, '');
2867    ecommerce_validateField($('input[name="email"]'), 'email', 60, '');
2868    ecommerce_validateField($('input[name="phone"]'), 'phoneRequired', 20, '');
2869
2870    $.post('/global/wGlobal/scripts/php/ecommerce/process/inegilibility/send.php', $('.ecommerce .ecommerceForm').serialize())
2871        .done(function (data) {
2872            if (data != '1') {
2873                stopSpinner(
2874                    data,
2875                    '.ecommerceLoginError',
2876                    '.personalDataButtons',
2877                    '.ecommerceLoading'
2878                );
2879            } else {
2880                $.post('/global/wGlobal/scripts/php/ecommerce/process/inegilibility/confirmation.php', {}, function (data) {
2881                    $('.ecommerceLoading').hide();
2882                    $('.ecommerceFormInner').html(data);
2883                    $('html, body').animate({
2884                        scrollTop: $(".ecommerceForm").offset().top
2885                    }, 500);
2886                });
2887            }
2888        })
2889        .fail(function () {
2890            stopSpinner(
2891                AJAX_TECHNICAL_ERROR,
2892                '.ecommerceLoginError',
2893                '.personalDataButtons',
2894                '.ecommerceLoading',
2895                true
2896            );
2897        });
2898}
2899
2900function ecommerce_code_sendCode() {
2901    ecommerceLoadingShow();
2902
2903    $.post('/global/wGlobal/scripts/php/code/code/send.php', $('.ecommerce .ecommerceForm').serialize(), function (data) {
2904        if (data != '1') {
2905            ecommerce_showError(data, $('.ecommerceErrorContainer'));
2906
2907            ecommerceLoadingHide();
2908
2909        } else {
2910            $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
2911                $('.objectEcommerce').html(data);
2912                $('html, body').animate({
2913                    scrollTop: $(".ecommerce").offset().top
2914                }, 500);
2915
2916                ecommerceLoadingHide();
2917            });
2918        }
2919
2920    });
2921}
2922
2923function ecommerce_codeMembershipChoice(answer, element) {
2924    if (answer == 'yes') {
2925        $('.ecommerce .contentTitle').show();
2926        $('.ecommerce .memberQuestion').hide();
2927        $('.ecommerce .memberLogin').show();
2928    } else if (answer == 'no') {
2929        $.post('/global/wGlobal/scripts/php/code/personalData/noMember.php', function (data) {
2930            $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
2931                $('.objectEcommerce').html(data);
2932                $('html, body').animate({
2933                    scrollTop: $(".ecommerce").offset().top
2934                }, 500);
2935            });
2936        });
2937    }
2938}
2939
2940function ecommerce_codeLoginSend() {
2941    $('.addToBasketButtons').hide();
2942    $('.ecommerceLoading').show();
2943    $('.ecommerceLoginError').html('');
2944    ecommerce_resetValidation('');
2945
2946    if ($('.ecommerce input[name="prename"]').val() != '' || $('.ecommerce input[name="surname"]').val() != '' || $('.ecommerce input[name="membernumber"]').val() != '') {
2947
2948        ecommerce_validateField($('.ecommerce input[name="prename"]'), 'required', 40, '');
2949        ecommerce_validateField($('.ecommerce input[name="surname"]'), 'required', 80, '');
2950        ecommerce_validateField($('.ecommerce input[name="membernumber"]'), 'memberNumber', 0, '');
2951
2952        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMember.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2953            if (data != '1') {
2954                ecommerce_showError(data, $('.ecommerceLoginError'));
2955
2956                $('.addToBasketButtons').show();
2957                $('.ecommerceLoading').hide();
2958            } else {
2959                $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
2960                    $('.objectEcommerce').html(data);
2961                    $('html, body').animate({
2962                        scrollTop: $(".ecommerce").offset().top
2963                    }, 500);
2964                });
2965            }
2966
2967        });
2968
2969    } else if ($('.ecommerce input[name="mailLogin"]').val() != '' || $('.ecommerce input[name="passwordLogin"]').val() != '') {
2970
2971        ecommerce_validateField($('.ecommerce input[name="mailLogin"]'), 'required', '', '');
2972        ecommerce_validateField($('.ecommerce input[name="passwordLogin"]'), 'required', '', '');
2973
2974        $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasket/loginMemberOnline.php', $('.ecommerce .memberLogin').serialize(), function (data) {
2975            if (data != '1') {
2976                ecommerce_showError(data, $('.ecommerceLoginError'));
2977
2978                $('.addToBasketButtons').show();
2979                $('.ecommerceLoading').hide();
2980            } else {
2981                $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
2982                    $('.objectEcommerce').html(data);
2983                    $('html, body').animate({
2984                        scrollTop: $(".ecommerce").offset().top
2985                    }, 500);
2986                });
2987            }
2988
2989        });
2990
2991    } else {
2992
2993        ecommerce_showError('memberLogin_noInput', $('.ecommerceLoginError'));
2994
2995        $('.addToBasketButtons').show();
2996        $('.ecommerceLoading').hide();
2997
2998    }
2999}
3000
3001function ecommerce_code_personalDataBack() {
3002    $.post('/global/wGlobal/scripts/php/code/start.php', {goTo: 'code'}, function (data) {
3003        $('.objectEcommerce').html(data);
3004        $('html, body').animate({
3005            scrollTop: $(".ecommerce").offset().top
3006        }, 500);
3007    });
3008}
3009
3010function ecommerce_code_sendPersonalData() {
3011
3012    ecommerceLoadingShow();
3013
3014    $('.ecommerceLoginError').html('');
3015    ecommerce_resetValidation('');
3016
3017    if ($('input[name="prename"]').length > 0) {
3018        ecommerce_validateField($('input[name="prename"]'), 'textRequired', 40, '');
3019        ecommerce_validateField($('input[name="name"]'), 'textRequired', 80, '');
3020        if ($('input[name="birthdayPicker"]').is(':visible')) {
3021            ecommerce_validateField($('input[name="birthdayPicker"]'), 'geburtstag', '', '');
3022        } else {
3023            ecommerce_validateField($('input[name="birthday"]'), 'geburtstag', '', '');
3024        }
3025    }
3026
3027    ecommerce_validateField($('input[name="gender"]'), 'required', 0, '1|2');
3028    ecommerce_validateField($('input[name="email"]'), 'email', 60, '');
3029    ecommerce_validateField($('select[name="sprache"]'), 'required', 0, 'D|F|I');
3030
3031    if ($('input[name="plz"]').length > 0) {
3032        ecommerce_validateField($('input[name="plz"]'), 'required', 4, '');
3033        ecommerce_validateField($('select[name="ort"]'), 'required', '', '');
3034        ecommerce_validateField($('input[name="strasse"]'), 'required', '', '');
3035        ecommerce_validateField($('input[name="strNr"]'), 'streetNumber', 8, '');
3036        ecommerce_validateField($('input[name="zuAdresse"]'), '', 28, '');
3037    }
3038
3039    $(".personalDataForm .phoneContainer:visible").each(function (index) {
3040        var phoneContainer = $(this);
3041        ecommerce_validateField($(phoneContainer).find('.phone'), '', '', '');
3042        if ($(phoneContainer).find('.phoneTypeExtended').is(':visible')) {
3043            if ($(phoneContainer).find('.phone').val() != '') {
3044                ecommerce_validateField($(phoneContainer).find('.phoneTypeExtended select'), 'required', '', '');
3045            }
3046        }
3047    });
3048
3049    $('.additionalDataForm select[name$=typeCycleMotorbike]').each(function (index) {
3050        ecommerce_validateField($(this), 'required', '', '');
3051    });
3052    $('.additionalDataForm input[name$=brand]').each(function (index) {
3053        ecommerce_validateField($(this), 'required', '', '');
3054    });
3055    $('.additionalDataForm input[name$=color]').each(function (index) {
3056        ecommerce_validateField($(this), 'required', '', '');
3057    });
3058
3059    $('.additionalDataForm input[name$=zipCode]').each(function (index) {
3060        ecommerce_validateField($(this), 'required', 4, '');
3061    });
3062    $('.additionalDataForm select[name$=locality]').each(function (index) {
3063        ecommerce_validateField($(this), 'required', '', '');
3064    });
3065    $('.additionalDataForm input[name$=streetName]').each(function (index) {
3066        ecommerce_validateField($(this), 'required', '', '');
3067    });
3068    $('.additionalDataForm input[name$="streetNumber"]').each(function (index) {
3069        ecommerce_validateField($(this), 'streetNumberRequired', 8, '');
3070    });
3071
3072    $.post('/global/wGlobal/scripts/php/code/personalData/send.php', $('.ecommerce .ecommerceForm').serialize(), function (data) {
3073        if (data != '1') {
3074            ecommerce_showError(data, $('.ecommerceLoginError'));
3075
3076            ecommerceLoadingHide();
3077
3078            if ($('.invalidInput').length) {
3079                $('html, body').animate({
3080                    scrollTop: $(".invalidInput").offset().top - 20
3081                }, 500);
3082            }
3083        } else {
3084
3085            $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
3086                $('.objectEcommerce').html(data);
3087                $('html, body').animate({
3088                    scrollTop: $(".ecommerce").offset().top
3089                }, 500);
3090
3091                ecommerceLoadingHide();
3092            });
3093
3094        }
3095
3096    });
3097
3098}
3099
3100function ecommerce_code_productDataBack() {
3101    $.post('/global/wGlobal/scripts/php/code/start.php', {goTo: 'personalData'}, function (data) {
3102        $('.objectEcommerce').html(data);
3103        $('html, body').animate({
3104            scrollTop: $(".ecommerce").offset().top
3105        }, 500);
3106    });
3107}
3108
3109function ecommerce_code_productDataSend() {
3110    $('.personalDataButtons').hide();
3111    $('.ecommerceLoading').show();
3112    $('.ecommerceLoginError').html('');
3113    ecommerce_resetValidation('');
3114
3115    $('select[name$=typ]').each(function (index) {
3116        ecommerce_validateField($(this), 'required', '', '');
3117    });
3118    $('select[name$=marke]').each(function (index) {
3119        ecommerce_validateField($(this), 'required', '', '');
3120    });
3121    $('input[name$=farbe]').each(function (index) {
3122        ecommerce_validateField($(this), 'required', '', '');
3123    });
3124
3125    $('input[name$=plz]').each(function (index) {
3126        ecommerce_validateField($(this), 'required', 4, '');
3127    });
3128    $('select[name$=ort]').each(function (index) {
3129        ecommerce_validateField($(this), 'required', '', '');
3130    });
3131    $('input[name$=strasse]').each(function (index) {
3132        ecommerce_validateField($(this), 'required', '', '');
3133    });
3134    $('input[name$="strNr"]').each(function (index) {
3135        ecommerce_validateField($(this), 'streetNumber', 8, '');
3136    });
3137
3138    $('input[name$=relationship]').each(function (index) {
3139        ecommerce_validateField($(this), 'required', 0, '1|2');
3140    });
3141    $('input[name$=prename]').each(function (index) {
3142        ecommerce_validateField($(this), 'textRequired', 15, '');
3143    });
3144    $('input[name$=name]').each(function (index) {
3145        ecommerce_validateField($(this), 'textRequired', 20, '');
3146    });
3147
3148    $('input[name$=phoneOne]').each(function (index) {
3149        if ($(this).val() != '') {
3150            if ($(this).parent().parent().parent().parent().find('input[name$="land"]').val() == 'CH') {
3151                if ($(this).parent().parent().parent().find('select[name$="phoneOneType"]').val() == 'privat') {
3152                    ecommerce_validateField($(this), 'phonePrivateCH', 10, '');
3153                } else {
3154                    ecommerce_validateField($(this), 'phoneCH', 10, '');
3155                }
3156            } else {
3157                ecommerce_validateField($(this), 'phone', 20, '');
3158            }
3159        }
3160    });
3161
3162    $('input[name$=phoneTwo]').each(function (index) {
3163        if ($(this).val() != '') {
3164            if ($(this).parent().parent().parent().parent().find('input[name$="land"]').val() == 'CH') {
3165                if ($(this).parent().parent().parent().find('select[name$="phoneTwoType"]').val() == 'privat') {
3166                    ecommerce_validateField($(this), 'phonePrivateCH', 10, '');
3167                } else {
3168                    ecommerce_validateField($(this), 'phoneCH', 10, '');
3169                }
3170            } else {
3171                ecommerce_validateField($(this), 'phone', 20, '');
3172            }
3173        }
3174    });
3175
3176    $('select[name$=nationalitaet]').each(function (index) {
3177        ecommerce_validateField($(this), 'required', '', '');
3178    });
3179    $('select[name$=tag]').each(function (index) {
3180        ecommerce_validateField($(this), 'geburtstag', '', '');
3181    });
3182    $('select[name$=monat]').each(function (index) {
3183        ecommerce_validateField($(this), 'geburtstag', '', '');
3184    });
3185    $('select[name$=jahr]').each(function (index) {
3186        ecommerce_validateField($(this), 'geburtstag', '', '');
3187    });
3188    $('input[name$=email]').each(function (index) {
3189        if ($(this).val() != '') {
3190            ecommerce_validateField($(this), 'email', 60, '');
3191        }
3192    });
3193    $('input[name$=autoNrPartnerkarte]').each(function (index) {
3194        ecommerce_validateField($(this), 'numberRequired', 10, '');
3195    });
3196    $('select[name$=autoNrKantonPartnerkarte]').each(function (index) {
3197        ecommerce_validateField($(this), 'required', 2, '');
3198    });
3199
3200    ecommerce_validateField($('input[name="startDateType"]'), 'required', 0, 'auto|manual');
3201    $('input[name$=cartEffectiveStartDate]').each(function () {
3202        if ($(this).parent().parent().parent().parent().find('input[name$="startDateType"]:checked').val() == 'manual') {
3203            ecommerce_validateField($(this), 'dateFuture', '', '');
3204        }
3205    });
3206
3207    $.post('/global/wGlobal/scripts/php/code/additionalData/send.php', $('.ecommerce .ecommerceFormData').serialize())
3208        .done(function (data) {
3209            if (data != '1') {
3210                stopSpinner(
3211                    data,
3212                    '.ecommerceLoginError',
3213                    '.personalDataButtons',
3214                    '.ecommerceLoading'
3215                );
3216            } else {
3217                $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
3218                    $('.objectEcommerce').html(data);
3219                    $('html, body').animate({
3220                        scrollTop: $(".ecommerce").offset().top
3221                    }, 500);
3222                });
3223            }
3224        })
3225        .fail(function () {
3226            stopSpinner(
3227                AJAX_TECHNICAL_ERROR,
3228                '.ecommerceLoginError',
3229                '.personalDataButtons',
3230                '.ecommerceLoading',
3231                true
3232            );
3233        });
3234
3235}
3236
3237function ecommerce_code_summaryBack() {
3238    $.post('/global/wGlobal/scripts/php/code/start.php', {goTo: 'personalData'}, function (data) {
3239        $('.objectEcommerce').html(data);
3240        $('html, body').animate({
3241            scrollTop: $(".ecommerce").offset().top
3242        }, 500);
3243    });
3244}
3245
3246function ecommerce_code_summarySend() {
3247    ecommerceLoadingShow();
3248    $('.ecommerceLoginError').html('');
3249    ecommerce_resetValidation('');
3250
3251    $.post('/global/wGlobal/scripts/php/code/summary/send.php', $('.ecommerce .paymentForm').serialize(), function (data) {
3252        if (data != '1') {
3253            ecommerce_showError(data, $('.ecommerceLoginError'));
3254
3255            ecommerceLoadingHide();
3256
3257            if ($('.invalidInput').length) {
3258                $('html, body').animate({
3259                    scrollTop: $(".invalidInput").offset().top - 20
3260                }, 500);
3261            }
3262        } else {
3263
3264            $.post('/global/wGlobal/scripts/php/code/start.php', {}, function (data) {
3265                $('.objectEcommerce').html(data);
3266                $('html, body').animate({
3267                    scrollTop: $(".ecommerce").offset().top
3268                }, 500);
3269
3270                ecommerceLoadingHide();
3271            });
3272
3273        }
3274
3275    });
3276
3277}
3278
3279function ecommerce_codePost_sendCode() {
3280    $('.ecommerceButtonContainer').hide();
3281    $('.ecommerceLoading').show();
3282
3283    $.post('/global/wGlobal/scripts/php/codePost/code/send.php', $('.ecommerce .ecommerceForm').serialize(), function (data) {
3284        if (data != '1') {
3285            ecommerce_showError(data, $('.ecommerceErrorContainer'));
3286
3287            $('.ecommerceButtonContainer').show();
3288            $('.ecommerceLoading').hide();
3289
3290        } else {
3291            $.post('/global/wGlobal/scripts/php/codePost/start.php', {}, function (data) {
3292                $('.objectEcommerce').html(data);
3293                $('html, body').animate({
3294                    scrollTop: $(".ecommerce").offset().top
3295                }, 500);
3296            });
3297        }
3298
3299    });
3300}
3301
3302function ecommerce_codePost_sendPersonalData() {
3303
3304    $('.personalDataButtons').hide();
3305    $('.ecommerceLoading').show();
3306    $('.ecommerceLoginError').html('');
3307    ecommerce_resetValidation('');
3308
3309    ecommerce_validateField($('input[name="prename"]'), 'textRequired', 40, '');
3310    ecommerce_validateField($('input[name="name"]'), 'textRequired', 80, '');
3311    ecommerce_validateField($('select[name="nationalitaet"]'), 'required', '', '');
3312    ecommerce_validateField($('select[name="tag"]'), 'geburtstag', '', '');
3313    ecommerce_validateField($('select[name="monat"]'), 'geburtstag', '', '');
3314    ecommerce_validateField($('select[name="jahr"]'), 'geburtstag', '', '');
3315    ecommerce_validateField($('input[name="gender"]'), 'required', 0, '1|2');
3316    ecommerce_validateField($('input[name="plz"]'), 'required', 4, '');
3317    ecommerce_validateField($('select[name="ort"]'), 'required', '', '');
3318    ecommerce_validateField($('input[name="strasse"]'), 'required', '', '');
3319    ecommerce_validateField($('input[name="strNr"]'), 'streetNumber', 8, '');
3320    ecommerce_validateField($('input[name="zuAdresse"]'), '', 28, '');
3321    ecommerce_validateField($('input[name="email"]'), 'email', 60, '');
3322    ecommerce_validateField($('select[name="sprache"]'), 'required', 0, 'D|F|I');
3323
3324    if ($('input[name="land"]').val() == 'CH') {
3325        if ($('select[name="phoneOneType"]').val() == 'privat') {
3326            ecommerce_validateField($('input[name="phoneOne"]'), 'phonePrivateRequiredCH', 10, '');
3327        } else {
3328            ecommerce_validateField($('input[name="phoneOne"]'), 'phoneRequiredCH', 10, '');
3329        }
3330    } else {
3331        ecommerce_validateField($('input[name="phoneOne"]'), 'phoneRequired', 20, '');
3332    }
3333
3334    if ($('input[name="phoneTwo"]').length > 0) {
3335        if ($('input[name="phoneTwo"]').val() != '') {
3336            if ($('input[name="land"]').val() == 'CH') {
3337                if ($('select[name="phoneTwoType"]').val() == 'privat') {
3338                    ecommerce_validateField($('input[name="phoneTwo"]'), 'phonePrivateCH', 10, '');
3339                } else {
3340                    ecommerce_validateField($('input[name="phoneTwo"]'), 'phoneCH', 10, '');
3341                }
3342            } else {
3343                ecommerce_validateField($('input[name="phoneTwo"]'), 'phone', 20, '');
3344            }
3345        }
3346    }
3347
3348    $.post('/global/wGlobal/scripts/php/codePost/personalData/send.php', $('.ecommerce .ecommerceForm').serialize())
3349        .done(function (data) {
3350        if (data != '1') {
3351            stopSpinner(
3352                data,
3353                '.ecommerceLoginError',
3354                '.personalDataButtons',
3355                '.ecommerceLoading'
3356            );
3357        } else {
3358            $.post('/global/wGlobal/scripts/php/codePost/start.php', {}, function (data) {
3359                $('.objectEcommerce').html(data);
3360                $('html, body').animate({
3361                    scrollTop: $(".ecommerce").offset().top
3362                }, 500);
3363            });
3364        }
3365    })
3366        .fail(function () {
3367            stopSpinner(
3368                AJAX_TECHNICAL_ERROR,
3369                '.ecommerceLoginError',
3370                '.personalDataButtons',
3371                '.ecommerceLoading',
3372                true
3373            );
3374        });
3375
3376}
3377
3378function ecommerce_personalDataChange(check) {
3379    if (check === undefined || check === null || check == '') {
3380        check = '';
3381    }
3382    $('.personalDataButtons').hide();
3383    $('.ecommerceSaveSuccess').hide();
3384    $('.ecommerceLoading').show();
3385    $('.ecommerceLoginError').html('');
3386    ecommerce_resetValidation('');
3387
3388    ecommerce_validateField($('input[name="gender"]'), 'required', 0, '1|2');
3389    ecommerce_validateField($('select[name="sprache"]'), 'required', 0, 'D|F|I');
3390
3391    var emailInput = $('input[name="email"]');
3392    var emailValue = $.trim(emailInput.val());
3393
3394    if (emailValue.length > 0) {
3395        ecommerce_validateField(emailInput, 'email', 60, '');
3396    }
3397
3398    if ($('input[name="plz"]').length > 0) {
3399        if (check == 'specialPLZ') {
3400            ecommerce_validateField($('input[name="plz"]'), 'requiredSpecialPLZ', '', '', $('input[name="land"]').val());
3401            ecommerce_validateField($('input[name="ort"]'), 'required', '', '');
3402        } else {
3403            ecommerce_validateField($('input[name="plz"]'), 'required', 4, '');
3404            ecommerce_validateField($('select[name="ort"]'), 'required', '', '');
3405        }
3406        ecommerce_validateField($('input[name="strasse"]'), 'required', '', '');
3407        ecommerce_validateField($('input[name="strNr"]'), 'streetNumber', 8, '');
3408    }
3409
3410    $(".phoneContainer:visible").each(function (index) {
3411        var phoneContainer = $(this);
3412        ecommerce_validateField($(phoneContainer).find('.phone'), '', '', '');
3413        if ($(phoneContainer).find('.phoneTypeExtended').is(':visible')) {
3414            if ($(phoneContainer).find('.phone').val() != '') {
3415                ecommerce_validateField($(phoneContainer).find('.phoneTypeExtended select'), 'required', '', '');
3416            }
3417        }
3418    });
3419
3420    $.post('/global/wGlobal/scripts/php/ecare/dashboard/personalDataSave.php', $('.ecommerce .ecommerceForm').serialize())
3421        .done(function (data) {
3422            if (data == 'sessionFail') {
3423                location.reload();
3424                return;
3425            }
3426
3427            if (data != '1') {
3428                stopSpinner(
3429                    data,
3430                    '.ecommerceLoginError',
3431                    '.personalDataButtons',
3432                    '.ecommerceLoading'
3433                );
3434            } else {
3435
3436                if ($('select[name="nationalitaet"]').length > 0) {
3437                    if ($('select[name="nationalitaet"]').val() != 'INC') {
3438                        $('select[name="nationalitaet"]').parent().html($('select[name="nationalitaet"] option:selected').text());
3439                    }
3440                }
3441
3442                $('.personalDataButtons').show();
3443                $('.ecommerceSaveSuccess').show();
3444                $('.ecommerceLoading').hide();
3445                const queryString = window.location.search;
3446                const urlParams = new URLSearchParams(queryString);
3447                if (urlParams.has('backTo')) {
3448                    setTimeout(() => {
3449                        window.location = urlParams.get('backTo');
3450                    }, 1000);
3451                };
3452            }
3453        })
3454        .fail(function () {
3455            stopSpinner(
3456                AJAX_TECHNICAL_ERROR,
3457                '.ecommerceLoginError',
3458                '.personalDataButtons',
3459                '.ecommerceLoading',
3460                true
3461            );
3462        });
3463}
3464
3465function ecommerce_sendFormCCI() {
3466    $('.personalDataButtons').hide();
3467    $('.ecommerceLoading').show();
3468    $('.ecommerceLoginError').html('');
3469    ecommerce_resetValidation('');
3470
3471    if ($('select[name="nationalitaet"]').length > 0) {
3472        ecommerce_validateField($('select[name="nationalitaet"]'), 'nationality', '', '');
3473    }
3474
3475    if ($('select[name="jahr"]').length > 0) {
3476        ecommerce_validateField($('select[name="tag"]'), 'geburtstag', '', '');
3477        ecommerce_validateField($('select[name="monat"]'), 'geburtstag', '', '');
3478        ecommerce_validateField($('select[name="jahr"]'), 'geburtstag', '', '');
3479    }
3480
3481    ecommerce_validateField($('select[name="identification"]'), 'required', '', 'passport|identityCard');
3482    ecommerce_validateField($('input[name="issuerLocation"]'), 'required', '', '');
3483    ecommerce_validateField($('input[name="issuerDate"]'), 'datePast', '', '');
3484    ecommerce_validateField($('input[name="birthplace"]'), 'required', '', '');
3485
3486    if ($('select[name="identification"]').val() == 'passport') {
3487        ecommerce_validateField($('input[name="numberPassport"]'), 'required', '', '');
3488    } else if ($('select[name="identification"]').val() == 'identityCard') {
3489        ecommerce_validateField($('input[name="numberID"]'), 'required', '', '');
3490    }
3491
3492    $.post('/global/wGlobal/scripts/php/ecare/dashboard/sendCCI.php', $('.ecommerce .ecommerceForm').serialize())
3493        .done(function (data) {
3494            if (data != '1') {
3495                stopSpinner(
3496                    data,
3497                    '.ecommerceLoginError',
3498                    '.personalDataButtons',
3499                    '.ecommerceLoading'
3500                );
3501            } else {
3502                $('.ecommerceLoading').hide();
3503                $('.ecommerceForm').hide();
3504                $('.ecommerceSpacer').hide();
3505                $('.ecommerceSaveSuccess').show();
3506
3507                $('html, body').animate({
3508                    scrollTop: $(".ecommerceSaveSuccess").offset().top - 20
3509                }, 500);
3510            }
3511        })
3512        .fail(function () {
3513            stopSpinner(
3514                AJAX_TECHNICAL_ERROR,
3515                '.ecommerceLoginError',
3516                '.personalDataButtons',
3517                '.ecommerceLoading',
3518                true
3519            );
3520        });
3521
3522}
3523
3524function ecommerce_styleSelects(mode) {
3525    if (mode === undefined || mode === null || mode == '') {
3526        mode = 'init';
3527    }
3528    if (mode == 'init') {
3529        jQuery('.ecommerce select:not([multiple="multiple"])').each(function (index) {
3530            if ($(this).hasClass('phoneCountry')) {
3531                $(this).phonecountrymenu({
3532                    width: null,
3533                    change: function (event, data) {
3534
3535                    }
3536                }).phonecountrymenu("menuWidget").addClass("ui-menu-icons ui-menu-phoneCountry");
3537            } else if (jQuery(this).attr('data-special') == 'languages') {
3538                jQuery(this).iconselectmenu({
3539                    width: null,
3540                    change: function (event, ui) {
3541                    }
3542                });
3543            } else {
3544                jQuery(this).selectmenu({
3545                    width: null,
3546                    change: function (event, ui) {
3547                    }
3548                });
3549            }
3550        });
3551    } else if (mode == 'destroy') {
3552        //jQuery('select:not(.dontStyle)').selectpicker('destroy');
3553        jQuery('.ecommerce select:not([multiple="multiple"])').each(function (index) {
3554            if ($(this).hasClass('phoneCountry')) {
3555                jQuery(this).phonecountrymenu("destroy")
3556            } else if (jQuery(this).attr('data-special') == 'languages') {
3557                jQuery(this).iconselectmenu().iconselectmenu('destroy');
3558            } else {
3559                jQuery(this).selectmenu().selectmenu('destroy');
3560            }
3561        });
3562    } else if (mode == 'refresh') {
3563        //jQuery('select:not(.dontStyle)').selectpicker('destroy');
3564        jQuery('.ecommerce select:not([multiple="multiple"])').each(function (index) {
3565            if ($(this).hasClass('phoneCountry')) {
3566                if ($(this).parents('phoneContainer').is(':visible')) {
3567                    jQuery(this).phonecountrymenu().phonecountrymenu("refresh").phonecountrymenu("menuWidget").addClass("ui-menu-icons ui-menu-phoneCountry");
3568                }
3569            } else if (jQuery(this).attr('data-special') == 'languages') {
3570                jQuery(this).iconselectmenu().iconselectmenu('refresh');
3571            } else {
3572                jQuery(this).selectmenu().selectmenu('refresh');
3573            }
3574        });
3575    }
3576}
3577
3578function ecommerce_styleSpinner(mode) {
3579    if (mode === undefined || mode === null || mode == '') {
3580        mode = 'init';
3581    }
3582    if (mode == 'init') {
3583        jQuery('.ecommerce .quantityInput').each(function (index) {
3584            jQuery(this).spinner({
3585                min: 1,
3586                numberFormat: "n"
3587            });
3588        });
3589    } else if (mode == 'destroy') {
3590        jQuery('.ecommerce .quantityInput').each(function (index) {
3591            jQuery(this).spinner().spinner('destroy');
3592        });
3593    } else if (mode == 'refresh') {
3594        jQuery('.ecommerce .quantityInput').each(function (index) {
3595            //jQuery(this).spinner().spinner('refresh');
3596            jQuery(this).spinner().spinner('destroy');
3597            jQuery(this).spinner({
3598                min: 1,
3599                numberFormat: "n"
3600            });
3601        });
3602    }
3603}
3604
3605function ecommerce_familyMemberAdd() {
3606    $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyForm.php', {mode: $('.ecommerceButtonAdd').attr('data-mode')}, function (data) {
3607        $('.ecommerce .contentLeft .basketNavigation').addClass('static');
3608        $('.familyEntry .familyOptions').show();
3609        $('.familyEntry').removeClass('open');
3610        $('.familyEntry .familyEditForm').html('');
3611
3612        $('.familyFormContent').html(data);
3613        $('.familyFormContent').show();
3614        $('.ecommerceButtonAdd').hide();
3615        $('html, body').animate({
3616            scrollTop: $(".familyFormContent").offset().top
3617        }, 500);
3618    });
3619}
3620
3621function ecommerce_familyMemberEdit(familyMember) {
3622    $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyForm.php', {
3623        mode: $('.ecommerceButtonAdd').attr('data-mode'),
3624        action: 'edit',
3625        familyMember: familyMember
3626    }, function (data) {
3627        $('.ecommerce .contentLeft .basketNavigation').addClass('static');
3628        $('.familyEntry .familyOptions').show();
3629        $('.familyEntry').removeClass('open');
3630        $('.familyEntry .familyEditForm').html('');
3631
3632        $('.ecommerceButtonAdd').show();
3633        $('.familyFormContent').hide();
3634        $('.familyFormContent').html('');
3635
3636        $('#familyMember' + familyMember + ' .familyOptions').hide();
3637        $('#familyMember' + familyMember ).addClass('open');
3638        $('#familyMember' + familyMember + ' .familyEditForm').html(data);
3639        $('html, body').animate({
3640            scrollTop: $('#familyMember' + familyMember + ' .familyEditForm').offset().top
3641        }, 500);
3642    });
3643}
3644
3645function ecommerce_familyMemberCancelEdit(familyMember) {
3646    $('.ecommerce .contentLeft .basketNavigation').removeClass('static');
3647    $('#familyMember' + familyMember + ' .familyOptions').show();
3648    $('#familyMember' + familyMember).removeClass('open');
3649    $('#familyMember' + familyMember + ' .familyEditForm').html('');
3650    $('html, body').animate({
3651        scrollTop: $(".familyContent").parent().offset().top
3652    }, 500);
3653}
3654
3655function ecommerce_familyMemberToggle(familyMember) {
3656    if ($('#familyMember' + familyMember ).hasClass('open')){
3657        ecommerce_familyMemberCancelEdit(familyMember);
3658    }else{
3659        ecommerce_familyMemberEdit(familyMember)
3660    }
3661}
3662
3663function ecommerce_familyMemberSaveEdit(familyMember) {
3664    $('#familyMember' + familyMember + ' .familyDataButtons').hide();
3665    $('#familyMember' + familyMember + ' .ecommerceFamilyLoading').show();
3666    $('#familyMember' + familyMember + ' .ecommerceFamilyError').html('');
3667    ecommerce_resetValidation('');
3668
3669    if ($('#familyMember' + familyMember + ' .familyForm input[name="prename"]').length > 0) {
3670        ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="prename"]'), 'textRequired', 40, '');
3671        ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="name"]'), 'textRequired', 80, '');
3672    }
3673
3674    if ($('#familyMember' + familyMember + ' .familyForm input[name="birthday"]').length > 0) {
3675        if ($('#familyMember' + familyMember + ' .familyForm input[name="birthdayPicker"]').is(':visible')) {
3676            ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="birthdayPicker"]'), 'datePast', '', '');
3677        } else {
3678            ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="birthday"]'), 'datePast', '', '');
3679        }
3680    }
3681
3682    ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="gender"]'), 'required', 0, '1|2');
3683    ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="familyRoleCode"]'), 'required', 0, '1|2|3');
3684    if ($('#familyMember' + familyMember + ' .familyForm input[name="email"]').val() != '') {
3685        ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm input[name="email"]'), 'email', 60, '');
3686    }
3687    ecommerce_validateField($('#familyMember' + familyMember + ' .familyForm select[name="sprache"]'), 'required', 0, 'D|F|I');
3688
3689    $("#familyMember" + familyMember + " .familyForm .phoneContainer:visible").each(function (index) {
3690        var phoneContainer = $(this);
3691        ecommerce_validateField($(phoneContainer).find('.phone'), '', '', '');
3692        if ($(phoneContainer).find('.phoneTypeExtended').is(':visible')) {
3693            if ($(phoneContainer).find('.phone').val() != '') {
3694                ecommerce_validateField($(phoneContainer).find('.phoneTypeExtended select'), 'required', '', '');
3695            }
3696        }
3697    });
3698
3699    $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyEdit.php',
3700        $('.ecommerce #familyMember' + familyMember + ' .familyForm').serialize()
3701        + "&mode=" + $('.ecommerceButtonAdd').attr('data-mode') + "&familyMember=" + familyMember)
3702        .done(function (data) {
3703            if (data != '1') {
3704                stopSpinner(
3705                    data,
3706                    '#familyMember' + familyMember + ' .ecommerceFamilyError',
3707                    '#familyMember' + familyMember + ' .familyDataButtons',
3708                    '#familyMember' + familyMember + ' .ecommerceFamilyLoading'
3709                );
3710            } else {
3711                $('.ecommerce .contentLeft .basketNavigation').removeClass('static');
3712                $('#familyMember' + familyMember + ' .familyOptions').show();
3713                $('#familyMember' + familyMember).removeClass('open');
3714                $('#familyMember' + familyMember + ' .familyEditForm').html('');
3715
3716                $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyList.php', {mode: $('.ecommerceButtonAdd').attr('data-mode')}, function (data) {
3717                    $('.familyContentList').html(data);
3718                    $('html, body').animate({
3719                        scrollTop: $(".familyContent").parent().offset().top
3720                    }, 500);
3721                });
3722            }
3723        })
3724        .fail(function () {
3725            stopSpinner(
3726                AJAX_TECHNICAL_ERROR,
3727                '#familyMember' + familyMember + ' .ecommerceFamilyError',
3728                '#familyMember' + familyMember + ' .familyDataButtons',
3729                '#familyMember' + familyMember + ' .ecommerceFamilyLoading',
3730                true
3731            );
3732        });
3733}
3734
3735function ecommerce_familyMemberRemove(familyMember) {
3736    $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/family
3736Remove.php', {
3737        mode: $('.ecommerceButtonAdd').attr('data-mode'),
3738        familyMember: familyMember
3739    }, function (data) {
3740        $('.familyDeleteFancy').html(data);
3741        $('.familyDeleteFancyOpen').trigger('click');
3742    });
3743}
3744
3745function ecommerce_familyRemoveConfirm(familyMember) {
3746    $('.ecommerceFamilyDeleteLoading').show();
3747    $('.ecommerceFamilyDeleteSendMessage').html('');
3748    $('.familyDeleteButtons').hide();
3749
3750    $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyRemoveSend.php', $('form[name=familyDeleteWarning]').serialize() + "&mode=" + $('.ecommerceButtonAdd').attr('data-mode') + "&familyMember=" + familyMember, function (data) {
3751
3752        var json = JSON.parse(data);
3753
3754        if (json.type == 'success') {
3755            $.fancybox.close();
3756
3757            if ($('.familyContentList').length > 0) {
3758
3759                if (familyMember == 'self') {
3760                    window.location.href = json.redirect;
3761                } else {
3762                    var url = '/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyList.php';
3763
3764                    $.post(url, {mode: $('.ecommerceButtonAdd').attr('data-mode')}, function (data) {
3765                        $('.ecommerce .contentLeft .basketNavigation').removeClass('static');
3766                        $('.familyContentList').html(data);
3767                        $('html, body').animate({
3768                            scrollTop: $(".familyContent").parent().offset().top
3769                        }, 500);
3770                    });
3771                }
3772
3773            } else {
3774                location.reload();
3775            }
3776
3777        } else {
3778            if (json.type == 'warning') {
3779                $('.ecommerceFamilyDeleteLoading').hide();
3780                $('.familyDeleteButtons').show();
3781                $('.ecommerceFamilyDeleteSendWarning').html(json.output);
3782            } else {
3783                $('.ecommerceFamilyDeleteLoading').hide();
3784                $('.familyDeleteButtons').show();
3785                $('.ecommerceFamilyDeleteSendMessage').html(json.output);
3786            }
3787
3788        }
3789
3790
3791    });
3792}
3793
3794function ecommerce_familyRemoveCancel() {
3795    $.fancybox.close();
3796}
3797
3798function ecommerce_familyMemberCancel() {
3799    $('.ecommerce .contentLeft .basketNavigation').removeClass('static');
3800    $('.familyFormContent').hide();
3801    $('.familyFormContent').html('');
3802    $('.ecommerceButtonAdd').show();
3803    $('html, body').animate({
3804        scrollTop: $(".familyContent").parent().offset().top
3805    }, 500);
3806}
3807
3808function ecommerce_familyMemberSave() {
3809    $('.familyDataButtons').hide();
3810    $('.ecommerceFamilyLoading').show();
3811    $('.ecommerceFamilyError').html('');
3812    ecommerce_resetValidation('');
3813
3814    if ($('.familyForm input[name="prename"]').length > 0) {
3815        ecommerce_validateField($('.familyForm input[name="prename"]'), 'textRequired', 40, '');
3816        ecommerce_validateField($('.familyForm input[name="name"]'), 'textRequired', 80, '');
3817        if ($('.familyForm input[name="birthdayPicker"]').is(':visible')) {
3818            ecommerce_validateField($('.familyForm input[name="birthdayPicker"]'), 'datePast', '', '');
3819        } else {
3820            ecommerce_validateField($('.familyForm input[name="birthday"]'), 'datePast', '', '');
3821        }
3822
3823    }
3824
3825    ecommerce_validateField($('.familyForm input[name="gender"]'), 'required', 0, '1|2');
3826    ecommerce_validateField($('.familyForm input[name="familyRoleCode"]'), 'required', 0, '1|2|3');
3827    if ($('.familyForm input[name="email"]').val() != '') {
3828        ecommerce_validateField($('.familyForm input[name="email"]'), 'email', 60, '');
3829    }
3830    ecommerce_validateField($('.familyForm select[name="sprache"]'), 'required', 0, 'D|F|I');
3831
3832    $(".familyForm .phoneContainer:visible").each(function (index) {
3833        var phoneContainer = $(this);
3834        ecommerce_validateField($(phoneContainer).find('.phone'), '', '', '');
3835        if ($(phoneContainer).find('.phoneTypeExtended').is(':visible')) {
3836            if ($(phoneContainer).find('.phone').val() != '') {
3837                ecommerce_validateField($(phoneContainer).find('.phoneTypeExtended select'), 'required', '', '');
3838            }
3839        }
3840    });
3841
3842    $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familySave.php', $('.ecommerce .familyForm').serialize())
3843        .done(function (data) {
3844            if (data == 'sessionFail') {
3845                location.reload();
3846                return;
3847            }
3848
3849            if (data != '1') {
3850                stopSpinner(
3851                    data,
3852                    '.ecommerceFamilyError',
3853                    '.familyDataButtons',
3854                    '.ecommerceFamilyLoading'
3855                );
3856            } else {
3857                $('.ecommerce .contentLeft .basketNavigation').removeClass('static');
3858                $('.familyFormContent').hide();
3859                $('.familyFormContent').html('');
3860                $('.ecommerceButtonAdd').show();
3861
3862                $.post('/global/wGlobal/scripts/php/ecommerce/process2020/additionalData/familyList.php', {mode: $('.ecommerceButtonAdd').attr('data-mode')}, function (data) {
3863                    $('.familyContentList').html(data);
3864                    $('html, body').animate({
3865                        scrollTop: $(".familyContent").parent().offset().top
3866                    }, 500);
3867                });
3868            }
3869        })
3870        .fail(function () {
3871            stopSpinner(
3872                AJAX_TECHNICAL_ERROR,
3873                '.ecommerceFamilyError',
3874                '.familyDataButtons',
3875                '.ecommerceFamilyLoading',
3876                true
3877            );
3878        });
3879}
3880
3881function kidsHelp_start(redirect) {
3882    window.location.href = redirect;
3883}
3884
3885function kidsHelp_showForm(personalReference) {
3886    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/form.php', {personalReference: personalReference}, function (data) {
3887        $('.kidsHelpContent').html(data);
3888        $('html, body').animate({
3889            scrollTop: $(".kidsHelpContent").parent().offset().top
3890        }, 500);
3891    });
3892}
3893
3894function kidsHelp_saveForm(targetPage) {
3895    $('.kidsHelpButtons').hide();
3896    $('.ecommerceFamilyLoading').show();
3897    $('.ecommerceFamilyError').html('');
3898    ecommerce_resetValidation('');
3899
3900    if ($('input[name="prename"]').length > 0) {
3901        ecommerce_validateField($('input[name="gender"]'), 'required', 0, '1|2');
3902        ecommerce_validateField($('input[name="prename"]'), 'textRequired', 40, '');
3903        ecommerce_validateField($('input[name="name"]'), 'textRequired', 80, '');
3904        ecommerce_validateField($('select[name="tag"]'), 'datePast', '', '');
3905        ecommerce_validateField($('select[name="monat"]'), 'datePast', '', '');
3906        ecommerce_validateField($('select[name="jahr"]'), 'datePast', '', '');
3907    }
3908    ecommerce_validateField($('input[name="model"]'), 'required', 0, '1|2|3');
3909    ecommerce_validateField($('input[name="engravingType"]'), 'required', 0, '01|02');
3910    ecommerce_validateField($('input[name="engravingValue"]'), 'required', 14, '');
3911
3912    ecommerce_validateField($('input[name="phone1"]'), 'phoneRequiredWithOptionalCountryPrefix', 0, '');
3913    ecommerce_validateField($('input[name="firstName1"]'), 'required', 0, '');
3914    ecommerce_validateField($('input[name="lastName1"]'), 'required', 0, '');
3915    ecommerce_validateField($('input[name="link1"]'), 'required', 0, '');
3916    ecommerce_validateField($('input[name="phone2"]'), 'phoneRequiredWithOptionalCountryPrefix', 0, '');
3917    ecommerce_validateField($('input[name="firstName2"]'), 'required', 0, '');
3918    ecommerce_validateField($('input[name="lastName2"]'), 'required', 0, '');
3919    ecommerce_validateField($('input[name="link2"]'), 'required', 0, '');
3920    ecommerce_validateField($('input[name="phone3"]'), 'phoneWithOptionalCountryPrefix', 0, '');
3921
3922    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/formSave.php', $('.ecommerceForm').serialize())
3923        .done(function (data) {
3924            if (data != '1') {
3925                stopSpinner(
3926                    data,
3927                    '.ecommerceFamilyError',
3928                    '.kidsHelpButtons',
3929                    '.ecommerceFamilyLoading'
3930                );
3931            } else {
3932                var page = '/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/orderOverview.php';
3933                if (targetPage == 'form') {
3934                    page = '/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/form.php';
3935                }
3935 else if (targetPage == 'familyOverview') {
3936                    page = '/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/familyOverview.php';
3937                }
3938
3939                $.post(page, function (data) {
3940                    $('.kidsHelpContent').html(data);
3941                    $('html, body').animate({
3942                        scrollTop: $(".kidsHelpContent").parent().offset().top
3943                    }, 500);
3944                });
3945            }
3946        })
3947        .fail(function () {
3948            stopSpinner(
3949                AJAX_TECHNICAL_ERROR,
3950                '.ecommerceFamilyError',
3951                '.kidsHelpButtons',
3952                '.ecommerceFamilyLoading',
3953                true
3954            );
3955        });
3956}
3957
3958function kidsHelp_saveEdit(redirect) {
3959    $('.kidsHelpButtons').hide();
3960    $('.ecommerceFamilyLoading').show();
3961    $('.ecommerceFamilyError').html('');
3962    ecommerce_resetValidation('');
3963
3964    ecommerce_validateField($('input[name="phone1"]'), 'phoneRequiredWithOptionalCountryPrefix', 0, '');
3965    ecommerce_validateField($('input[name="firstName1"]'), 'required', 0, '');
3966    ecommerce_validateField($('input[name="lastName1"]'), 'required', 0, '');
3967    ecommerce_validateField($('input[name="link1"]'), 'required', 0, '');
3968    ecommerce_validateField($('input[name="phone2"]'), 'phoneRequiredWithOptionalCountryPrefix', 0, '');
3969    ecommerce_validateField($('input[name="firstName2"]'), 'required', 0, '');
3970    ecommerce_validateField($('input[name="lastName2"]'), 'required', 0, '');
3971    ecommerce_validateField($('input[name="link2"]'), 'required', 0, '');
3972    ecommerce_validateField($('input[name="phone3"]'), 'phoneWithOptionalCountryPrefix', 0, '');
3973
3974    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/editSave.php', $('.ecommerceForm').serialize())
3975        .done(function (data) {
3976            if (data != '1') {
3977                stopSpinner(
3978                    data,
3979                    '.ecommerceFamilyError',
3980                    '.kidsHelpButtons',
3981                    '.ecommerceFamilyLoading'
3982                );
3983            } else {
3984                window.location.href = redirect;
3985            }
3986        })
3987        .fail(function (xhr) {
3988            // F5 timeout return an 503 - Service Unavailable error
3989            stopSpinner(
3990                AJAX_TECHNICAL_ERROR,
3991                '.ecommerceFamilyError',
3992                '.kidsHelpButtons',
3993                '.ecommerceFamilyLoading',
3994                true
3995            );
3996        });
3997}
3998
3999function kidsHelp_showOrderOverview() {
4000    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/orderOverview.php', function (data) {
4001        $('.kidsHelpContent').html(data);
4002        $('html, body').animate({
4003            scrollTop: $(".kidsHelpContent").parent().offset().top
4004        }, 500);
4005    });
4006}
4007
4008function kidsHelp_showFamilyOverview() {
4009    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/familyOverview.php', function (data) {
4010        $('.kidsHelpContent').html(data);
4011        $('html, body').animate({
4012            scrollTop: $(".kidsHelpContent").parent().offset().top
4013        }, 500);
4014    });
4015}
4016
4017function kidsHelp_cancel(redirect) {
4018    window.location.href = redirect;
4019}
4020
4021function kidsHelp_removeOrder(order) {
4022    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/removeOrder.php', {order: order}, function (data) {
4023        $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/orderOverview.php', function (data) {
4024            $('.kidsHelpContent').html(data);
4025            $('html, body').animate({
4026                scrollTop: $(".kidsHelpContent").parent().offset().top
4027            }, 500);
4028        });
4029    });
4030}
4031
4032function kidsHelp_editOrder(order) {
4033    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/form.php', {order: order}, function (data) {
4034        $('.kidsHelpContent').html(data);
4035        $('html, body').animate({
4036            scrollTop: $(".kidsHelpContent").parent().offset().top
4037        }, 500);
4038    });
4039}
4040
4041function kidshelp_updateSendButton() {
4042    if ($('input[name="agb"]').is(':checked') && $('.kidsHelpOrderEntry').length > 0) {
4043        $('.ecommerceButtonSave').removeClass('ecommerceButtonBuyInactive');
4044    } else {
4045        $('.ecommerceButtonSave').addClass('ecommerceButtonBuyInactive');
4046    }
4047}
4048
4049function kidsHelp_sendOrder() {
4050    if (!$('.ecommerceButtonSave').hasClass('ecommerceButtonBuyInactive')) {
4051        $('.kidsHelpButtonsSend').hide();
4052        $('.ecommerceFamilyLoading').show();
4053        $('.ecommerceFamilyError').html('');
4054
4055        $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/sendOrder.php', $('.kidsHelpOrderForm').serialize())
4056            .done(function (data) {
4057                if (data != '1') {
4058                    stopSpinner(
4059                        data,
4060                        '.ecommerceFamilyError',
4061                        '.kidsHelpButtonsSend',
4062                        '.ecommerceFamilyLoading'
4063                    );
4064                } else {
4065                    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/confirmation.php', function (data) {
4066                        $('.kidsHelpContent').html(data);
4067                        $('html, body').animate({
4068                            scrollTop: $(".kidsHelpContent").parent().offset().top
4069                        }, 500);
4070                    });
4071                }
4072            })
4073            .fail(function (xhr) {
4074                stopSpinner(
4075                    AJAX_TECHNICAL_ERROR,
4076                    '.ecommerceFamilyError',
4077                    '.kidsHelpButtonsSend',
4078                    '.ecommerceFamilyLoading',
4079                    true
4080                );
4081            });
4082    }
4083}
4084
4085function kidsHelp_editProduct(product) {
4086    $.post('/global/wGlobal/scripts/php/ecare/dashboard/kidsHelp/form.php', {product: product}, function (data) {
4087        $('.containerDataProducts').html(data);
4088        $('html, body').animate({
4089            scrollTop: $(".containerDataProducts").parent().offset().top
4090        }, 500);
4091    });
4092}
4093
4094function ecare_getAge(birthDateString) {
4095    var today = new Date();
4096    var birthDate = new Date(birthDateString);
4097    var age = today.getFullYear() - birthDate.getFullYear();
4098    var m = today.getMonth() - birthDate.getMonth();
4099    if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
4100        age--;
4101    }
4102    return age;
4103}
4104
4105function ecommerceConfiguration_upsell(element, event) {
4106    event.stopPropagation();
4107    event.preventDefault();
4108
4109    ecommerceLoadingShow();
4110
4111    $.fancybox.close();
4112    $.post('/global/wGlobal/scripts/php/ecommerce/process/addToBasketConfigurator/replaceBasket.php', {
4113        productRemove: $(element).attr('data-productStandard'),
4114        productAdd: $(element).attr('data-productPlus')
4115    }, function (data) {
4116        $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/start.php', function (data) {
4117            $('.objectEcommerce').html(data);
4118
4119            ecommerceLoadingHide();
4120        });
4121    });
4122}
4123
4124function ecommerceAbortBuyableProductList() {
4125    if (xhrBuyableProductList) {
4126        xhrBuyableProductList.abort();
4127        $('.crossSellingListContainer').hide();
4128    }
4129    return true;
4130}
4131
4132function ecommerceBasket_mastercard(element, event) {
4133    event.stopPropagation();
4134    event.preventDefault();
4135
4136    ecommerceLoadingShow();
4137
4138    $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/mastercardBasket.php', function (data) {
4139        $.post('/global/wGlobal/scripts/php/ecommerce/process/basket/start.php', function (data) {
4140            $('.objectEcommerce').html(data);
4141
4142            ecommerceLoadingHide();
4143        });
4144    });
4145}
4146
4147function ecommerceLoadingShow() {
4148    $('.loadingBox').show();
4149    $('.contentBoxOverlay').show();
4150    $('.loadingBox .loadingBoxAnimationLineFull').addClass('loadingBoxAnimationLineFullStart');
4151}
4152
4153function ecommerceLoadingHide() {
4154    $('.loadingBox').hide();
4155    $('.contentBoxOverlay').hide();
4156    $('.loadingBox .loadingBoxAnimationLineFull').removeClass('loadingBoxAnimationLineFullStart');
4157}
4158
4159function checkDateInput() {
4160    var input = document.createElement('input');
4161    input.setAttribute('type', 'date');
4162
4163    var notADateValue = 'not-a-date';
4164    input.setAttribute('value', notADateValue);
4165
4166    return (input.value !== notADateValue);
4167}
4168
4169function ecommerceAddPhone(element) {
4170    var formContainer = $(element).closest('form');
4171    var elementToShow = $(formContainer).find('.phoneContainer:hidden').eq(0);
4172    $(elementToShow).eq(0).show();
4173    $(elementToShow).eq(0).find('.phoneCountry').phonecountrymenu("refresh").phonecountrymenu("menuWidget").addClass("ui-menu-icons ui-menu-phoneCountry");
4174    $(elementToShow).eq(0).find('.phoneType select').selectmenu('refresh');
4175
4176    if (!$(formContainer).find('.phoneContainer:hidden').length) {
4177        $(formContainer).find('.phoneAddButtonContainer').hide();
4178    }
4179
4180    $(formContainer).find('.phoneRemoveContainer').show();
4181    $(formContainer).find('.phoneContainer').addClass('hasTrash');
4182}
4183
4184function ecommerceRemovePhone(element) {
4185    var formContainer = $(element).closest('form');
4186    var elementToRemove = $(element).parents('.phoneContainer');
4187
4188    $(elementToRemove).find('.phone').val('');
4189    $(elementToRemove).find('.phoneCountry').val('CH');
4190    $(elementToRemove).find('.phoneCountry').phonecountrymenu("refresh").phonecountrymenu("menuWidget").addClass("ui-menu-icons ui-menu-phoneCountry");
4191    if (!$(elementToRemove).find('.phoneTypeExtended select option[value=""]').length) {
4192        $(elementToRemove).find('.phoneTypeExtended select').append('<option value="">' + $(formContainer).attr('data-choose') + '</option>');
4193    }
4194    $(elementToRemove).find('.phoneTypeExtended select').val('');
4195    $(elementToRemove).find('.phoneTypeExtended select').trigger('selectmenuchange');
4196
4197    $(elementToRemove).insertBefore($(formContainer).find('.phoneAddButtonContainer'));
4198    $(elementToRemove).hide();
4199
4200    var phoneFieldNumber = 1;
4201    $(elementToRemove).closest('form').find('.phoneContainer').each(function (index) {
4202        $(this).attr('data-fieldnumber', phoneFieldNumber);
4203        $(this).find('.phoneLabel').text($(formContainer).attr('data-labelPhone' + phoneFieldNumber));
4204        $(this).find('.phoneTypeLabel').text($(formContainer).attr('data-labelType' + phoneFieldNumber));
4205        phoneFieldNumber++;
4206    });
4207
4208    $(formContainer).find('.phoneAddButtonContainer').show();
4209
4210    if ($(formContainer).find('.phoneContainer:visible').length == 1) {
4211        $(formContainer).find('.phoneRemoveContainer').hide();
4212        $(formContainer).find('.phoneContainer').removeClass('hasTrash');
4213    }
4214}
4215
4216jQuery.widget("custom.phonecountrymenu", jQuery.ui.selectmenu, {
4217    _renderItem: function (ul, item) {
4218        var li = jQuery("<li>"),
4219            wrapper = jQuery("<div>", {});
4220
4221        if (item.disabled) {
4222            li.addClass("ui-state-disabled");
4223        }
4224        if (item.element.attr("data-lastBorderCountry") == '1') {
4225            li.addClass("phoneBorderCountry");
4226        }
4227
4228        jQuery("<span>", {
4229            style: item.element.attr("data-style"),
4230            "class": "ui-icon",
4231            "data-icon": item.value
4232        })
4233            .appendTo(wrapper);
4234
4235        jQuery("<span>", {text: item.label})
4236            .appendTo(wrapper);
4237
4238        jQuery("<span>", {
4239            text: item.element.attr("data-code"),
4240            "class": "phoneDealCode",
4241        })
4242            .appendTo(wrapper);
4243
4244        return li.append(wrapper).appendTo(ul);
4245    },
4246    _renderButtonItem: function (item) {
4247        var buttonItem = jQuery("<span>", {
4248            "style": item.element.attr("data-style"),
4249            "class": "ui-icon ui-selectmenu-iconSelected"
4250        });
4251
4252        return buttonItem;
4253    },
4254    _resizeMenu: function () {
4255        this.menu.outerWidth(280);
4256    }
4257});
4258
4259function getLanguageFromHtmlTag() {
4260    return document.documentElement.lang;
4261}
4262
4263function stopSpinner(message, errorElement, classToShow, classToHide, isFail = false) {
4264    ecommerce_showError(message, $(errorElement), isFail);
4265
4266    $(classToShow).show();
4267    $(classToHide).hide();
4268
4269    if ($('.invalidInput').length) {
4270        $('html, body').animate({
4271            scrollTop: $(".invalidInput").offset().top - 20
4272        }, 500);
4273    }
4274}
4275
4276$( document ).ready(function() {
4277  jQuery('.elementTeasersTestimonial .list-4').slick({
4278    infinite: true,
4279    slidesToShow: 4,
4280    slidesToScroll: 4,
4281    dots: true,
4282      responsive: [
4283        {
4284          breakpoint: 1280,
4285          settings: {
4286            slidesToShow: 3,
4287            slidesToScroll: 3
4288          }
4289        },
4290        {
4291          breakpoint: 1024,
4292          settings: {
4293            slidesToShow: 2,
4294            slidesToScroll: 2
4295          }
4296        },
4297        {
4298          breakpoint: 768,
4299          settings: {
4300            slidesToShow: 1,
4301            slidesToScroll: 1,
4302            centerMode: true,
4303            centerPadding: '50px'
4304          }
4305        }
4306      ]
4307  });
4308
4309  jQuery('.elementTeasersTestimonial .list-3').slick({
4310    infinite: true,
4311    slidesToShow: 3,
4312    slidesToScroll: 3,
4313    dots: true,
4314      responsive: [
4315        {
4316          breakpoint: 1024,
4317          settings: {
4318            slidesToShow: 2,
4319            slidesToScroll: 2
4320          }
4321        },
4322        {
4323          breakpoint: 768,
4324          settings: {
4325            slidesToShow: 1,
4326            slidesToScroll: 1,
4327            centerMode: true,
4328            centerPadding: '50px'
4329          }
4330        }
4331      ]
4332  });
4333
4334  jQuery('.elementTeasersTestimonial .list-2').slick({
4335    infinite: true,
4336    slidesToShow: 2,
4337    slidesToScroll: 2,
4338    dots: true,
4339      responsive: [
4340        {
4341          breakpoint: 768,
4342          settings: {
4343            slidesToShow: 1,
4344            slidesToScroll: 1,
4345            centerMode: true,
4346            centerPadding: '50px'
4347          }
4348        }
4349      ]
4350  });
4351
4352  $('.elementTeasersTestimonial .readMore').on('click',function(){
4353    var entry = $(this).closest('.entry ');
4354    $('.contentBoxOverlay').show();
4355    $('.contentBoxInner').html($(entry).find('.readMoreContent').html());
4356    $('.contentBox').show();
4357    $(".contentBox").css("top",$(document).scrollTop()+130);
4358    $(".contentBox").addClass('boxTestimonialOverlay');
4359  });
4360
4361  $('.contentBox').on('click','.testimonialOverlay .close',function(){
4362    $(".contentBox").removeClass('boxTestimonialOverlay');
4363    $('.contentBoxOverlay').hide();
4364    $('.contentBox').hide();
4365  });
4366
4367  $('.contentBoxOverlay').on('click',function(){
4368    $(".contentBox").removeClass('boxTestimonialOverlay');
4369    $('.contentBoxOverlay').hide();
4370    $('.contentBox').hide();
4371  });
4372});
4373
4374var hasNotYetLoadedAllCss = function(){
4375
4376  var divTmp = document.getElementById('deferred-styles-dyn');
4377  if((!divTmp) || (divTmp && window.getComputedStyle(divTmp).display == 'none')){
4378    return false;
4379  }
4380  return true;
4381
4382};
4383
4384function contentSection_resize(){
4385
4386  $(".contentSectionFooter").each(function(){
4387    var height = $(this).height();
4388    $(this).closest('.elementSection').css('margin-bottom',height+15);
4389  });
4390
4391}
4392
4393function contentSection_resizeLoad(){
4394  if(!hasNotYetLoadedAllCss()){
4395    contentSection_resize();
4396  }else{
4397    window.setTimeout(function(){
4398      contentSection_resizeLoad();
4399    }, 320);
4400  }
4401}
4402
4403$( window ).on('load',function() {
4404  contentSection_resizeLoad();
4405});
4406
4407$( window ).on('resize',function() {
4408  contentSection_resize();
4409});
4410
4411
4412
4413wAllowMinimize=true;var actualToolbar="";function openFlyout(element,event) {var toolbarEntry=$(element).parents('.toolbarEntry');if($(toolbarEntry).attr('data-id')=='campingBook'){if($(window).width() <=960){$('html, body').animate({scrollTop:$(".respContainerBook").offset().top
4414}, 500);}else{$('html, body').animate({scrollTop:$(".campingBoxForm").offset().top-80
4415}, 500);}}else{event.preventDefault();$('.toolbarEntryActive').removeClass('toolbarEntryActive');var link=$(toolbarEntry).find(".toolbarEntryContent").attr('href');
4415if (actualToolbar==link&&$(".toolbar").hasClass("flyoutActive")) {actualToolbar="";toggleFlyout();} else {actualToolbar=link;var element=$(toolbarEntry);$.post(link, {sectionPath:$(toolbarEntry).attr('data-id'), projectPath:$(toolbarEntry).attr('data-project')}, function (data) {$(".toolbarFlyoutInner").html(data);if (!$(".toolbar").hasClass("flyoutActive")) {toggleFlyout();}$(element).addClass('toolbarEntryActive');$('.toolbarEntryBig').hide();});}}}function toggleFlyout() {$(".toolbarFlyout").toggle();$(".toolbarFlyoutDarker").toggle();if ($(".toolbar").hasClass("flyoutActive")) {$(".toolbar").removeClass("flyoutActive");$('.toolbarEntryActive').removeClass('toolbarEntryActive');} else {$(".toolbar").addClass("flyoutActive");}}var checkTouch=("ontouchstart" in document.documentElement);$(document).ready(function () {$( ".toolbar .toolbarEntry" ).on("mouseenter", function() {if(!checkTouch){$(this).find('.toolbarEntryBig').show();}}).on("mouseleave", function() {if(!checkTouch){$(this).find('.toolbarEntryBig').hide();}});var longpress=2000;var start;jQuery( ".toolbar .toolbarEntry" ).on('touchstart', function( e ) {start=new Date().getTime();} );jQuery( ".toolbar .toolbarEntry" ).on('touchmove', function( e ) {start=0;} );jQuery( ".toolbar .toolbarEntry" ).on('touchend', function( e ) {if ( new Date().getTime() >=( start + longpress )  ) {$('.toolbarEntryBig').hide();$(this).find('.toolbarEntryBig').show();}else{openFlyout($(this).find('.toolbarEntryBig'),e);}});$('.toolbarEntryBig').on('click',function (e) {openFlyout(this,e);});$(".toolbarFlyoutDarker").on('click',function (e) {e.preventDefault();actualToolbar="";toggleFlyout();});});
4416/**
4417 * LoadingBox component handler.
4418 */
4419/**
4420 * LoadingBox component handler.
4421 */
4422const LoadingBox = (() => {
4423
4424
4425    // Data initialization
4426    const DANGER_ZONE_RATIO = 0.8;
4427    const REFRESH_STEP_TIMER = 100;
4428
4429    let currentTimer = 0;
4430    let currentStepIndex = 0;
4431    let currentStep;
4432    let currentValue = 0;
4433    let currentProgressTotalPercent = 0;
4434    let currentProgressMaxTotalPercent = 0;
4435    let currentProgressMaxTotalDangerZone = 0;
4436    let currentInterval;
4437    let totalMaxTime = 100
4438    let progressStepValue = 0;
4439    let config = [];
4440
4441
4442
4443    /**
4444     * Entrypoint of progressBar initialization. Should be use on each loader opening,
4445     * used as a callback of the show() function, e.g. $('.loadingBox').show(0, startProgressBarLoading);
4446     */
4447    function startProgressBarLoading(data) {
4448        if (!data) {
4449            data = PROGRESS_BAR_PERSONAL_DATA_SCHEMA;
4450        }
4451        if (data !== undefined) {
4452            totalMaxTime = data.reduce(
4453                (accumulator, currentValue) => accumulator + currentValue.maxTime,
4454                0
4455            );
4456            progressStepValue = 100 / totalMaxTime / REFRESH_STEP_TIMER * 10;
4457            config = data;
4458        }
4459
4460        // Reinit the progressBar values, especially in the case where it's a re-use
4461        initProgressBar();
4462
4463        // For legay purpose, if we use this revamped box, we hide the old loading progress bar
4464        //$('.loadingBoxAnimationLine').hide();
4465        $('.loadingBoxAnimationLineFull').hide();
4466
4467        // Update the first chunk of the progress bar
4468        updateProgressBar();
4469    }
4470
4471    /**
4472     * Function that should be called on each event triggered.
4473     * This will make the bar going forward on the steps previously declared,
4474     * and managing both label and progress bar value display.
4475     */
4476    function updateProgressBar() {
4477        // Initialize current step values
4478        initStepValues();
4479
4480        // Fix progress bar to initial level of currentStep (jump to it if it's a secondary call)
4481        setProgressBarValue(currentValue);
4482
4483        // Launch interval to update bar bit by bit
4484        currentInterval = setInterval(() => {
4485            progressBarIntervalUpdate();
4486        }, REFRESH_STEP_TIMER);
4487
4488        progressTotalPercent += currentProgressTotalPercent;
4489        setProgressBarLabel(currentStep.label);
4490
4491        // Update currentTimer to this step max time for later eventual usage
4492        currentTimer += currentStep.maxTime;
4493        currentStepIndex++;
4494
4495    }
4496
4497    /**
4498     * Initialization function to reset global progress bar values
4499     */
4500    function initProgressBar() {
4501        setProgressBarValue(0);
4502        currentTimer = 0;
4503        currentStepIndex = 0;
4504        progressTotalPercent = 0;
4505        clearProgressInterval();
4506    }
4507
4508    /**
4509     * Initialization function to reset step values
4510     */
4511    function initStepValues() {
4512        currentStep = config[currentStepIndex] !== undefined ? config[currentStepIndex] : {
4513            "stepName": "getAccount",
4514            "maxTime": 10,
4515            "label": ""
4516        };
4517        currentValue = (currentTimer / totalMaxTime) * 100;
4518        currentProgressTotalPercent = (currentStep.maxTime / totalMaxTime) * 100;
4519        currentProgressMaxTotalPercent = currentValue + currentProgressTotalPercent;
4520        currentProgressMaxTotalDangerZone = currentValue + currentProgressTotalPercent * DANGER_ZONE_RATIO;
4521        clearProgressInterval();
4522    }
4523
4524    /**
4525     * Clear any running interval if any
4526     */
4527    function clearProgressInterval() {
4528        if (currentInterval) {
4529            clearInterval(currentInterval);
4530        }
4531    }
4532
4533    /**
4534     * Function called on interval update.
4535     * Calculates the next progress bar value, and set it.
4536     * Also adds a "dangerZone" control, which reduce the amount added on each step
4537     * when reaching a certain amount allowed for each step (define via the DANGER_ZONE_RATIO variable).
4538     * This amount is reduced exponentially, which mean it tends not to reach final value - 1 (to avoid
4539     * getting on 100% when it's not over)
4540     */
4541    function progressBarIntervalUpdate() {
4542        // We define what should be the next step value based on currentValue + what is the step value
4543        const nextStepValue = currentValue + progressStepValue;
4544
4545        // If this new calculated value gets us to the "dangerZone"
4546        if (nextStepValue > currentProgressMaxTotalDangerZone) {
4547            setProgressBarLabel(PLEASE_WAIT_MESSAGE);
4548
4549            // We add to current value only a percentage of the normal step value.
4550            // This value is going exponentially lower as times goes
4551            currentValue = currentValue + (progressStepValue * (currentProgressMaxTotalPercent - 1 - currentValue) / 10);
4552        } else {
4553            // Otherwise, we simply use normally calculated value
4554            currentValue = nextStepValue;
4555        }
4556
4557        // and set progress bar new value.
4558        setProgressBarValue(currentValue);
4559    }
4560
4561    /**
4562     * Accessibilty methods to reach progress bar value
4563     * @param value float Should be set between 0 and 100
4564     */
4565    function setProgressBarValue(value) {
4566        $('#loadingBoxProgressBar').val(value);
4567    }
4568
4569    /**
4570     * Accessibilty methods to reach progress bar label
4571     * @param value string Text to be displayed. Should be located in user langage prior getting in.
4572     */
4573    function setProgressBarLabel(label) {
4574        $('.loadingBoxText').html(label);
4575    }
4576
4577    return {
4578        startProgressBarLoading: startProgressBarLoading,
4579        updateProgressBar: updateProgressBar
4580    }
4581})();
4582/**
4583 * Event listener initialization. On each progressBarUpdate event triggered, we update current step.
4584 * This is the main entry for this process.
4585 */
4586document.addEventListener('progressBarUpdate', (e) => {
4587    LoadingBox.updateProgressBar();
4588});
4589
4590/**
4591 * This transformer takes binary Uint8Array chunks from a `fetch`
4592 * and translates them to chunks of strings.
4593 *
4594 * @implements {TransformStreamTransformer}
4595 */
4596/**
4597 * This transformer takes binary Uint8Array chunks from a `fetch`
4598 * and translates them to chunks of strings.
4599 *
4600 * @implements {TransformStreamTransformer}
4601 */
4602class Uint8ArrayToStringsTransformer {
4603    constructor() {
4604        this.decoder = new TextDecoder()
4605        this.lastString = ''
4606    }
4607
4608    /**
4609     * Receives the next Uint8Array chunk from `fetch` and transforms it.
4610     *
4611     * @param {Uint8Array} chunk The next binary data chunk.
4612     * @param {TransformStreamDefaultController} controller The controller to enqueue the transformed chunks to.
4613     */
4614    transform(chunk, controller) {
4615
4616        // Decode the current chunk to string and prepend the last string
4617        const string = `${this.lastString}${this.decoder.decode(chunk)}`
4618
4619        // Extract lines from chunk
4620        const lines = string.split(/\r\n|[\r\n]/g)
4621
4622        // Save last line, as it might be incomplete
4623        this.lastString = lines.pop() || ''
4624
4625        // Enqueue each line in the next chunk
4626        for (const line of lines) {
4627            controller.enqueue(line)
4628        }
4629    }
4630
4631    /**
4632     * Is called when `fetch` has finished writing to this transform stream.
4633     *
4634     * @param {TransformStreamDefaultController} controller The controller to enqueue the transformed chunks to.
4635     */
4636    flush(controller) {
4637        // Is there still a line left? Enqueue it
4638        if (this.lastString) {
4639            controller.enqueue(this.lastString)
4640        }
4641    }
4642}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.