function initializeStartPage(){initRowHeights(!1);extraMarginsFrontpageList();$(".frontpageContainer").children().first().children(".sectionArrow").removeClass("sectionArrow");removeSectionArrowBetweenRealTopicRows()}function initRowHeights(n){$(".lt-ie9").length===0&&(initTopicRows(n),initNewsRowsSize(n),initNewsRow())}function initTopicRows(n){var i=document.getElementsByClassName("topicrow"),t,r;if($(window).width()>766)for(t=0,r=i.length;t<r;t++)ViewHelpers.findAndSetHeighestElement(i[t],"topic");else if(n)for(t=0,r=i.length;t<r;t++)ViewHelpers.removeInlineHeight(i[t],"topic")}function initNewsRowsSize(n){var i=document.getElementsByClassName("newsrow"),t,r;if($(window).width()>766)for(t=0,r=i.length;t<r;t++)ViewHelpers.findAndSetHeighestElement(i[t],"frontpageItemText"),ViewHelpers.findAndSetHeighestElement(i[t],"frontpageLinkHeading");else if(n)for(t=0,r=i.length;t<r;t++)ViewHelpers.removeInlineHeight(i[t],"frontpageItemText"),ViewHelpers.removeInlineHeight(i[t],"frontpageLinkHeading")}function initNewsRow(){var t,n;if($(window).width()>766)for(t=document.getElementsByClassName("newsrow"),n=0;n<t.length;n++)ViewHelpers.checkAndHideImagesFromRow(t[n].getElementsByClassName("newsItem"),0)}function extraMarginsFrontpageList(){var t=!1,i=0,n;for($(".frontpageContainer").children().children("div").each(function(){$(this).hasClass("same-block")?(t||(i++,t=!0),$(this).addClass("same-block-id-"+i)):t=!1}),n=0;n<i;n++)$(".same-block-id-"+(n+1)).last().addClass("same-block-last"),$(".same-block-id-"+(n+1)).first().addClass("same-block-first"),$(".same-block-id-"+(n+1)).first().addClass("sectionArrow")}function removeSectionArrowBetweenRealTopicRows(){$(".same-block:not('.same-block-first'):not('.borderWrapper')").removeClass("sectionArrow").addClass("topicFollowPrevious")}function viewImg(n){var t=$(n);t[0].src=t.data("src")}function plusSlidesInit(n){showSlidesInit(slideIndex+=n)}function currentSlideInit(n){showSlidesInit(slideIndex=n)}function showSlidesInit(n){var i,t=document.getElementsByClassName("slideshow_item"),r;for(n>t.length&&(slideIndex=1),n<1&&(slideIndex=t.length),i=0;i<t.length;i++)t[i].style.display="none";t[slideIndex-1].style.display="block";r=$(t[slideIndex-1]).find("img");viewImg(r[0])}function openModal(){isSwipe||($("body").attr("style","overflow: hidden;position: relative; height: 100%;"),$("html").attr("style","overflow: hidden;position: relative; height: 100%;"),document.getElementById("modal").style.display="block",$(".gallery_container img").each(function(n,t){viewImg(t)}));$(".slideshow_item .numbertext").hide();isIE()?setTimeout(function(){$(".gallery_navigation_modal--first").focus()},10):$(".gallery_navigation_modal--first").focus()}function closeModal(){document.getElementById("modal").style.display="none";$("body").attr("style","");$("html").attr("style","");$(".slideshow_item .numbertext").show();isIE()?setTimeout(function(){$(".gallery_navigation_initial--first").focus()},10):$(".gallery_navigation_initial--first").focus()}function toogleDisplay(){$(".gallery_container").is(":visible")?($(".gallery_navigation_modal").show(),$("#download-image").show(),showSlides(slideIndex),$(".gallery-imagetext").hide(),$(".gallery-text").show()):($("#download-image").hide(),$(".modal_slider").hide(),$(".gallery_container").show(),$(".gallery-imagetext").show(),$(".gallery-text").hide(),$(".gallery_navigation_modal").hide())}function plusSlides(n){showSlides(slideIndex+=n)}function currentSlide(n){isSwipe||(showSlides(slideIndex=n),$(".gallery-imagetext").hide(),$(".gallery-text").show());isSwipe=!1}function showSlides(n){var i,t,r;for($(".gallery_container").hide(),$("#download-image").show(),t=document.getElementsByClassName("modal_slider"),n>t.length&&(slideIndex=1),n<1&&(slideIndex=t.length),i=0;i<t.length;i++)t[i].style.display="none";t[slideIndex-1].style.display="block";r=$(t[slideIndex-1]).find("img");viewImg(r[0]);$(".gallery_navigation_modal").show()}function downloadImage(){var u=navigator.userAgent.toLowerCase().indexOf("chrome")>-1,f=navigator.userAgent.toLowerCase().indexOf("safari")>-1,e=document.getElementsByClassName("modal_slider"),o=$(e[slideIndex-1]).find("img"),n=$(o[0]),t,r,i;return/(iP)/g.test(navigator.userAgent)?(alert("Your device does not support files downloading. Please try again in desktop browser."),!1):(u||f)&&(t=document.createElement("a"),t.href=n[0].src,t.download!==undefined&&(r=n[0].src.substring(n[0].src.lastIndexOf("/")+1,n[0].src.length),t.download=r),document.createEvent)?(i=document.createEvent("MouseEvents"),i.initEvent("click",!0,!0),t.dispatchEvent(i),!0):(n[0].src.indexOf("?")===-1&&(n[0].src+="?download"),isIE()?saveImageAs(n[0].src):window.open(n[0].src,"_self"),!0)}function saveImageAs(n){typeof n=="object"&&(n=n.src);window.win=open(n);setTimeout('win.document.execCommand("SaveAs")',100)}function isIE(){var n=window.navigator.userAgent,t=n.indexOf("MSIE ");return t>0||!!navigator.userAgent.match(/Trident.*rv\:11\./)?!0:!1}var isInitialized,isSwipe,slideIndex,reveal;$(function(){if(navigator.userAgent.match(/Trident.*rv[ :]*11\./)&&$("body").addClass("isIE11"),$(".pageMetaData").children().length<=0&&$(".pageMetaData").hide(),$(".adjustWidth").length>0){var n=$(".adjustWidth"),i=$(n).prev(),t=$(n).width()+50;$(i).css({"padding-right":t,float:"left",width:"100%"});$(n).css({"margin-left":-t-2,float:"left",width:t})}});$(function(){$(".showAllLinks").click(function(){return $(this).parent().siblings(".pageModuleLinkList").children(".hiddenLinkItem").each(function(){$(this).removeClass("hiddenLinkItem")}),$(this).parent().hide(),!1});$(".listAll-simple").click(function(){var n=$(this).data("guid");return $(".pageModuleLinkList[data-guid='"+n+"'] .pageModuleLinkListItem").each(function(){$(this).removeClass("hidden")}),$(this).parent().addClass("hidden"),!1});$(".defaultTable").wrap("<div>");$(".defaultTable").parent().addClass("mobilescroll")});$(function(){function i(){return/iPad|iPhone|iPod/.test(navigator.platform)}if(i()&&$("#modal").length===0){var n,t=navigator.userAgent.match(/Windows Phone/i);$(document).on("touchstart",function(){n=!1;$("body").removeClass("hover-ios")});$(document).on("touchmove",function(){n=!0;$(".defaultTable").length!==0||$(".mobilescroll").length!==0||t||$("body").addClass("hover-ios")});$(document).on("touchend touchcancel",function(){n||$("body").removeClass("hover-ios")});"createTouch"in document&&($(".defaultTable").length!==0||$(".mobilescroll").length!==0||t||$("body").addClass("hover-ios"))}});isInitialized=!1;$(window).load(function(){isInitialized||(initializeStartPage(),isInitialized=!0)});$(document).ready(function(){isInitialized||(initializeStartPage(),isInitialized=!0)});$(window).on("resize",function(){initRowHeights(!0)});isSwipe=!1;slideIndex=1;$(function(){if($("#modal").length>0){$("#modal").appendTo("body");isIE()&&($("#download-image .modal-action__item--text").hide(),$("#download-image .modal-action__item--textIE").show());ViewHelpers.isMobile()&&$(".gallery_navigation_modal").each(function(){$(".modal-content").append(this)});$("#download-image").on("click",function(){downloadImage()});$("#modal").on("keyup",function(n){n.keyCode===27&&closeModal()});showSlidesInit(slideIndex);showSlides(slideIndex);$(".slideshow_item").swipe({swipe:function(n,t){isSwipe=!1;t=="left"&&(isSwipe=!0,plusSlidesInit(1));t=="right"&&(isSwipe=!0,plusSlidesInit(-1))},triggerOnTouchEnd:!0,threshold:50,fingers:"all"});$(".modal_slider").swipe({swipe:function(n,t){t=="left"&&plusSlides(1);t=="right"&&plusSlides(-1)},triggerOnTouchEnd:!0,threshold:50,fingers:"all"})}});reveal=function(n){var t=$(n);t[0].src=t.data("src")}