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)]}}
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 t720_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t720_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 t1035__init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var container=rec.querySelector('.t1035');var thumbVideo=rec.querySelector('.t1035__thumb');var thumbWrapper=rec.querySelector('.t1035__thumb-wrapper');var thumbCloseBtn=rec.querySelector('.t1035__thumb-close-btn');var isMP4ThumbVideo=thumbVideo.classList.contains('t1035__thumb_mp4');var isYoutubeThumbVideo=thumbVideo.classList.contains('t1035__thumb_youtube');var isImageThumb=thumbVideo.classList.contains('t1035__thumb_img');var mainContainer=rec.querySelector('.t1035__video-container');var mainWrapper=rec.querySelector('.t1035__video-wrapper');var mainVideo=rec.querySelector('.t1035__video');var isMP4MainVideo=mainVideo.classList.contains('t1035__video_mp4');var isYoutubeMainVideo=mainVideo.classList.contains('t1035__video_youtube');var playBtn=rec.querySelector('.t1035__video-play-btn');var actionBtn=rec.querySelector('.t1035__button-container');var videoCloseBtn=rec.querySelector('.t1035__video-close-btn');var thumbVideoYoutubePlayer;var mainVideoYoutubePlayer;var setYoutubePlayer=function(video,id,onReadyPlayer,onPlayerStateChange){var isYoutbeShorts=video.classList.contains('t1035__video_youtube-shorts');var youtubeWidth=isYoutbeShorts?'315':'560';var youtubeHeight=isYoutbeShorts?'560':'315';return new YT.Player(video,{videoId:id,width:youtubeWidth,height:youtubeHeight,playerVars:{origin:window.location.protocol+'//'+window.location.host,loop:1,autoplay:1,playsinline:1,playlist:id,controls:0,},events:{onReady:function(event){event.target.playVideo();if(typeof onReadyPlayer==='function'){onReadyPlayer()}},onStateChange:function(){if(typeof onPlayerStateChange==='function'){onPlayerStateChange()}},},})};var initYoutubePlayer=function(callback){var youtubePlayerSrc='https://www.youtube.com/iframe_api';if(!document.querySelector('script[src="'+youtubePlayerSrc+'"]')){var script=document.createElement('script');script.src=youtubePlayerSrc;script.onload=function(){if(typeof window.onYouTubeIframeAPIReady!=='function'){window.onYouTubeIframeAPIReady=function(){callback()}}else{t_onFuncLoad('YT',function(){callback()})}};document.head.appendChild(script)}else{t_onFuncLoad('YT',function(){callback()})}};var showThumbVideo=function(){var thumbContainer=rec.querySelector('.t1035__thumb-container');var animate=container.getAttribute('data-animate-style');if(animate){container.classList.add('t-animate')}
container.style.removeProperty('display');thumbContainer.style.removeProperty('display')}
var setThumbSize=function(aspectRatio){var maxSize='125px';if(Math.abs(aspectRatio-1)<=0.1){if(isImageThumb){thumbWrapper.style.width=maxSize;thumbWrapper.style.maxWidth='min('+maxSize+', calc(100vw - 50px))'}else{thumbWrapper.style.maxWidth=maxSize;thumbWrapper.style.maxHeight=maxSize}}else if(aspectRatio>1.1){if(isImageThumb){thumbWrapper.style.height=maxSize;thumbWrapper.style.maxHeight='min('+maxSize+', calc(100vh - 50px))'}else{thumbWrapper.style.maxWidth='';thumbWrapper.style.maxHeight=maxSize}}else if(aspectRatio<0.9){if(isImageThumb){thumbWrapper.style.width=maxSize;thumbWrapper.style.maxWidth='min('+maxSize+', calc(100vw - 50px))'}else{thumbWrapper.style.maxWidth=maxSize;thumbWrapper.style.maxHeight=''}}
var thumbVideoStyles=window.getComputedStyle(thumbVideo);thumbWidth=thumbVideoStyles.getPropertyValue('width');thumbHeight=thumbVideoStyles.getPropertyValue('height')}
var setThumbVideo=function(type){showThumbVideo(rec);var aspectRatio=thumbWrapper.style.aspectRatio;if(!aspectRatio){if(type==='youtube'){var isThumbYoutbeShorts=thumbVideo.classList.contains('t1035__thumb_youtube-shorts');aspectRatio=isThumbYoutbeShorts?9/16:16/9;thumbWrapper.style.aspectRatio=isThumbYoutbeShorts?'9/16':'16/9'}else if(type==='image'){aspectRatio=3/4;thumbWrapper.style.aspectRatio='3/4'}else{aspectRatio=thumbVideo.videoWidth/thumbVideo.videoHeight;thumbWrapper.style.aspectRatio=thumbVideo.videoWidth+'/'+thumbVideo.videoHeight}}else{var operands=aspectRatio.split('/');if(operands[0]&&operands[1]){aspectRatio=parseFloat(operands[0])/parseFloat(operands[1])}}
setThumbSize(aspectRatio);thumbWrapper.addEventListener('click',function(){if(isMP4MainVideo&&mainVideo.getAttribute('data-src')===null||isYoutubeMainVideo&&mainVideo.getAttribute('data-id')===''){return}
openWidget()})}
var getMainVideo=function(){var mainDatasrc=mainVideo.getAttribute('data-src');if(mainDatasrc){mainVideo.setAttribute('src',mainDatasrc);mainVideo.preload='auto'}};if(thumbVideo){if(isImageThumb){setThumbVideo('image')}
if(isMP4ThumbVideo){var thumbAlreadyInit=!1;var thumbSetSize=function(){if(thumbAlreadyInit)return;thumbAlreadyInit=!0;setThumbVideo('mp4')};thumbVideo.addEventListener('loadedmetadata',thumbSetSize);thumbVideo.addEventListener('loadeddata',thumbSetSize);thumbVideo.preload='metadata';var thumbDatasrc=thumbVideo.getAttribute('data-src');if(thumbDatasrc){if(window.isMobile){var timeout=0;var connection=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(connection){if(connection.effectiveType!=='4g'){timeout=2000}}
if(window.isiOS){timeout=2000}
setTimeout(function(){thumbVideo.setAttribute('src',thumbDatasrc)},timeout)}else{thumbVideo.setAttribute('src',thumbDatasrc)}}
if(!container.classList.contains('t1035_previewmode')){thumbVideo.addEventListener('contextmenu',function(event){event.preventDefault()})}}
if(isYoutubeThumbVideo){var initThumbVideoYoutubePlayer=function(){var id=thumbVideo.getAttribute('data-id');window.YT.ready(function(){thumbVideoYoutubePlayer=setYoutubePlayer(thumbVideo,id,function(){var youtubeThumbState=thumbVideoYoutubePlayer.getPlayerState();if(youtubeThumbState==-1||youtubeThumbState==3){var startTime=Date.now();setTimeout(function playYoutubeThumb(){var currentTime=Date.now();thumbVideoYoutubePlayer.playVideo();if(thumbVideoYoutubePlayer.getPlayerState()==1||currentTime-startTime>5000){return}
setTimeout(playYoutubeThumb,100)})}
thumbVideoYoutubePlayer.mute();thumbVideo=rec.querySelector('.t1035__thumb.t1035__thumb_youtube');thumbVideo.style.pointerEvents='none';setThumbVideo('youtube')})})};initYoutubePlayer(initThumbVideoYoutubePlayer)}
thumbVideo.addEventListener('keydown',function(event){var key=event.key||event.keyCode;if(['Enter',13,' ',32].indexOf(key)!==-1){if(isMP4MainVideo&&mainVideo.getAttribute('data-src')===null||isYoutubeMainVideo&&mainVideo.getAttribute('data-id')===''){return}
openWidget()}})}
if(mainVideo){var mainWidth;var mainHeight;var mainAlreadyInit=!1;var mainSetSize=function(){if(mainAlreadyInit)return;mainAlreadyInit=!0;setMainSize(rec)};if(isMP4MainVideo){getMainVideo();mainVideo.addEventListener('loadedmetadata',mainSetSize);mainVideo.addEventListener('loadeddata',mainSetSize)}
var swapPlayPause=function(){if(isMP4MainVideo){if(mainVideo.paused){mainVideo.play()}else{mainVideo.pause()}}
if(isYoutubeMainVideo&&mainVideoYoutubePlayer){var state=mainVideoYoutubePlayer.getPlayerState();if(state===YT.PlayerState.PAUSED){mainVideoYoutubePlayer.playVideo();playBtn.style.display='none'}else if(state===YT.PlayerState.PLAYING){mainVideoYoutubePlayer.pauseVideo();playBtn.style.display='block'}}};if(isMP4MainVideo){[mainWrapper,playBtn].forEach(function(element){element.addEventListener('keydown',function(event){var key=event.key||event.keyCode;if(['Enter',13,' ',32].indexOf(key)!==-1){swapPlayPause()}})});window.addEventListener('blur',function(){if(!mainVideo.paused){mainVideo.pause()}});var mainVideoIsFullscreen=!1;mainWrapper.addEventListener('dblclick',function(){try{mainVideo.requestFullscreen();mainVideoIsFullscreen=!0}catch(error){console.error('An error occurred while trying to request fullscreen: ',error)}});var borderWidth=mainWrapper.style.borderWidth;var borderRadius=mainWrapper.style.borderRadius;document.addEventListener('fullscreenchange',function(){if(mainVideoIsFullscreen){if(document.fullscreenElement||document.webkitFullscreenElement){mainVideo.setAttribute('controls','controls');mainVideo.style.objectFit='contain';mainWrapper.style.removeProperty('border-width');mainWrapper.style.removeProperty('border-radius')}else{mainVideo.removeAttribute('controls');mainVideo.style.removeProperty('objectFit');mainWrapper.style.borderWidth=borderWidth;mainWrapper.style.borderRadius=borderRadius}}});mainVideo.addEventListener('playing',function(){playBtn.style.display='none'});mainVideo.addEventListener('pause',function(){playBtn.style.display='block'});if(!container.classList.contains('t1035_previewmode')){mainVideo.addEventListener('contextmenu',function(event){event.preventDefault()})}}
if(isMP4MainVideo||isYoutubeMainVideo){mainContainer.style.removeProperty('display');mainWrapper.addEventListener('click',function(){swapPlayPause()})}}
if(!container.classList.contains('t1035_previewmode')){thumbCloseBtn.addEventListener('click',function(){container.style.display='none'})}
if(window.isMobile||container.classList.contains('t1035_previewmode')){thumbCloseBtn.style.opacity=1;videoCloseBtn.style.opacity=1}
videoCloseBtn.addEventListener('click',function(){closeWidget()});var thumbWidth;var thumbHeight;var setMainSize=function(){var mainVideoWidth=mainVideo.videoWidth;var mainVideoHeight=mainVideo.videoHeight;mainWrapper.style.aspectRatio=mainVideoWidth+'/'+mainVideoHeight;mainWrapper.style.width=mainVideoWidth+'px';mainWrapper.style.height=mainVideoHeight+'px';var isYoutbeWrapper=mainWrapper.classList.contains('t1035__video-wrapper_youtube');var isYoutbeShortsWrapper=mainWrapper.classList.contains('t1035__video-wrapper_youtube-shorts');var setSizeStyle=function(size,units){return 'min('+size+'px, calc(100'+units+' - 50px))'};var aspectRatio=mainVideoWidth/mainVideoHeight;if(Math.abs(aspectRatio-1)<=0.1){mainWrapper.style.maxWidth=setSizeStyle(560,'vw');mainWrapper.style.maxHeight=setSizeStyle(560,'vh')}else if(aspectRatio>1.1||isYoutbeWrapper){mainWrapper.style.maxWidth=setSizeStyle(560,'vw');mainWrapper.style.maxHeight=setSizeStyle(315,'vh');mainWrapper.style.height=''}else if(aspectRatio<0.9||isYoutbeShortsWrapper){mainWrapper.style.maxWidth=setSizeStyle(315,'vw');mainWrapper.style.maxHeight=setSizeStyle(560,'vh');mainWrapper.style.width=''}};var openWidget=function(){var analitics=container.getAttribute('data-track-popup');var hook='TildaVideoWidget'+recid;if(analitics&&window.Tilda){Tilda.sendEventToStatistics(analitics,hook)}
if(mainWidth){mainWrapper.style.width=mainWidth}
if(mainHeight){mainWrapper.style.height=mainHeight}
if(isMP4MainVideo){mainVideo.muted=!1;mainVideo.autoplay=!0;mainVideo.currentTime=0;playBtn.style.display='none';mainVideo.play()}
if(isYoutubeMainVideo){if(!mainVideoYoutubePlayer){var isUnMuted=!1;var onReadyPlayer=function(){mainVideoYoutubePlayer.unMute()};var onPlayerStateChange=function(event){if(mainVideoYoutubePlayer.isMuted()&&mainVideoYoutubePlayer.getPlayerState()==2&&!isUnMuted){mainVideoYoutubePlayer.unMute();mainVideoYoutubePlayer.playVideo();isUnMuted=!0}};var initMainVideoYoutubePlayer=function(){var id=mainVideo.getAttribute('data-id');window.YT.ready(function(){mainVideoYoutubePlayer=setYoutubePlayer(mainVideo,id,onReadyPlayer,onPlayerStateChange)})};initYoutubePlayer(initMainVideoYoutubePlayer);playBtn.style.display='none'}else{mainVideoYoutubePlayer.seekTo(0);mainVideoYoutubePlayer.playVideo()}
mainSetSize()}
if(isYoutubeThumbVideo&&thumbVideoYoutubePlayer){thumbVideoYoutubePlayer.pauseVideo()}
container.classList.add('t1035__container--is_opened');videoCloseBtn.style.removeProperty('display');if(isMP4ThumbVideo){thumbVideo.pause();thumbVideo.currentTime=0}
document.addEventListener('keydown',escapeKeydown);if(actionBtn){var timer=actionBtn.getAttribute('data-timer')||'0.3';if(timer){setTimeout(function(){actionBtn.style.removeProperty('display')},parseFloat(timer)*1000)}}
if(!mainWidth||!mainHeight){var mainVideoStyles=window.getComputedStyle(mainVideo);if(!mainWidth){mainWidth=mainVideoStyles.getPropertyValue('width');mainWrapper.style.width=mainWidth}
if(!mainHeight){mainHeight=mainVideoStyles.getPropertyValue('height');mainWrapper.style.height=mainHeight}}};var closeWidget=function(){if(actionBtn){actionBtn.style.display='none'}
videoCloseBtn.style.display='none';playBtn.style.display='none';document.removeEventListener('keydown',escapeKeydown);mainVideo.muted=!0;mainVideo.autoplay=!1;var timeTransition=200;mainWrapper.classList.add('t1035__video-wrapper--animate');if(!isYoutubeThumbVideo&&!thumbVideoYoutubePlayer){mainWrapper.style.width=thumbWidth;mainWrapper.style.height=thumbHeight}
setTimeout(function(){container.classList.remove('t1035__container--is_opened');mainWrapper.classList.remove('t1035__video-wrapper--animate');if(isMP4ThumbVideo){thumbVideo.play()}
if(isYoutubeThumbVideo&&thumbVideoYoutubePlayer){thumbVideoYoutubePlayer.playVideo()}
if(isMP4MainVideo){mainVideo.pause()}
if(isYoutubeMainVideo&&mainVideoYoutubePlayer){mainVideoYoutubePlayer.pauseVideo()}},timeTransition*0.7)};var escapeKeydown=function(event){var key=event.code||event.key;if(['Escape',27].indexOf(key)!==-1){var isGalleryShowed=document.body.classList.contains('t-zoomer__active');if(isGalleryShowed)return;var isPopupShowed=document.body.classList.contains('t-body_popupshowed');if(isPopupShowed)return;closeWidget()}}}
function t702_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t702');if(!container)return;rec.setAttribute('data-animationappear','off');rec.setAttribute('data-popup-subscribe-inited','y');rec.style.opacity=1;var documentBody=document.body;var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var analitics=popup.getAttribute('data-track-popup');var popupCloseBtn=popup.querySelector('.t-popup__close');var hrefs=rec.querySelectorAll('a[href*="#"]');var submitHref=rec.querySelector('.t-submit[href*="#"]');if(popupTooltipHook){t_onFuncLoad('t_popup__addAttributesForAccessibility',function(){t_popup__addAttributesForAccessibility(popupTooltipHook)});document.addEventListener('click',function(event){var target=event.target;var href=target.closest('a[href$="'+popupTooltipHook+'"]')?target:!1;if(!href)return;event.preventDefault();t702_showPopup(recId);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recId)});t702__lazyLoad();if(analitics&&window.Tilda){Tilda.sendEventToStatistics(analitics,popupTooltipHook)}});t_onFuncLoad('t_popup__addClassOnTriggerButton',function(){t_popup__addClassOnTriggerButton(document,popupTooltipHook)})}
popup.addEventListener('scroll',t_throttle(function(){t702__lazyLoad()}));popup.addEventListener('click',function(event){var windowWithoutScrollBar=window.innerWidth-17;if(event.clientX>windowWithoutScrollBar)return;if(event.target===this)t702_closePopup(recId)});popupCloseBtn.addEventListener('click',function(){t702_closePopup(recId)});if(submitHref){submitHref.addEventListener('click',function(){if(documentBody.classList.contains('t-body_scroll-locked')){documentBody.classList.remove('t-body_scroll-locked')}})}
for(var i=0;i<hrefs.length;i++){hrefs[i].addEventListener('click',function(){var url=this.getAttribute('href');if(!url||url.substring(0,7)!='#price:'){t702_closePopup(recId);if(!url||url.substring(0,7)=='#popup:'){setTimeout(function(){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');documentBody.classList.add('t-body_popupshowed')},300)}}})}
function t702_escClosePopup(event){if(event.key==='Escape')t702_closePopup(recId)}
popup.addEventListener('tildamodal:show'+popupTooltipHook,function(){document.addEventListener('keydown',t702_escClosePopup)});popup.addEventListener('tildamodal:close'+popupTooltipHook,function(){document.removeEventListener('keydown',t702_escClosePopup)})}
function t702_lockScroll(){var documentBody=document.body;if(!documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=typeof window.pageYOffset!=='undefined'?window.pageYOffset:(document.documentElement||documentBody.parentNode||documentBody).scrollTop;documentBody.classList.add('t-body_scroll-locked');documentBody.style.top='-'+bodyScrollTop+'px';documentBody.setAttribute('data-popup-scrolltop',bodyScrollTop)}}
function t702_unlockScroll(){var documentBody=document.body;if(documentBody.classList.contains('t-body_scroll-locked')){var bodyScrollTop=documentBody.getAttribute('data-popup-scrolltop');documentBody.classList.remove('t-body_scroll-locked');documentBody.style.top=null;documentBody.removeAttribute('data-popup-scrolltop');document.documentElement.scrollTop=parseInt(bodyScrollTop)}}
function t702_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t702');if(!container)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;var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var ranges=rec.querySelectorAll('.t-range');var documentBody=document.body;if(ranges.length){Array.prototype.forEach.call(ranges,function(range){t702__triggerEvent(range,'popupOpened')})}
t_onFuncLoad('t_popup__showPopup',function(){t_popup__showPopup(popup)});if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');documentBody.classList.add('t-body_popupshowed');documentBody.classList.add('t702__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream&&window.isiOSVersion&&window.isiOSVersion[0]===11){setTimeout(function(){t702_lockScroll()},500)}
t702__lazyLoad();t702__triggerEvent(popup,'tildamodal:show'+popupTooltipHook);t_onFuncLoad('t_forms__calculateInputsWidth',function(){t_forms__calculateInputsWidth(recId)})}
function t702_closePopup(recId){var rec=document.getElementById('rec'+recId);var popup=rec.querySelector('.t-popup');var popupTooltipHook=popup.getAttribute('data-tooltip-hook');var popupAll=document.querySelectorAll('.t-popup_show:not(.t-feed__post-popup):not(.t945__popup)');if(popupAll.length==1){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed')}else{var newPopup=[];for(var i=0;i<popupAll.length;i++){if(popupAll[i].getAttribute('data-tooltip-hook')===popupTooltipHook){popupAll[i].classList.remove('t-popup_show');newPopup.push(popupAll[i])}}
if(newPopup.length===popupAll.length){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed')}}
if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');popup.classList.remove('t-popup_show');document.body.classList.remove('t702__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream&&window.isiOSVersion&&window.isiOSVersion[0]===11){t702_unlockScroll()}
t_onFuncLoad('t_popup__addFocusOnTriggerButton',function(){t_popup__addFocusOnTriggerButton()});setTimeout(function(){var popupHide=document.querySelectorAll('.t-popup:not(.t-popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);t702__triggerEvent(popup,'tildamodal:close'+popupTooltipHook)}
function t702_sendPopupEventToStatistics(popupName){var virtPage='/tilda/popup/';var virtTitle='Popup: ';if(popupName.substring(0,7)=='#popup:'){popupName=popupName.substring(7)}
virtPage+=popupName;virtTitle+=popupName;if(window.Tilda&&typeof Tilda.sendEventToStatistics=='function'){Tilda.sendEventToStatistics(virtPage,virtTitle,'',0)}else{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 t702_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}
function t702__lazyLoad(){if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
function t702__triggerEvent(el,eventName){var event;if(typeof window.CustomEvent==='function'){event=new CustomEvent(eventName)}else if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent(eventName,!0,!1)}else if(document.createEventObject){event=document.createEventObject();event.eventType=eventName}
event.eventName=eventName;if(el.dispatchEvent){el.dispatchEvent(event)}else if(el.fireEvent){el.fireEvent('on'+event.eventType,event)}else if(el[eventName]){el[eventName]()}else if(el['on'+eventName]){el['on'+eventName]()}}
function t657_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t657');var closeButton=rec.querySelector('.t657__btn');var closeIcon=rec.querySelector('.t657__icon-close');var closeSvg=rec.querySelector('.t657__icon-close svg');var storageItem=wrapperBlock.getAttribute('data-storage-item');var lastOpen;try{lastOpen=localStorage.getItem(storageItem)}catch(error){console.log('Your web browser does not support localStorage. Error status: ',error)}
if(!lastOpen){wrapperBlock.classList.remove('t657_closed')}
wrapperBlock.addEventListener('click',function(event){if(event.target===closeButton||event.target===closeIcon||event.target===closeSvg){wrapperBlock.classList.add('t657_closed');try{localStorage.setItem(storageItem,Math.floor(Date.now()/1000))}catch(error){console.log('Your web browser does not support localStorage. Error status: ',error)}
event.preventDefault()}})}
function t449_appearMenu(recId){if(window.innerWidth>980){var recs=document.querySelectorAll('.t449');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.classList.contains('t449__beforeready')){rec.classList.remove('t449__beforeready')}}else{rec.classList.add('t449__beforeready')}}
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.classList.contains('t449__beforeready')){rec.classList.add('t449__beforeready')}}else if(appearOffset){if(scrollTop>=appearOffset){rec.classList.remove('t449__beforeready')}}else{rec.classList.remove('t449__beforeready')}}}}}
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')})}