window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t712_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t712_fixcontentheight(id){var rec=document.getElementById('rec'+id);if(!rec)return;var cover=rec.querySelector('.t-cover');var filter=rec.querySelector('.t-cover__filter');var carrier=rec.querySelector('.t-cover__carrier');var wrapper=rec.querySelector('.t-cover__wrapper');var container=rec.querySelector('.t-cover__container');var coverHeight=cover?cover.offsetHeight:0;var content=rec.querySelector('div[data-hook-content]');var contentHeight=content?content.offsetHeight:0;if(contentHeight>300&&coverHeight<contentHeight){var youTubeRecommendationsSpace=120;if(contentHeight>1000)youTubeRecommendationsSpace+=100;contentHeight+=youTubeRecommendationsSpace;console.log('auto correct cover height: '+contentHeight);if(cover)cover.style.height=contentHeight+'px';if(filter)filter.style.height=contentHeight+'px';if(carrier)carrier.style.height=contentHeight+'px';if(wrapper)wrapper.style.height=contentHeight+'px';if(container)container.style.height=contentHeight+'px';if(!window.isMobile){setTimeout(function(){var videoBlock=rec.querySelector('.t-cover__carrier');if(videoBlock&&videoBlock.querySelector('iframe')){console.log('correct video from cover_fixcontentheight');window.setWidthAndHeightVideo(videoBlock,contentHeight+'px','youtube')}},2000)}}}
function t230_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t230');var videoLazy=rec.querySelector('.t-video-lazyload');if(videoLazy){t_onFuncLoad('t_video_lazyload__setHeight',function(){t_video_lazyload__setHeight(videoLazy);window.addEventListener('resize',function(){t_video_lazyload__setHeight(videoLazy)});if(!wrapperBlock)return;wrapperBlock.addEventListener('displayChanged',function(){t_video_lazyload__setHeight(videoLazy)})})}}
function t698_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t698_fixcontentheight(recId){var rec=document.getElementById('rec'+recId);var cover=rec.querySelector('.t-cover');var coverFilter=rec.querySelector('.t-cover__filter');var coverCarrier=rec.querySelector('.t-cover__carrier');var coverWrapper=rec.querySelector('.t-cover__wrapper');var coverContainer=rec.querySelector('.t-cover__container');var coverStyle=getComputedStyle(cover,null);var coverPaddingTop=parseInt(coverStyle.paddingTop)||0;var coverPaddingBottom=parseInt(coverStyle.paddingBottom)||0;var coverHeight=cover.clientHeight-(coverPaddingTop+coverPaddingBottom);var hookContent=rec.querySelector('div[data-hook-content]');var hookContentHeight=hookContent.offsetHeight;if(hookContentHeight>300&&coverHeight<hookContentHeight){var newHookContentHeight=hookContentHeight+120;if(newHookContentHeight>1000)newHookContentHeight+=100;console.log('auto correct cover height: '+newHookContentHeight);cover.style.height=newHookContentHeight+'px';if(coverFilter)coverFilter.style.height=newHookContentHeight+'px';if(coverCarrier)coverCarrier.style.height=newHookContentHeight+'px';if(coverWrapper)coverWrapper.style.height=newHookContentHeight+'px';if(coverContainer)coverContainer.style.height=newHookContentHeight+'px';if(window.isMobile===!1){setTimeout(function(){if(coverCarrier.querySelector('iframe')){console.log('correct video from cover_fixcontentheight');setWidthHeightYoutubeVideo(coverCarrier,newHookContentHeight+'px')}},2000)}}}
function t843_init(recId){var rec=document.querySelector('#rec'+recId);if(!rec)return;var container=rec.querySelector('.t843');if(!container)return;t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)});t843_setHeight(recId);window.addEventListener('resize',t_throttle(function(){if(window.noAdaptive&&window.noAdaptive===!0&&window.isMobile)return;t843_setHeight(recId)}));if(typeof jQuery!=='undefined'){$(container).bind('displayChanged',function(){t843_setHeight(recId)})}else{container.addEventListener('displayChanged',function(){t843_setHeight(recId)})}
if(container&&container.classList.contains('t843__previewmode')){setInterval(function(){t843_setHeight(recId)},5000)}}
function t843_setHeight(recId){var rec=document.querySelector('#rec'+recId);if(!rec)return;var container=rec.querySelector('.t843');if(!container)return;var blockImages=rec.querySelectorAll('.t843__blockimg');var isLoaded=!0;for(var i=0;i<blockImages.length;i++){var blockImage=blockImages[i];var width=blockImage.getAttribute('data-image-width');var height=blockImage.getAttribute('data-image-height');var ratio=height/width;var padding=ratio*100;blockImage.style.paddingBottom=padding+'%';if(!blockImage.classList.contains('loaded')){isLoaded=!1}}
if(window.innerWidth>960){var textWraps=rec.querySelectorAll('.t843__textwrapper');var deskImages=rec.querySelectorAll('.t843__desktopimg');for(var i=0;i<textWraps.length;i++){textWraps[i].style.height=deskImages[i].clientHeight+'px'}}
if(!isLoaded){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}}
function t943_init(recId,previewMode){t943_showButton(recId,previewMode);window.addEventListener('scroll',t_throttle(function(){t943_showButton(recId,previewMode)},200))}
function t943_showButton(recId,previewMode){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t943__btn');if(!button)return;var body=document.body;var html=document.documentElement;var windowWidth=window.innerWidth;var windowHeight=screen.height;var scrollHeight=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight);var scrollTop=window.scrollY;var appearOffset=button.getAttribute('data-appearoffset');var hideOffset=button.getAttribute('data-hideoffset');if(previewMode&&appearOffset&&windowWidth<960){if(appearOffset.indexOf('vh')>-1){appearOffset=Math.floor((screen.height*(parseInt(appearOffset)/100)))}
appearOffset=parseInt(appearOffset,10);if(scrollTop>=appearOffset){button.classList.remove('t943__btn_hidden')}else{button.classList.add('t943__btn_hidden')}}
if(previewMode&&hideOffset&&windowWidth<960){if(hideOffset.indexOf('vh')>-1){hideOffset=Math.floor((screen.height*(parseInt(hideOffset)/100)))}
hideOffset=parseInt(hideOffset,10);if(scrollHeight-hideOffset<=windowHeight+scrollTop){button.classList.add('t943__btn_hidden')}else if(!appearOffset&&scrollTop>appearOffset){button.classList.remove('t943__btn_hidden')}}}
function t821_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec?rec.querySelector('.t821'):null;if(!menu)return;var isFixed=menu.style.position==='fixed'||window.getComputedStyle(menu).position==='fixed';var isRedactorMode=menu.classList.contains('t821_redactor-mode');if(!isRedactorMode){menu.classList.remove('t821__beforeready');if(isFixed&&menu.getAttribute('data-bgopacity-two')){t_onFuncLoad('t_menu__changeBgOpacity',function(){t_menu__changeBgOpacity(recid,'.t821');window.addEventListener('scroll',t_throttle(function(){t_menu__changeBgOpacity(recid,'.t821')},200))})}
if(isFixed&&menu.getAttribute('data-appearoffset')){menu.classList.remove('t821__beforeready');t_onFuncLoad('t_menu__showFixedMenu',function(){t_menu__showFixedMenu(recid,'.t821');window.addEventListener('scroll',t_throttle(function(){t_menu__showFixedMenu(recid,'.t821')},200))})}}
t_onFuncLoad('t_menu__setBGcolor',function(){t_menu__setBGcolor(recid,'.t821');window.addEventListener('resize',t_throttle(function(){t_menu__setBGcolor(recid,'.t821')},200))})}
function t142_checkSize(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t142__submit');if(!button)return;var buttonStyle=getComputedStyle(button,null);var buttonPaddingTop=parseInt(buttonStyle.paddingTop)||0;var buttonPaddingBottom=parseInt(buttonStyle.paddingBottom)||0;var buttonHeight=button.clientHeight-(buttonPaddingTop+buttonPaddingBottom)+5;var textHeight=button.scrollHeight;if(buttonHeight<textHeight){button.classList.add('t142__submit-overflowed')}}
function t959__init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t959');if(!container)return;t959__updateLazyLoad(recId);t959_unifyHeights(recId);window.addEventListener('resize',t_throttle(function(){t959_unifyHeights(recId)}));window.addEventListener('load',function(){t959_unifyHeights(recId)});container.addEventListener('displayChanged',t_throttle(function(){t959_unifyHeights(recId)}));t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t959__updateLazyLoad(recId){var allRecords=document.getElementById('allrecords');var container=document.querySelector('#rec'+recId+' .t959__container_mobile-flex');var mode=allRecords.getAttribute('data-tilda-mode');if(container&&mode!=='edit'&&mode!=='preview'&&window.isMobile){if(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){container.addEventListener('touchmove',t_throttle(function(){t_lazyload_update()}))})}}}
function t959_unifyHeights(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var main=rec.querySelector('.t959');if(!main)return;var containers=main.querySelectorAll('.t959__container');for(var i=0;i<containers.length;i++){var container=containers[i];var cardsContent=container.querySelectorAll('.t959__card-content');var cards=container.querySelectorAll('.t959__card-inner');if(!cards.length){return}
var cardStyle=getComputedStyle(cards[0],null);var cardPaddingLeft=parseInt(cardStyle.paddingLeft)||0;var cardPaddingRight=parseInt(cardStyle.paddingRight)||0;var cardWidth=cards[0].clientWidth-(cardPaddingLeft+cardPaddingRight);var maxHeight=0;var ratio=container.getAttribute('data-ratio');var minHeightFromRatio=0;switch(ratio){case '16_9':minHeightFromRatio=cardWidth*0.5625;break;case '4_3':minHeightFromRatio=cardWidth*0.75;break;case '3_2':minHeightFromRatio=cardWidth*0.6666;break;case '1_1':minHeightFromRatio=cardWidth;break;case '2_3':minHeightFromRatio=cardWidth*1.5;break;case '3_4':minHeightFromRatio=cardWidth*1.3333;break;case '9_16':minHeightFromRatio=cardWidth*1.7777;break}
for(var j=0;j<cardsContent.length;j++){var cardContent=cardsContent[j];var titleHeight=t959_outerHeight(cardContent.querySelector('.t-card__title'));var descHeight=t959_outerHeight(cardContent.querySelector('.t-card__descr'));var colHeight=titleHeight+descHeight;if(colHeight>maxHeight)maxHeight=colHeight}
if(maxHeight>minHeightFromRatio){for(var j=0;j<cards.length;j++){cards[j].style.paddingBottom=maxHeight+'px'}}else{for(var j=0;j<cards.length;j++){cards[j].style.paddingBottom=null}}}}
function t959_outerHeight(element){if(!element)return 0;var height=element.offsetHeight;var style=getComputedStyle(element);height+=parseInt(style.marginTop)+parseInt(style.marginBottom);return height}
function t1061_initThumbnail(rec){if(!rec)return;var windowWidth=window.innerWidth;var screenMin=rec.getAttribute('data-screen-min');var screenMax=rec.getAttribute('data-screen-max');if(screenMin&&windowWidth<parseInt(screenMin,10))return;if(screenMax&&windowWidth>parseInt(screenMax,10))return;t1061_setThumbnailHeight(rec);t1061_setThumbnail(rec);t1061_setYouTubeIframeHeight(rec);t1061_setHeight(rec)}
function t1061_setThumbnail(rec){var thumbnails=rec.querySelectorAll('.t1061__video-thumbnail');if(!thumbnails.length)return;Array.prototype.forEach.call(thumbnails,function(thumbnail){var blockTop=thumbnail.getBoundingClientRect().top;var windowHeight=document.documentElement.clientHeight;var scrollDiffHeigth=400;if(window.pageYOffset>blockTop-windowHeight-scrollDiffHeigth){var youTubeID=thumbnail.getAttribute('data-youtube-id').trim();thumbnail.style.backgroundImage='url("https://img.youtube.com/vi/'+youTubeID+'/sddefault.jpg")';thumbnail.addEventListener('click',function(event){event.preventDefault();var youTubeWrapper=thumbnail.parentNode;var youTubeIframe='<iframe class="t1061__youtube-iframe" width="100%" height="" src="https://www.youtube.com/embed/'+youTubeID+'?autoplay=1&rel=0" frameborder="0" allow="autoplay" allowfullscreen></iframe>';thumbnail.innerHTML=youTubeIframe;t1061_setYouTubeIframeHeight(rec)})}})}
function t1061_setThumbnailHeight(rec){var thumbnail=rec.querySelectorAll('.t1061__video-thumbnail');if(!thumbnail.length)return;Array.prototype.forEach.call(thumbnail,function(image){var imageWidth=image.offsetWidth;var computedHeight=imageWidth/(16/9);image.style.height=computedHeight+'px'})}
function t1061_setYouTubeIframeHeight(rec){var youTubeIframes=rec.querySelectorAll('iframe');if(!youTubeIframes.length)return;Array.prototype.forEach.call(youTubeIframes,function(youTubeIframe){var iframeParent=youTubeIframe.parentNode;var iframeParentWidth=iframeParent.offsetWidth;var computedHeight=iframeParentWidth/(16/9);youTubeIframe.height=computedHeight})}
function t1061_setHeight(rec){var videoLazy=rec.querySelectorAll('.t-video-lazyload');if(!videoLazy.length)return;Array.prototype.forEach.call(videoLazy,function(video){var videoIframe=video.querySelector('iframe');var videoWidth=parseInt(window.getComputedStyle(video).width,10);var computedHeight=videoWidth/(16/9);video.style.height=computedHeight+'px';if(videoIframe){videoIframe.height=computedHeight}
setTimeout(function(){var videoIframe=video.querySelector('iframe');if(videoIframe){videoIframe.height=computedHeight}},300)})}
function t490_init(recId){t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t527_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t527');if(!container)return;var images=rec.querySelectorAll('.t527__bgimg');if(!images[0])return;var imageWidth=images[0].getAttribute('data-image-width');var imageHeight=images[0].getAttribute('data-image-height');var imageRatio=imageHeight/imageWidth;var imagePadding=imageRatio*100;for(var i=0;i<images.length;i++){images[i].style.paddingBottom=imagePadding+'%'}}
function t670_init(recid,isEditMode){var rec=document.getElementById('rec'+recid);if(!rec)return;var image=rec.querySelector('.t-img');var init=function(){t670_imageHeight(recid);t670_show(recid);t670_hide(recid);t_onFuncLoad('t_sldsInit',function(){t_sldsInit(recid)});if(isEditMode){t_onFuncLoad('t_slds_UpdateSliderHeight',function(){t_slds_UpdateSliderHeight(recid)});t_onFuncLoad('t_slds_UpdateSliderArrowsHeight',function(){t_slds_UpdateSliderArrowsHeight(recid)})}
var wrapper=rec.querySelector('.t670');if(wrapper){wrapper.addEventListener('displayChanged',function(){t_onFuncLoad('t_slds_updateSlider',function(){t_slds_updateSlider(recid)});t_onFuncLoad('t_slds_positionArrows',function(){t_slds_positionArrows(recid)})})}}
if(image){if(image.complete){init()}else{image.addEventListener('load',init);image.addEventListener('error',init)}}else{init()}}
function t670_show(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var playBtns=rec.querySelectorAll('.t670__play');Array.prototype.forEach.call(playBtns,function(play){play.addEventListener('click',function(){var videoType=play.getAttribute('data-slider-video-type');var url;var nextEl;var prevEl;var iframe;var video;var source;switch(videoType){case 'youtube':url=play.getAttribute('data-slider-video-url');nextEl=play.nextElementSibling;prevEl=play.previousElementSibling.previousElementSibling;if(nextEl){iframe=document.createElement('iframe');iframe.classList.add('t670__iframe');iframe.width='100%';iframe.height='100%';iframe.src='https://www.youtube.com/embed/'+url+'?autoplay=1&enablejsapi=1';iframe.frameBorder='0';iframe.setAttribute('webkitallowfullscreen','');iframe.setAttribute('mozallowfullscreen','');iframe.setAttribute('allowfullscreen','');iframe.setAttribute('allow','autoplay');nextEl.innerHTML='';nextEl.insertAdjacentElement('beforeend',iframe)}
if(prevEl&&prevEl.classList.contains('t-bgimg'))prevEl.style.opacity='0';break;case 'vimeo':url=play.getAttribute('data-slider-video-url');nextEl=play.nextElementSibling;prevEl=play.previousElementSibling.previousElementSibling;var idMatch=/vimeo[^/]*\/(\d+)\/?(\w*)\/?/i.exec(url);var id=idMatch?idMatch[1]:null;var hash=idMatch?'?h='+idMatch[2]:null;if(nextEl){iframe=document.createElement('iframe');iframe.classList.add('t670__iframe');iframe.width='100%';iframe.height='100%';iframe.src='https://player.vimeo.com/video/'+id+hash+'&amp;api=1';iframe.frameBorder='0';iframe.setAttribute('allowfullscreen','');iframe.setAttribute('allow','autoplay; fullscreen');nextEl.innerHTML='';nextEl.insertAdjacentElement('beforeend',iframe)}
if(prevEl&&prevEl.classList.contains('t-bgimg'))prevEl.style.opacity='0';break;case 'mp4':url=play.getAttribute('data-slider-video-url');nextEl=play.nextElementSibling;prevEl=play.previousElementSibling.previousElementSibling;if(nextEl){video=document.createElement('video');source=document.createElement('source');video.insertAdjacentElement('beforeend',source);video.classList.add('t670__video');video.controls=!0;source.src=url;nextEl.innerHTML='';nextEl.insertAdjacentElement('beforeend',video);video=nextEl.querySelector('video');if(video)video.play()}
if(prevEl&&prevEl.classList.contains('t-bgimg'))prevEl.style.opacity='0';break}
if(nextEl)nextEl.style.zIndex='3'})})}
function t670_hide(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var elBody=rec.querySelector('.t670__frame');rec.addEventListener('updateSlider',function(){if(elBody)elBody.innerHTML='';if(elBody)elBody.style.zIndex=''})}
function t670_imageHeight(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var images=rec.querySelectorAll('.t670__separator');Array.prototype.forEach.call(images,function(img){var width=img.getAttribute('data-slider-image-width')||0;var height=img.getAttribute('data-slider-image-height')||0;var ratio=height/width;var padding=ratio*100;img.style.paddingBottom=padding+'%'})}