var QUESTIONMARK;$(document).ready(function(){$("body").on("click",".toggle_next",function(){$(this).next().toggleClass("hid");$(this).toggleClass("open")});$(".dropdown-list").each(function(){$(this).hasClass("open")?$(this).removeClass("open"):$(this).addClass("closed");$(this).first().on("click",function(){$(this).toggleClass("closed")})});$(".mddm > li > a").keypress(function(n){n.which==13&&(n.preventDefault(),$(this).parent().find(".row").toggleClass("open"))});$(".mddm > li").on("click",".no-go",function(n){n.preventDefault();var t=$(this).parent().find(".row");t.hasClass("open")?($(".mddm .row").removeClass("open"),$(this).parent().parent().removeClass("clicked"),$(this).blur(),t.blur()):($(".mddm .row, .mddm > li").removeClass("open"),t.addClass("open"),$(this).parent().parent().addClass("clicked"))});$(".mddm > li").on("click",".no-go",function(){$(this).parent().toggleClass("open")});$(window).click(function(n){$(n.target).closest(".mddm").length||($(".mddm .row").removeClass("open"),$(".mddm > li").removeClass("open"),$(".mddm").removeClass("clicked"))})});var ALERTS=function(){var t,i,n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=7,u=n?Cookies.get("warningseen"):sessionStorage.getItem("warningseen"),f=n?Cookies.get("notificationseen"):sessionStorage.getItem("notificationseen"),e=function(n){t=$(n);u&&t.hide()},o=function(n){i=$(n);f&&i.hide()},s=function(){n?Cookies.set("warningseen",!0,{expires:r}):sessionStorage.setItem("warningseen",!0);t.hide()},h=function(){n?Cookies.set("notificationseen",!0,{expires:r}):sessionStorage.setItem("notificationseen",!0);i.hide()};return{initWarning:e,initNotification:o,dismissWarning:s,dismissNotification:h}}(),QUERYSTRING=function(){var n=function(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null};return{getParameterByName:n}}(),page=function(){return{}}(),ARCHIVE_MODULE=function(n){var t={itemsPerPage:12,currentPage:1,archiveTypes:[1,2,3,5],categories:[],language:"EN"},i=function(n){$.extend(t,n)},r=function(n){return i(n),new Promise(function(t){$.post("/api/archive",n,function(n){t(n)})})},u=function(n){return i(n),r(t)};return n.ARCHIVE={load:u,filter:r},n}(page||{}),SEARCH_MODULE=function(n){var i="q",t,r=function(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null},u=function(n,u){i=n;t=$(u);var f=r(i);f&&(t.val(f),t.focus())};return n.SEARCH={load:u},n}(page||{});$(".selectionhelperquestionblock input").on("click",function(){$(this).closest("li").siblings().each(function(){$("#"+$(this).attr("data-class")).hide();$("."+$(this).attr("data-class")).hide()});var n=$(this).closest("li").attr("data-class");$("."+$(this).attr("name")).show();$("#"+n).show();$("."+n).show()});$(document).ready(function(){$(".selectionhelperquestionblock").each(function(){$(this).parents(".selectionhelperquestionblock").length&&$(this).children(":first").hide()})});$(document).ready(function(){$.fn.isInViewport=function(){var n=$(this).offset().top,i=n+$(this).outerHeight(),t=$(window).scrollTop(),r=t+$(window).height();return i>t&&n<r};$(".accordionbutton").on("click",function(){var n=$(this).closest(".card").prev();n.length&&(n.find(".accordionbutton").isInViewport()||(console.log("scrolling.."),$([document.documentElement,document.body]).animate({scrollTop:n.offset().top+60},1e3)))})});QUESTIONMARK=function(n){var t=".question-mark-helper";n(document).ready(function(){n(t).each(function(){var t=n(this),i=t.text();t.empty().attr("data-placement","bottom").attr("title",i)});n(t).tooltip()})}(jQuery);+function(){"use strict";function t(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var n=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();(function(i){var r="ekkoLightbox",e=i.fn[r],f={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div><\/div><div><\/div><\/div><\/div>',leftArrow:"<span>&#10094;<\/span>",rightArrow:"<span>&#10095;<\/span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},u=function(){function r(n,u){var e=this;t(this,r);this._config=i.extend({},f,u);this._$modalArrows=null;this._galleryIndex=0;this._galleryName=null;this._padding=null;this._border=null;this._titleIsShown=!1;this._footerIsShown=!1;this._wantedWidth=0;this._wantedHeight=0;this._touchstartX=0;this._touchendX=0;this._modalId="ekkoLightbox-"+Math.floor(1e3*Math.random()+1);this._$element=n instanceof jQuery?n:i(n);this._isBootstrap3=3==i.fn.modal.Constructor.VERSION[0];var o='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"<\/h4>",s='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;<\/span><\/button>',h='<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?s+o:o+s)+"<\/div>",c='<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"<\/div>",l='<div class="modal-dialog" role="document"><div class="modal-content">'+h+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"><\/div><div class="ekko-lightbox-item fade"><\/div><\/div><\/div>'+c+"<\/div><\/div>";i(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+l+"<\/div>");this._$modal=i("#"+this._modalId,this._config.doc);this._$modalDialog=this._$modal.find(".modal-dialog").first();this._$modalContent=this._$modal.find(".modal-content").first();this._$modalBody=this._$modal.find(".modal-body").first();this._$modalHeader=this._$modal.find(".modal-header").first();this._$modalFooter=this._$modal.find(".modal-footer").first();this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first();this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first();this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first();this._border=this._calculateBorders();this._padding=this._calculatePadding();this._galleryName=this._$element.data("gallery");this._galleryName&&(this._$galleryItems=i(document.body).find('*[data-gallery="'+this._galleryName+'"]'),this._galleryIndex=this._$galleryItems.index(this._$element),i(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this)),this._config.showArrows&&this._$galleryItems.length>1&&(this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'<\/a><a href="#">'+this._config.rightArrow+"<\/a><\/div>"),this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first(),this._$lightboxContainer.on("click","a:first-child",function(n){return n.preventDefault(),e.navigateLeft()}),this._$lightboxContainer.on("click","a:last-child",function(n){return n.preventDefault(),e.navigateRight()}),this.updateNavigation()));this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return e._toggleLoading(!0),e._handle(),e._config.onShown.call(e)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return e._galleryName&&(i(document).off("keydown.ekkoLightbox"),i(window).off("resize.ekkoLightbox")),e._$modal.remove(),e._config.onHidden.call(e)}).modal(this._config);i(window).on("resize.ekkoLightbox",function(){e._resize(e._wantedWidth,e._wantedHeight)});this._$lightboxContainer.on("touchstart",function(){e._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){e._touchendX=event.changedTouches[0].screenX;e._swipeGesure()})}return n(r,null,[{key:"Default",get:function(){return f}}]),n(r,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(n){return n<0||n>this._$galleryItems.length-1?this:(this._galleryIndex=n,this.updateNavigation(),this._$element=i(this._$galleryItems.get(this._galleryIndex)),void this._handle())}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(0===this._galleryIndex){if(!this._config.wrapping)return;this._galleryIndex=this._$galleryItems.length-1}else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&1!==this._$galleryItems.length){if(this._galleryIndex===this._$galleryItems.length-1){if(!this._config.wrapping)return;this._galleryIndex=0}else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var n=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");0===this._galleryIndex?n.find("a:first-child").addClass("disabled"):n.find("a:first-child").removeClass("disabled");this._galleryIndex===this._$galleryItems.length-1?n.find("a:last-child").addClass("disabled"):n.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(n){return n=n||window.event,39===n.keyCode?this.navigateRight():37===n.keyCode?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(n,t){return t=t||!1,!t&&this._isImage(n)&&(t="image"),!t&&this._getYoutubeId(n)&&(t="youtube"),!t&&this._getVimeoId(n)&&(t="vimeo"),!t&&this._getInstagramId(n)&&(t="instagram"),("audio"==t||"video"==t||!t&&this._isMedia(n))&&(t="media"),(!t||["image","youtube","vimeo","instagram","media","url"].indexOf(t)<0)&&(t="url"),t}},{key:"_getRemoteContentType",value:function(n){var t=i.ajax({type:"HEAD",url:n,async:!1});return t.getResponseHeader("Content-Type")}},{key:"_isImage",value:function(n){return n&&n.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_isMedia",value:function(n){return n&&n.match(/(\.(mp3|mp4|ogg|webm|wav)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var n=this,t=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(t=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){n._$lightboxBodyTwo.hasClass("in")||n._$lightboxBodyTwo.empty();n._$lightboxBodyOne.hasClass("in")||n._$lightboxBodyOne.empty()},500),t.addClass("in show"),t}},{key:"_handle",value:function(){var t=this._containerToUse(),n,i;if(this._updateTitleAndFooter(),n=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(n,this._$element.attr("data-type")||!1),["image","youtube","vimeo","instagram","media","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(n,t);this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(n,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(n),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(n),t);break;case"media":this._showHtml5Media(n,t);break;default:this._loadRemoteContent(n,t)}return this}},{key:"_getYoutubeId",value:function(n){if(!n)return!1;var t=n.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!(!t||11!==t[2].length)&&t[2]}},{key:"_getVimeoId",value:function(n){return!!(n&&n.indexOf("vimeo")>0)&&n}},{key:"_getInstagramId",value:function(n){return!!(n&&n.indexOf("instagram")>0)&&n}},{key:"_toggleLoading",value:function(n){return n=n||!1,n?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),i(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),i(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(n){return parseInt(this._$modalDialog.css(n),10)+parseInt(this._$modalContent.css(n),10)+parseInt(this._$modalBody.css(n),10)}},{key:"_updateTitleAndFooter",value:function(){var n=this._$element.data("title")||"",t=this._$element.data("footer")||"";return this._titleIsShown=!1,n||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(n||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,t?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(t)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(n,t){var r=this._getYoutubeId(n),u=n.indexOf("&")>0?n.substr(n.indexOf("&")):"",i=this._$element.data("width")||560,f=this._$element.data("height")||i/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+r+"?badge=0&autoplay=1&html5=1"+u,i,f,t)}},{key:"_showVimeoVideo",value:function(n,t){var i=this._$element.data("width")||500,r=this._$element.data("height")||i/(560/315);return this._showVideoIframe(n+"?autoplay=1",i,r,t)}},{key:"_showInstagramVideo",value:function(n,t){var i=this._$element.data("width")||612,r=i+80;return n="/"!==n.substr(-1)?n+"/":n,t.html('<iframe width="'+i+'" height="'+r+'" src="'+n+'embed/" frameborder="0" allowfullscreen><\/iframe>'),this._resize(i,r),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(n,t,i,r){return i=i||t,r.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+t+'" height="'+i+'" src="'+n+'" frameborder="0" allowfullscreen class="embed-responsive-item"><\/iframe><\/div>'),this._resize(t,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Media",value:function(n,t){var u=this._getRemoteContentType(n),i,r,f;return u?(i="",i=u.indexOf("audio")>0?"audio":"video",r=this._$element.data("width")||560,f=this._$element.data("height")||r/(560/315),t.html('<div class="embed-responsive embed-responsive-16by9"><'+i+' width="'+r+'" height="'+f+'" preload="auto" autoplay controls class="embed-responsive-item"><source src="'+n+'" type="'+u+'">'+this._config.strings.type+"<\/"+i+"><\/div>"),this._resize(r,f),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this):this._error(this._config.strings.type)}},{key:"_loadRemoteContent",value:function(n,t){var r=this,u=this._$element.data("width")||560,f=this._$element.data("height")||560,e=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),e||this._isExternal(n)?(t.html('<iframe src="'+n+'" frameborder="0" allowfullscreen><\/iframe>'),this._config.onContentLoaded.call(this)):t.load(n,i.proxy(function(){return r._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(u,f),this}},{key:"_isExternal",value:function(n){var t=n.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof t[1]&&t[1].length>0&&t[1].toLowerCase()!==location.protocol||"string"==typeof t[2]&&t[2].length>0&&t[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(n){return console.error(n),this._containerToUse().html(n),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(n,t){var r,u;if(this._$galleryItems&&(r=i(this._$galleryItems.get(n),!1),"undefined"!=typeof r))return u=r.attr("data-remote")||r.attr("href"),("image"===r.attr("data-type")||this._isImage(u))&&this._preloadImage(u,!1),t>0?this._preloadImageByIndex(n+1,t-1):void 0}},{key:"_preloadImage",value:function(n,t){var r=this,u;return t=t||!1,u=new Image,t&&!function(){var f=setTimeout(function(){t.append(r._config.loadingMessage)},200);u.onload=function(){f&&clearTimeout(f);f=null;var n=i("<img />");return n.attr("src",u.src),n.addClass("img-fluid"),n.css("width","100%"),t.html(n),r._$modalArrows&&r._$modalArrows.css("display",""),r._resize(u.width,u.height),r._toggleLoading(!1),r._config.onContentLoaded.call(r)};u.onerror=function(){return r._toggleLoading(!1),r._error(r._config.strings.fail+("  "+n))}}(),u.src=n,u}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(n,t){var u,f,e;t=t||n;this._wantedWidth=n;this._wantedHeight=t;var h=n/t,r=this._padding.left+this._padding.right+this._border.left+this._border.right,l=this._config.doc.body.clientWidth>575?20:0,a=this._config.doc.body.clientWidth>575?0:20,o=Math.min(n+r,this._config.doc.body.clientWidth-l,this._config.maxWidth);n+r>o?(t=(o-r-a)/h,n=o):n+=r;u=0;f=0;this._footerIsShown&&(f=this._$modalFooter.outerHeight(!0)||55);this._titleIsShown&&(u=this._$modalHeader.outerHeight(!0)||67);var c=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,v=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),s=Math.min(t,i(window).height()-c-v-u-f,this._config.maxHeight-c-u-f);if(t>s&&(n=Math.ceil(s*h)+r),this._$lightboxContainer.css("height",s),this._$modalDialog.css("flex",1).css("maxWidth",n),e=this._$modal.data("bs.modal"),e)try{e._handleUpdate()}catch(y){e.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(n){var t=this;return n=n||{},this.each(function(){var u=i(t),f=i.extend({},r.Default,u.data(),"object"==typeof n&&n);new r(t,f)})}}]),r}();return i.fn[r]=u._jQueryInterface,i.fn[r].Constructor=u,i.fn[r].noConflict=function(){return i.fn[r]=e,u._jQueryInterface},u})(jQuery)}(jQuery)