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 t770_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec.querySelector('.t770');var burger=rec.querySelector('.t-menuburger');var logo=menu?menu.querySelector('.t770__imglogo'):null;var menuPosition=menu?menu.style.position||window.getComputedStyle(menu).position:'';var isEditMode=menu?menu.classList.contains('t770_redactor-mode'):!1;if(!isEditMode){t_onFuncLoad('t_menu__highlightActiveLinks',function(){t_menu__highlightActiveLinks('.t770__list_item a')});if(menu)menu.classList.remove('t770__beforeready');if(menu&&menuPosition==='fixed'){t_onFuncLoad('t_menu__findAnchorLinks',function(){t_menu__findAnchorLinks(recid,'.t770__desktoplist .t770__list_item a')});if(menu.getAttribute('data-bgopacity-two')){t_onFuncLoad('t_menu__changeBgOpacity',function(){t_menu__changeBgOpacity(recid,'.t770');window.addEventListener('scroll',t_throttle(function(){t_menu__changeBgOpacity(recid,'.t770')},200))})}
if(menu.getAttribute('data-appearoffset')){menu.classList.remove('t770__beforeready');t_onFuncLoad('t_menu__showFixedMenu',function(){t_menu__showFixedMenu(recid,'.t770');window.addEventListener('scroll',t_throttle(function(){t_menu__showFixedMenu(recid,'.t770')},200))})}}}
if(logo&&logo.getAttribute('data-img-width')){t770_setLogoPadding(recid)}
if(burger){t_onFuncLoad('t_menu__createMobileMenu',function(){t_menu__createMobileMenu(recid,'.t770')})}
t_onFuncLoad('t_menu__setBGcolor',function(){t_menu__setBGcolor(recid,'.t770');window.addEventListener('resize',t_throttle(function(){t_menu__setBGcolor(recid,'.t770')},200))})}
function t770_setLogoPadding(recid){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<=980)return;var menu=rec.querySelector('.t770');var logo=menu?menu.querySelector('.t770__logowrapper'):null;var leftSide=menu?menu.querySelector('.t770__leftwrapper'):null;var rightSide=menu?menu.querySelector('.t770__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 t966_init(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t966'):null;var hook=menu?menu.getAttribute('data-tooltip-hook'):'';if(!hook)return;var hookLinks=document.querySelectorAll('a[href="'+hook+'"]');hookLinks=Array.prototype.filter.call(hookLinks,function(hookLink){var isSubmenuAllowed=hookLink.getAttribute('data-submenu-disallowed')!=='yes';if(isSubmenuAllowed){hookLink.classList.add('t966__tm-link');hookLink.setAttribute('data-tooltip-menu-id',recid);return!0}
return!1});var parentMenu=hookLinks.length?hookLinks[0].closest('[data-menu]'):null;var tooltipMenu=rec.querySelector('.t966__tooltip-menu');var isParentFixed=parentMenu&&window.getComputedStyle(parentMenu).position==='fixed';if(tooltipMenu)tooltipMenu.setAttribute('data-pos-fixed',isParentFixed?'yes':'no');t966_addArrow(recid,hookLinks);t966_setUpMenu(recid,hookLinks);t_onFuncLoad('t_submenublocks__highlightActiveLinks',function(){t_submenublocks__highlightActiveLinks('.t966__menu-link')});var isT804Exist=!!document.querySelector('.t804');if(isT804Exist){document.addEventListener('replacingCompleted',function(){t966_init(recid)})}
if(menu.hasAttribute('data-full-submenu-mob')&&(window.isMobile||'ontouchend' in document)){t_onFuncLoad('t_submenublocks__setFullScreenMenu',function(){t_submenublocks__setFullScreenMenu(menu)})}}
function t966_divideMenu(recid,rows){var rec=document.getElementById('rec'+recid);if(!rec)return;if(!rows)rows=1;var menu=rec.querySelector('.t966');if(menu&&menu.getAttribute('data-sort-mobile')==='yes'&&window.innerWidth<980)return;var items=rec.querySelectorAll('.t966__menu-item-wrapper');var list=rec.querySelector('.t966__menu-list');var maxItemsCountInRow=Math.ceil(items.length/rows);var rowClass='t966__menu-list-row_'+(100/rows).toFixed();for(var i=0;i<maxItemsCountInRow;i++){var row=document.createElement('div');row.classList.add('t966__menu-list-row');row.classList.add(rowClass);if(list)list.appendChild(row)}
var listRows=list?list.querySelectorAll('.t966__menu-list-row'):[];Array.prototype.forEach.call(items,function(item,i){if(listRows[i%maxItemsCountInRow])listRows[i%maxItemsCountInRow].appendChild(item)});var allRec=document.getElementById('allrecords');var currentMode=allRec?allRec.getAttribute('data-tilda-mode'):'';if(currentMode==='edit'){var tooltipItems=document.querySelectorAll('.t966__tooltip-menu');Array.prototype.forEach.call(tooltipItems,function(item){item.style.display='block'})}}
function t966_addArrow(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenuBlock=rec?rec.querySelector('.t966'):null;var isArrowAppend=submenuBlock.getAttribute('data-add-arrow');if(!isArrowAppend)return;hookLinks=Array.prototype.slice.call(hookLinks);hookLinks.forEach(function(hookLink){if(hookLink.querySelector('.t966__arrow'))return;var arrow=document.createElement('div');arrow.classList.add('t966__arrow');hookLink.appendChild(arrow);var isInsideZero=hookLink.closest('.tn-atom');var hasCustomBorderColor=window.getComputedStyle(hookLink).borderColor!=='rgba(0, 0, 0, 0)';if(isInsideZero&&!hasCustomBorderColor){hookLink.style.borderColor='initial';hookLink.style.border='none'}})}
function t966_setUpMenu(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenu=rec?rec.querySelector('.t966__tooltip-menu'):null;if(!submenu)return;var content=submenu.querySelector('.t966__content');var menu=rec.querySelector('.t966');var verticalIndent=menu?menu.getAttribute('data-tooltip-margin'):'';var hooksAndSubmenu=hookLinks.concat(submenu);var timer;if(window.innerWidth>980&&!('ontouchend' in document)){t_onFuncLoad('t_submenublocks__addEventsDesktop',function(){t_submenublocks__addEventsDesktop(submenu,hooksAndSubmenu,verticalIndent,'.t966')})}else{t_onFuncLoad('t_submenublocks__addEventsMobile',function(){t_submenublocks__addEventsMobile(submenu,hookLinks,verticalIndent,'.t966')})}
document.addEventListener('click',function(e){if(submenu.getAttribute('data-mobiletooltip')!=='yes')return;if(!e.target.closest('.t966__tooltip-menu')&&!e.target.classList.contains('t966__tm-link')&&!e.target.closest('.t966__tm-link')){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t966')})}});window.addEventListener('scroll',t_throttle(function(){if(content){content.addEventListener('mouseleave',function(){var activeEl=hookLinks.filter(function(el){return el.classList.contains('t966__tm-link_active')});var afterActiveEl=activeEl.length?activeEl[0].nextElementSibling:null;if(submenu.classList.contains('t966__tooltip-menu_show')||(afterActiveEl&&afterActiveEl.classList.contains('t966__tooltip-menu_mobile'))){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(afterActiveEl,'.t966')})}})}},300));window.addEventListener('resize',t_throttle(function(){if(window.isMobile||window.innerWidth<980)return;var mobileMenu=document.querySelector('.t966__tooltip-menu_mobile');t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(mobileMenu,'.t966')})},300));var submenuLinks=submenu.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t966',link)});var clickedInTooltipMenuEls=document.querySelectorAll('.t450, .t199__mmenu, .t280, .t282, .t204__burger, .t451, .t466');Array.prototype.forEach.call(clickedInTooltipMenuEls,function(el){var event=document.createEvent('Event');event.initEvent('clickedAnchorInTooltipMenu',!0,!0);el.dispatchEvent(event)});Array.prototype.forEach.call(submenuLinks,function(otherLink){var linkTitle=otherLink.querySelector('.t966__menu-item-title');if(otherLink!==link){if(linkTitle)linkTitle.classList.remove('t-active')}else{if(linkTitle)linkTitle.classList.add('t-active')}})})})}
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 t889_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t889');if(!container)return;t889_setHeight(recId);window.addEventListener('resize',t_throttle(function(){if(window.noAdaptive&&window.noAdaptive===!0&&window.isMobile)return;t889_setHeight(recId)}));if(typeof jQuery!=='undefined'){$(container).on('displayChanged',function(){t889_setHeight(recId)})}else{container.addEventListener('displayChanged',function(){t889_setHeight(recId)})}
if(window.isMobile){window.addEventListener('orientationchange',function(){t889_setHeight(recId)})}}
function t889_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t889');if(!container)return;var wrapper=rec.querySelector('.t889__wrapper');var wrapperWidth=wrapper.offsetWidth;var imageWrap=rec.querySelector('.t889__blockimg');var image=imageWrap.querySelector('img');var content=rec.querySelector('.t889__content');var textWrapperHeight=t889_outerHeight(content);var newImage=new Image();var imageSrc=image.getAttribute('data-original')||image.getAttribute('src');newImage.src=imageSrc;newImage.addEventListener('load',function(){if(window.innerWidth>960){var imageStyle=getComputedStyle(imageWrap,null);var imagePaddingTop=parseInt(imageStyle.paddingTop)||0;var imagePaddingBottom=parseInt(imageStyle.paddingBottom)||0;var imageNaturalHeight=image.clientHeight;if(!imageNaturalHeight&&image.src){var ratio=wrapperWidth/newImage.naturalWidth;imageNaturalHeight=newImage.naturalHeight*ratio}
var imageHeight=imageNaturalHeight-(imagePaddingTop+imagePaddingBottom);if(textWrapperHeight>=imageHeight){wrapper.style.height=textWrapperHeight+'px'}else{wrapper.style.height=imageHeight+'px'}}else{wrapper.style.height=null}})}
function t889_outerHeight(element){if(!element)return;var height=element.offsetHeight;var style=getComputedStyle(element);height+=parseInt(style.marginTop)+parseInt(style.marginBottom);return height}