window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isSafari=!1;if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){window.isSafari=!0}
window.isSafariVersion='';if(window.isSafari){var version=(navigator.appVersion).match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/);if(version!==null){window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
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 t461_setLogoPadding(recid){if(window.innerWidth>980){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t461'):null;var logo=menu?menu.querySelector('.t461__logowrapper'):null;var leftSide=menu?menu.querySelector('.t461__leftwrapper'):null;var rightSide=menu?menu.querySelector('.t461__rightwrapper'):null;var logoWidth=logo?logo.clientWidth:0;if(leftSide)leftSide.style.paddingRight=((logoWidth/2)+50)+'px';if(rightSide)rightSide.style.paddingLeft=((logoWidth/2)+50)+'px'}}
function t121_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t121');var videoLazy=rec.querySelector('.t-video-lazyload');if(videoLazy){t_onFuncLoad('t_video_lazyload__setHeight',function(){var videoHeight=videoLazy.getAttribute('data-videolazy-height');if(videoHeight!=='540px')return;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)})})}
var videoCarrier=rec.querySelector('.t-video-carier');if(!videoCarrier)return;var screenMin=rec.getAttribute('data-screenmin');var screenMax=rec.getAttribute('data-screenmax');var isLoad=!1;if(window.innerWidth<parseInt(screenMin,10)||window.innerWidth>parseInt(screenMax,10))return;window.addEventListener('scroll',t_throttle(function(){if(!isLoad){var videoCarrierOffsetTop=videoCarrier.getBoundingClientRect().top+window.pageYOffset;var videoCarrierHeight=parseInt(window.getComputedStyle(videoCarrier).height,10);var windowScrollTop=window.pageYOffset;var windowHeight=window.innerHeight;if(windowScrollTop+windowHeight>videoCarrierOffsetTop-500&&windowScrollTop<videoCarrierOffsetTop+videoCarrierHeight+501){t_onFuncLoad('processYoutubeVideo',function(){processYoutubeVideo(videoCarrier,videoCarrier.style.height)});isLoad=!0}}}));var event=document.createEvent('HTMLEvents');event.initEvent('scroll',!0,!1);window.dispatchEvent(event)}
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 t190_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;rec.addEventListener('click',function(e){if(e.target.closest('.t190__button')){t190_scrollToTop()}})}
function t190_scrollToTop(){var duration=700;var start=(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0);var change=0-start;var currentTime=0;var increment=16;document.body.setAttribute('data-scrollable','true');var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);if(isSafari){t190__animateScrollPolyfill(0)}else{t190__animateScroll()}
function t190__easeInOutCubic(currentTime){if((currentTime/=duration/2)<1){return(change/2)*currentTime*currentTime*currentTime+start}else{return(change/2)*((currentTime-=2)*currentTime*currentTime+2)+start}}
function t190__animateScroll(){currentTime+=increment;window.scrollTo(0,t190__easeInOutCubic(currentTime));if(currentTime<duration){setTimeout(t190__animateScroll,increment)}else{document.body.removeAttribute('data-scrollable')}}}
function t190__animateScrollPolyfill(target){var documentHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var bottomViewportPoint=documentHeight-document.documentElement.clientHeight;if(target>bottomViewportPoint)target=bottomViewportPoint;if(target===window.pageYOffset)return!1;var currentPosition=window.pageYOffset;var step=(target-currentPosition)/30;var difference=window.pageYOffset;var timerID=setInterval(function(){difference+=step;window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if((target-currentPosition<0&&window.pageYOffset<=target)||(target-currentPosition>0&&window.pageYOffset>=target)){clearInterval(timerID);document.body.removeAttribute('data-scrollable')}},10)}
function t393_appearMenu(recId){if(window.innerWidth>980){var recs=document.querySelectorAll('.t393');var scrollTop=window.pageYOffset;var body=document.body;var html=document.documentElement;var documentHeight=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight);for(var i=0;i<recs.length;i++){var rec=recs[i];var appearOffset=rec.getAttribute('data-appearoffset');var hideOffset=rec.getAttribute('data-hideoffset');if(appearOffset){if(appearOffset.indexOf('vh')>-1){appearOffset=Math.floor((window.innerHeight*(parseInt(appearOffset)/100)))}
appearOffset=parseInt(appearOffset,10);if(scrollTop>=appearOffset){if(rec.style.visibility==='hidden'){rec.style.visibility='visible';t393__fadeIn(rec)}}else{rec.style.visibility='hidden'}}
if(hideOffset){if(hideOffset.indexOf('vh')>-1){hideOffset=Math.floor((window.innerHeight*(parseInt(hideOffset)/100)))}
hideOffset=parseInt(hideOffset,10);if(scrollTop+window.innerHeight>=documentHeight-hideOffset){if(rec.style.visibility!=='hidden'){rec.style.visibility='hidden'}}else if(appearOffset){if(scrollTop>=appearOffset){rec.style.visibility='visible'}}else{rec.style.visibility='visible'}}}}}
function t393__fadeIn(el){if(el.style.display==='block')return;var opacity=0;el.style.opacity=opacity;el.style.display='block';var timer=setInterval(function(){el.style.opacity=opacity;opacity+=0.1;if(opacity>=1.0){clearInterval(timer);el.style.display=''}},30)}