window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isiOS=!1;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){window.isiOS=!0}
window.isiOSVersion='';if(window.isiOS){var version=(navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/);if(version!==null){window.isiOSVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
window.isiOSChrome=navigator.userAgent.match('CriOS')?!0:!1;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 t331_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return!1;rec.setAttribute('data-animationappear','off');rec.style.opacity='1';var currentBlock=rec.querySelector('.t-popup');var currentHook=currentBlock?currentBlock.getAttribute('data-tooltip-hook'):'';var currentAnalitics=currentBlock?currentBlock.getAttribute('data-track-popup'):'';if(!currentHook)return!1;t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(currentHook)});document.addEventListener('click',function(e){var href=e.target.closest('a[href="'+currentHook+'"]');if(href){e.preventDefault();t331_showPopup(recId);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recId)});if(currentAnalitics){var virtTitle=currentHook;if(virtTitle.substring(0,7)==='#popup:')virtTitle=virtTitle.substring(7);Tilda.sendEventToStatistics(currentAnalitics,virtTitle)}}});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,currentHook)})}
function t331_showPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return!1;var popup=rec.querySelector('.t-popup');var video=rec.querySelector('.t-video-lazyload');var videoIframe=video.querySelector('iframe');if(!videoIframe){t_onFuncLoad('t_video_lazyload__addVideo',function(){t_video_lazyload__addVideo(video)})}
if(popup)popup.style.display='block';t331_setHeight(recid);setTimeout(function(){var popupContainer=popup?popup.querySelector('.t-popup__container'):null;if(popupContainer)popupContainer.classList.add('t-popup__container-animated');if(popup)popup.classList.add('t-popup_show');popup.focus();t_onFuncLoad('t_popup__trapFocus',function(){t_popup__trapFocus(popup)})},50);if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed');document.body.classList.add('t331__body_popupshowed');if(popup){popup.addEventListener('click',function(e){if(e.target===popup)t331_popup_close(recid)})}
var popupClose=popup?popup.querySelector('.t-popup__close'):null;if(popupClose){popupClose.addEventListener('click',function(){t331_popup_close(recid)})}
document.addEventListener('keydown',function(e){if(e.keyCode===27)t331_popup_close(recid)})}
function t331_popup_close(recid){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed');document.body.classList.remove('t331__body_popupshowed');var rec=document.getElementById('rec'+recid);if(!rec)return!1;var popup=rec.querySelector('.t-popup');if(popup)popup.classList.remove('t-popup_show');t_onFuncLoad('t_popup__addFocusOnTriggerButton',function(){t_popup__addFocusOnTriggerButton()});setTimeout(function(){var video=rec.querySelector('.t-video-lazyload');if(video){t_onFuncLoad('t_video_lazyload__removeVideo',function(){t_video_lazyload__removeVideo(video)})}
if(popup&&!popup.classList.contains('t-popup_show')){popup.style.display='none'}},300)}
function t331_setHeight(recid){var rec=document.getElementById('rec'+recid);if(!rec)return!1;var videoWrap=rec.querySelector('.t331__wrap-video');var videoLazy=rec.querySelector('.t-video-lazyload');var dataVideoWidth=videoWrap.getAttribute('data-video-width');var dataVideoHeight=videoWrap.getAttribute('data-video-height');var calculatedHeight=videoLazy.offsetWidth*0.5625;if(dataVideoHeight){if(dataVideoHeight.indexOf('vh')!==-1){dataVideoHeight=parseInt(dataVideoHeight,10)*window.innerHeight/100;var ratio=dataVideoHeight/(parseInt(dataVideoWidth,10)||1);var videoCurrentWidth=videoLazy.offsetWidth;calculatedHeight=videoCurrentWidth*ratio}else{calculatedHeight=parseInt(dataVideoHeight,10)}}
videoWrap.style.height=calculatedHeight+'px';videoLazy.style.height=calculatedHeight+'px'}
function t331_sendPopupEventToStatistics(popupname){var virtPage='/tilda/popup/';var virtTitle='Popup: ';if(popupname.substring(0,7)==='#popup:'){popupname=popupname.substring(7)}
virtPage+=popupname;virtTitle+=popupname;if(ga){if(window.mainTracker!=='tilda'){ga('send',{'hitType':'pageview','page':virtPage,'title':virtTitle})}}
if(window.mainMetrika>''&&window[window.mainMetrika]){window[window.mainMetrika].hit(virtPage,{title:virtTitle,referer:window.location.href})}}
function t450_showMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec.querySelector('.t450');var overlay=rec.querySelector('.t450__overlay');var menuElements=rec.querySelectorAll('.t450__overlay, .t450__close, a[href*="#"]');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t450__body_menushowed');if(menu)menu.classList.add('t450__menu_show');if(overlay)overlay.classList.add('t450__menu_show');if(menu){menu.addEventListener('clickedAnchorInTooltipMenu',function(){t450_closeMenu(menu,overlay)})}
Array.prototype.forEach.call(menuElements,function(element){element.addEventListener('click',function(){if(element.closest('.tooltipstered, .t-menusub__target-link, .t794__tm-link, .t966__tm-link, .t978__tm-link'))return;if(element.href&&(element.href.substring(0,7)==='#price:'||element.href.substring(0,9)==='#submenu:'))return;t450_closeMenu(menu,overlay)})});document.addEventListener('keydown',function(e){if(e.keyCode===27){document.body.classList.remove('t390__body_popupshowed');var popups=document.querySelectorAll('.t390');Array.prototype.forEach.call(popups,function(popup){popup.classList.remove('t390__popup_show')})}});rec.addEventListener('click',function(e){if(e.target.closest('.t966__tm-link, .t978__tm-link')){t450_checkSize(recid);if(e.target.closest('.t978__tm-link')){setTimeout(function(){var hookLink=e.target.closest('.t978__tm-link');var menuBlock=hookLink.nextElementSibling;var submenuLinks=menuBlock?menuBlock.querySelectorAll('.t978__menu-link'):[];Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){t450_checkSize(recid)})})},300)}}});menu.addEventListener('menuOverflow',function(){t450_checkSize(recid)});t450_highlight(recid)}
function t450_closeMenu(menu,overlay){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t450__body_menushowed');if(menu)menu.classList.remove('t450__menu_show');if(overlay)overlay.classList.remove('t450__menu_show')}
function t450_checkSize(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t450'):null;if(!menu)return;var container=menu.querySelector('.t450__container');var topContainer=menu.querySelector('.t450__top');var rightContainer=menu.querySelector('.t450__rightside');setTimeout(function(){var topContainerHeight=topContainer?topContainer.offsetHeight:0;var rightContainerHeight=rightContainer?rightContainer.offsetHeight:0;var containerPaddingTop=container?window.getComputedStyle(container).paddingTop:'0';var containerPaddingBottom=container?window.getComputedStyle(container).paddingBottom:'0';containerPaddingTop=parseInt(containerPaddingTop,10);containerPaddingBottom=parseInt(containerPaddingBottom,10);if(topContainerHeight+rightContainerHeight+containerPaddingTop+containerPaddingBottom>document.documentElement.clientHeight){menu.classList.add('t450__overflowed')}else{menu.classList.remove('t450__overflowed')}})}
function t450_appearMenu(recid){var rec=document.getElementById('rec'+recid);var burger=rec?rec.querySelector('.t450__menu__content'):null;if(!burger)return;var burgerAppearOffset=burger?burger.getAttribute('data-appearoffset'):'';var burgerHideOffset=burger?burger.getAttribute('data-hideoffset'):'';if(burgerAppearOffset){burgerAppearOffset=t450_appearMenuParseNumber(burgerAppearOffset);if(window.pageYOffset>=burgerAppearOffset){if(burger.classList.contains('t450__beforeready')){burger.classList.remove('t450__beforeready')}}else{burger.classList.add('t450__beforeready')}}
if(burgerHideOffset){burgerHideOffset=t450_appearMenuParseNumber(burgerHideOffset);var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(window.pageYOffset+window.innerHeight>=scrollHeight-burgerHideOffset){if(!burger.classList.contains('t450__beforeready')){burger.classList.add('t450__beforeready')}}else if(burgerAppearOffset){if(window.pageYOffset>=burgerAppearOffset){burger.classList.remove('t450__beforeready')}}else{burger.classList.remove('t450__beforeready')}}}
function t450_appearMenuParseNumber(string){if(string.indexOf('vh')>-1){string=Math.floor((window.innerHeight*(parseInt(string)/100)))}
return parseInt(string,10)}
function t450_initMenu(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t450'):null;var overlay=rec?rec.querySelector('.t450__overlay'):null;var burger=rec?rec.querySelector('.t450__burger_container'):null;var menuLinks=rec?rec.querySelectorAll('.t-menu__link-item.t450__link-item_submenu'):[];var hook=menu?menu.getAttribute('data-tooltip-hook'):'';if(hook){document.addEventListener('click',function(e){if(e.target.closest('a[href="'+hook+'"]')){e.preventDefault();t450_closeMenu(menu,overlay);t450_showMenu(recid);t450_checkSize(recid)}})}
if(burger){burger.addEventListener('click',function(){t450_closeMenu(menu,overlay);t450_showMenu(recid);t450_checkSize(recid)})}
window.addEventListener('resize',function(){t450_checkSize(recid)});if(!window.isMobile)return;Array.prototype.forEach.call(menuLinks,function(link){link.addEventListener('click',function(){t450_checkSize(recid)})})}
function t450_highlight(recid){var url=window.location.href;var pathname=window.location.pathname;var hash=window.location.hash;if(url.substr(url.length-1)==='/'){url=url.slice(0,-1)}
if(pathname.substr(pathname.length-1)==='/'){pathname=pathname.slice(0,-1)}
if(pathname.charAt(0)==='/'){pathname=pathname.slice(1)}
if(pathname===''){pathname='/'}
var shouldBeActiveElements=document.querySelectorAll('.t450__menu a[href=\''+url+'\'], '+'.t450__menu a[href=\''+url+'/\'], '+'.t450__menu a[href=\''+pathname+'\'], '+'.t450__menu a[href=\'/'+pathname+'\'], '+'.t450__menu a[href=\''+pathname+'/\'], '+'.t450__menu a[href=\'/'+pathname+'/\']'+(hash?', .t450__menu a[href=\''+hash+'\']':''));var rec=document.getElementById('rec'+recid);var menuLinks=rec?rec.querySelectorAll('.t450__menu a'):[];Array.prototype.forEach.call(menuLinks,function(link){if(link.getAttribute('data-highlighted-by-user')!=='y')link.classList.remove('t-active')});Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
function t856_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t856');if(!container)return;t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)});setTimeout(function(){t856_setHeight(recId);t856_updateLazyLoad(recId)},500);window.addEventListener('resize',t_throttle(function(){if(window.noAdaptive&&window.noAdaptive===!0&&window.isMobile)return;t856_setHeight(recId)}));if(typeof jQuery!=='undefined'){$(container).on('displayChanged',function(){t856_setHeight(recId)})}else{container.addEventListener('displayChanged',function(){t856_setHeight(recId)})}
if(container&&container.classList.contains('t856__previewmode')){setInterval(function(){t856_setHeight(recId)},5000)}}
function t856_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t856');if(!container)return;var ratio=container.getAttribute('data-tile-ratio');var rows=rec.querySelectorAll('.t856__row');var col=rec.querySelector('.t856__col');var ratioHeight=0;if(col){ratioHeight=parseFloat(getComputedStyle(col,null).width)*ratio}
for(var i=0;i<rows.length;i++){var row=rows[i];var largestHeight=0;var tables=row.querySelectorAll('.t856__table');for(var j=0;j<tables.length;j++){var table=tables[j];var textHeight=table.querySelector('.t856__textwrapper').offsetHeight;if(table.querySelector('.t856__cell').classList.contains('t856__button-bottom')){textHeight+=table.querySelector('.t856__button-container').offsetHeight}
if(textHeight>largestHeight)largestHeight=textHeight}
if(window.innerWidth>=960){if(largestHeight>ratioHeight){for(var j=0;j<tables.length;j++){tables[j].style.height=largestHeight+'px';tables[j].style.minHeight='auto'}}else{for(var j=0;j<tables.length;j++){tables[j].style.height=ratioHeight+'px';tables[j].style.minHeight='auto'}}}else{for(var j=0;j<tables.length;j++){tables[j].style.minHeight=ratioHeight+'px';tables[j].style.height=null}}
if(t856_GetIEVersion()>0){var currentRowHeight=getComputedStyle(row.querySelector('.t856__table')).height;row.querySelector('.t856__bg').style.height=currentRowHeight+'px';row.querySelector('.t856__overlay').style.height=currentRowHeight+'px'}}}
function t856_GetIEVersion(){var userAgent=window.navigator.userAgent;var index=userAgent.indexOf('MSIE');if(index>0){return parseInt(userAgent.substring(index+5,userAgent.indexOf('.',index)))}else if(!!navigator.userAgent.match(/Trident\/7\./)){return 11}else{return 0}}
function t856_updateLazyLoad(recId){var scrollContainer=document.querySelector('#rec'+recId+' .t856__container_mobile-flex');var allRecords=document.getElementById('allrecords');var currentMode=allRecords.getAttribute('data-tilda-mode');if(scrollContainer&&currentMode!=='edit'&&currentMode!=='preview'){scrollContainer.addEventListener('scroll',t_throttle(function(){if(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},500))}}