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 t446_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var linkItems=rec.querySelectorAll('.t-menu__link-item');var subMenuLinks=rec.querySelectorAll('.t-menusub__link-item');var menu=rec.querySelector('.t446');Array.prototype.forEach.call(linkItems,function(link){link.addEventListener('click',function(){if(link.classList.contains('t-menusub__target-link')||link.classList.contains('tooltipstered')||link.classList.contains('t794__tm-link')||link.classList.contains('t966__tm-link')||link.classList.contains('t978__tm-link'))return;t446_hideMenuOnMobile(link,rec)})});Array.prototype.forEach.call(subMenuLinks,function(subMenuLink){subMenuLink.addEventListener('click',function(){t446_hideMenuOnMobile(subMenuLink,rec)})})}
function t446_setLogoPadding(recid){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<=980)return;var menu=rec.querySelector('.t446');var logo=menu?menu.querySelector('.t446__logowrapper'):null;var logoWidth=logo?logo.offsetWidth:0;var leftWrapper=menu?menu.querySelector('.t446__leftwrapper'):null;var rightWrapper=menu?menu.querySelector('.t446__rightwrapper'):null;if(leftWrapper)leftWrapper.style.paddingRight=((logoWidth/2)+50)+'px';if(rightWrapper)rightWrapper.style.paddingLeft=((logoWidth/2)+50)+'px'}
function t446_checkOverflow(recid,menuheight){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t446'):null;if(!menu)return;var rightWrapper=menu.querySelector('.t446__rightwrapper');var rightMenuWrap=rightWrapper?rightWrapper.querySelector('.t446__rightmenuwrapper'):null;var additionalWrap=rightWrapper?rightWrapper.querySelector('.t446__additionalwrapper'):null;var burgerWrapOverflow=rightWrapper?rightWrapper.querySelector('.t446__burgerwrapper_overflow'):null;var burgerWrap=rightWrapper?rightWrapper.querySelector('.t446__burgerwrapper_withoutoverflow'):null;var rightWrapperWidth=t446_getPureWidth(rightWrapper);var rightMenuWrapWidth=rightMenuWrap?rightMenuWrap.offsetWidth:0;var additionalWrapWidth=additionalWrap?additionalWrap.offsetWidth:0;var additionalWrapFloating=additionalWrap?additionalWrap.style.float||window.getComputedStyle(additionalWrap).float:'';var blockHeight=menuheight>0?menuheight:80;if(window.innerWidth>980&&rightMenuWrapWidth+additionalWrapWidth>rightWrapperWidth){menu.style.height=(blockHeight*2)+'px';if(additionalWrap)additionalWrap.style.float='right';if(burgerWrapOverflow)burgerWrapOverflow.style.display='table-cell';if(burgerWrap)burgerWrap.style.display='none'}else{if(menu.offsetHeight>blockHeight)menu.style.height=blockHeight+'px';if(additionalWrap&&additionalWrapFloating==='right')additionalWrap.style.float='none';if(burgerWrapOverflow)burgerWrapOverflow.style.display='none';if(burgerWrap)burgerWrap.style.display='table-cell'}}
function t446_getPureWidth(el){if(!el)return 0;var elWidth=el.offsetWidth;var elPaddingLeft=parseInt(window.getComputedStyle(el).paddingLeft,10)||0;var elPaddingRight=parseInt(window.getComputedStyle(el).paddingRight,10)||0;var width=elWidth-(elPaddingLeft+elPaddingRight);return width>0?width:0}
function t446_createMobileMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;t_onFuncLoad('t_menu__createMobileMenu',function(){t_menu__createMobileMenu(recid,'.t446')});var linkItems=rec.querySelectorAll('.t-menu__link-item');var submenuClassList=['t978__menu-link_hook','t978__tm-link','t966__tm-link','t794__tm-link','t-menusub__target-link'];Array.prototype.forEach.call(linkItems,function(link){link.addEventListener('click',function(){var isSubmenuHook=submenuClassList.some(function(submenuClass){return link.classList.contains(submenuClass)});if(isSubmenuHook)return;t446_hideMenuOnMobile(link,rec)})});var wrappersLinks=rec.querySelectorAll('.t446__logowrapper2 a, .t446__right_buttons_wrap a');Array.prototype.forEach.call(wrappersLinks,function(link){link.addEventListener('click',function(){t446_hideMenuOnMobile(link,rec)})})}
function t446_hideMenuOnMobile(link,rec){if(!rec||!link||window.innerWidth>=980)return!1;var url=link.href?link.href.trim():'';var menu=rec.querySelector('.t446');var burger=rec.querySelector('.tmenu-mobile');if(url&&link.matches('[href*="#"]')){if(burger)burger.classList.remove('tmenu-mobile_opened');if(menu){if(menu.classList.contains('t446__positionabsolute')||(burger&&!burger.classList.contains('.tmenu-mobile_positionfixed'))){menu.style.display='none';menu.style.opacity='0'}else{t_onFuncLoad('t_menu__FadeOut',function(){t_menu__FadeOut(menu,300)})}}}}
function t975_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var tildaCopy=document.getElementById('tildacopy');var menu=rec.querySelector('.t975');t_onFuncLoad('t_menu__highlightActiveLinks',function(){t_menu__highlightActiveLinks('.t975__list-item a')});if(menu)menu.classList.remove('t975__beforeready');t975_checkAnchorLinks(recid,'.t975__list-item a');var isIphone=t975_detectIphone();var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(menu&&menu.getAttribute('data-hidemenuonscroll')||isIphone){t975_handleScroll(menu,tildaCopy)}
if(tildaCopy&&scrollHeight>document.documentElement.clientHeight){t975_addCopyrightMargin(menu,tildaCopy);t975_handleScroll(menu,tildaCopy)}
window.addEventListener('resize',function(){t975_changeCopyrightMargin(menu,tildaCopy)})}
function t975_addCopyrightMargin(menu,tildaCopy){if(!tildaCopy||!menu)return;var paddingElement=document.createElement('div');paddingElement.style.backgroundColor='#000';paddingElement.style.height=menu.offsetHeight+'px';paddingElement.classList.add('t-tildalabel-padding');document.body.appendChild(paddingElement)}
function t975_changeCopyrightMargin(menu,tildaCopy){var paddingElement=document.querySelector('.t-tildalabel-padding');if(!paddingElement||!tildaCopy||!menu)return;paddingElement.style.height=menu.offsetHeight+'px'}
function t975_detectIphone(){var isIphone=/iPhone/.test(navigator.userAgent)&&!window.MSStream;var aspect=window.screen.width/window.screen.height;var iphoneAspect='0.462';if(isIphone&&aspect.toFixed(3)===iphoneAspect){return!0}}
function t975_checkAnchorLinks(recid,selector){var rec=document.getElementById('rec'+recid);var anchorSelector=selector+'[href*="#"]:not(.tooltipstered)';var navLinks=rec?rec.querySelectorAll(anchorSelector):[];if(navLinks.length){t_onFuncLoad('t_menu__updateActiveLinks',function(){t_menu__updateActiveLinks(navLinks,selector)})}}
function t975_handleScroll(menu){var lastScrollTop=0;var delta=5;var timerID;var diff;window.addEventListener('scroll',function(){var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var isClicked=menu?menu.getAttribute('data-clicked-link'):'';var currentScrollTop=window.pageYOffset;if(Math.abs(lastScrollTop-currentScrollTop)<=delta||window.pageYOffset<0||window.pageYOffset>scrollHeight-window.innerHeight){return}
if(menu&&menu.getAttribute('data-hidemenuonscroll')&&!isClicked){var menuHeight=menu.offsetHeight;var currentTransformValue=menu.style.transform;if(currentScrollTop>lastScrollTop&&window.pageYOffset<=scrollHeight-(window.innerHeight+menuHeight)){diff=0;if(currentTransformValue){diff=parseInt(currentTransformValue.replace('translateY(',''),10)}
clearInterval(timerID);timerID=setInterval(function(){menu.style.transform='translateY('+diff+'px)';diff+=menuHeight/50;if(diff>=menuHeight){menu.style.transform='translateY('+menuHeight+'px)';clearInterval(timerID)}})}else{diff=menuHeight;if(currentTransformValue){diff=parseInt(currentTransformValue.replace('translateY(',''),10)}
clearInterval(timerID);timerID=setInterval(function(){menu.style.transform='translateY('+diff+'px)';diff-=menuHeight/50;if(diff<=0){menu.style.transform='translateY(0px)';clearInterval(timerID)}})}}
lastScrollTop=currentScrollTop})}
function t678_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}