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 t1061_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var wrapperBlock=rec.querySelector('.t1061');var videoLazys=rec.querySelectorAll('.t-video-lazyload');if(videoLazys.length){t_onFuncLoad('t_video_lazyload__setHeight',function(){for(var i=0;i<videoLazys.length;i++){t_video_lazyload__setHeight(videoLazys[i])}
window.addEventListener('resize',function(){for(var i=0;i<videoLazys.length;i++){t_video_lazyload__setHeight(videoLazys[i])}});if(!wrapperBlock)return;wrapperBlock.addEventListener('displayChanged',function(){for(var i=0;i<videoLazys.length;i++){t_video_lazyload__setHeight(videoLazys[i])}})})}
var thumbnails=rec.querySelectorAll('.t1061__video-thumbnail');if(!thumbnails.length)return;Array.prototype.forEach.call(thumbnails,function(thumbnail){var videoWrap=thumbnail.closest('.t1061__wrap-video');var video=videoWrap.querySelector('.t-video-lazyload');var videoId=video.getAttribute('data-videolazy-id');var videoType=video.getAttribute('data-videolazy-type');t1061__setThumbnailImg(thumbnail,videoType,videoId)
thumbnail.addEventListener('click',function(event){event.preventDefault();t_onFuncLoad('t_video_lazyload__addVideo',function(){t_video_lazyload__addVideo(video);thumbnail.remove()})})})}
function t1061__setThumbnailImg(thumbnailEl,videoType,videoId){function setBgImage(url){thumbnailEl.style.backgroundImage=url}
if(videoType==='youtube'){var standardDefinitionUrl='https://img.youtube.com/vi/'+videoId+'/sddefault.jpg';var fallbackUrl='https://img.youtube.com/vi/'+videoId+'/hqdefault.jpg';var tempImage=new Image();tempImage.onload=function(){if(this.width===120&&this.height===90){setBgImage('url("'+fallbackUrl+'")')}else{setBgImage('url("'+standardDefinitionUrl+'")')}};tempImage.onerror=function(){setBgImage('url("'+fallbackUrl+'")')};tempImage.src=standardDefinitionUrl;return}
if(videoType==='vimeo'){setBgImage('url("https://vumbnail.com/'+videoId+'.jpg")');return}
if(videoType==='kinescope'){setBgImage('url("https://kinescope.io/'+videoId+'/poster/md.jpg")')
return}
if(videoType==='boomstream'){setBgImage('url("https://play.boomstream.com/'+videoId+'/poster")')
return}
if(videoType==='rutube'){setBgImage('url("https://rutube.ru/api/video/'+videoId+'/thumbnail/?redirect=1")');return}}
function t983_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t983');if(!container)return;window.addEventListener('resize',t_throttle(function(){if(window.noAdaptive&&window.noAdaptive===!0&&window.isMobile)return;t983_unifyHeights(recId);t983_translateBlock(recId)}));window.addEventListener('load',function(){t983_unifyHeights(recId);t983_translateBlock(recId)});container.addEventListener('displayChanged',t_throttle(function(){t983_unifyHeights(recId);t983_translateBlock(recId)}));t983_unifyHeights(recId);t983_translateBlock(recId);t983__updateLazyLoad(recId);t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t983_translateBlock(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t983');if(!container)return;var hoverBlocks=rec.querySelectorAll('.t983__card-block_hover');var wrapMarginBottom=35;var isMobile=window.isMobile||window.innerWidth<960;for(var i=0;i<hoverBlocks.length;i++){var hoverBlock=hoverBlocks[i];var blockWrapper=t983_getParent(hoverBlock,'t983__card-block-wrapper');var card=t983_getParent(hoverBlock,'t983__card');var cardHeight=card.clientHeight;var diff=cardHeight-hoverBlock.offsetHeight-wrapMarginBottom*2;var cardHideDiff=hoverBlock.querySelector('.t983__card-hide').offsetHeight;blockWrapper.style.transform='translateY('+diff+'px)';if(!isMobile){hoverBlock.style.transform='translateY('+cardHideDiff+'px)'}else{hoverBlock.style.transform=null}}
if(hoverBlocks.length===0){var rows=(isMobile?rec.querySelectorAll('.t983__container'):rec.querySelectorAll('.t983__row'));for(var i=0;i<rows.length;i++){var row=rows[i];var cardBlocks=row.querySelectorAll('.t983__card-block');var maxHeightRow=0;var card=t983_getParent(cardBlocks[0],'t983__card');if(card){var cardStyle=getComputedStyle(card,null);var cardPaddingTop=parseInt(cardStyle.paddingTop)||0;var cardPaddingBottom=parseInt(cardStyle.paddingBottom)||0;var cardHeight=card.clientHeight-(cardPaddingTop+cardPaddingBottom);for(var j=0;j<cardBlocks.length;j++){var cardHide=cardBlocks[j].querySelector('.t983__card-hide');var cardHideHeight=cardHide?cardHide.offsetHeight:0;if(cardHideHeight>maxHeightRow)maxHeightRow=cardHideHeight}
for(var j=0;j<cardBlocks.length;j++){var cardBlock=cardBlocks[j];var cardShow=cardBlock.querySelector('.t983__card-show');var cardShowHeight=cardShow?cardShow.offsetHeight:0;var diff=cardHeight-cardShowHeight-maxHeightRow-wrapMarginBottom*2;if(window.innerWidth>=480){cardBlock.style.transform='translateY('+diff+'px)'}else{cardBlock.style.transform=null}}}}}}
function t983_unifyHeights(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var main=rec.querySelector('.t983');if(!main)return;var container=rec.querySelector('.t983__container');var rows=main.querySelectorAll('.t983__row');for(var i=0;i<rows.length;i++){var row=rows[i];var cardsContent=row.querySelectorAll('.t983__card-content');var cardsWrapper=row.querySelectorAll('.t983__card-wrapper');var card=row.querySelector('.t983__card');var cardStyle=getComputedStyle(card,null);var cardPaddingLeft=parseInt(cardStyle.paddingLeft)||0;var cardPaddingRight=parseInt(cardStyle.paddingRight)||0;var cardWidth=card.clientWidth-(cardPaddingLeft+cardPaddingRight);var maxHeight=0;var ratio=container.getAttribute('data-ratio');var minHeightFromRatio=0;switch(ratio){case '16_9':minHeightFromRatio=cardWidth*0.5625;break;case '4_3':minHeightFromRatio=cardWidth*0.75;break;case '3_2':minHeightFromRatio=cardWidth*0.6666;break;case '1_1':minHeightFromRatio=cardWidth;break;case '2_3':minHeightFromRatio=cardWidth*1.5;break;case '3_4':minHeightFromRatio=cardWidth*1.3333;break;case '9_16':minHeightFromRatio=cardWidth*1.7777;break}
for(var j=0;j<cardsContent.length;j++){var cardContentHeight=cardsContent[j].offsetHeight;if(cardContentHeight>maxHeight)maxHeight=cardContentHeight}
if(maxHeight>minHeightFromRatio){for(var j=0;j<cardsWrapper.length;j++){cardsWrapper[j].style.paddingBottom=maxHeight+'px'}}else{for(var j=0;j<cardsWrapper.length;j++){cardsWrapper[j].style.paddingBottom=null}}}}
function t983__updateLazyLoad(recId){var allRecords=document.getElementById('allrecords');if(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){var scrollContainer=document.querySelector('#rec'+recId+' .t983__container_mobile-flex');var curMode=allRecords.getAttribute('data-tilda-mode');if(scrollContainer&&curMode!='edit'&&curMode!='preview'&&window.isMobile){scrollContainer.addEventListener('touchmove',t_throttle(function(){t_lazyload_update()}))}})}}
function t983_getParent(element,className){for(var p=element&&element.parentElement;p;p=p.parentElement){if(p.classList.contains(className)){return p}}}
function t142_checkSize(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var button=rec.querySelector('.t142__submit');if(!button)return;var buttonStyle=getComputedStyle(button,null);var buttonPaddingTop=parseInt(buttonStyle.paddingTop)||0;var buttonPaddingBottom=parseInt(buttonStyle.paddingBottom)||0;var buttonHeight=button.clientHeight-(buttonPaddingTop+buttonPaddingBottom)+5;var textHeight=button.scrollHeight;if(buttonHeight<textHeight){button.classList.add('t142__submit-overflowed')}}
function t959__init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t959');if(!container)return;t959__updateLazyLoad(recId);t959_unifyHeights(recId);window.addEventListener('resize',t_throttle(function(){t959_unifyHeights(recId)}));window.addEventListener('load',function(){t959_unifyHeights(recId)});container.addEventListener('displayChanged',t_throttle(function(){t959_unifyHeights(recId)}));t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t959__updateLazyLoad(recId){var allRecords=document.getElementById('allrecords');var container=document.querySelector('#rec'+recId+' .t959__container_mobile-flex');var mode=allRecords.getAttribute('data-tilda-mode');if(container&&mode!=='edit'&&mode!=='preview'&&window.isMobile){if(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){container.addEventListener('touchmove',t_throttle(function(){t_lazyload_update()}))})}}}
function t959_unifyHeights(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var main=rec.querySelector('.t959');if(!main)return;var containers=main.querySelectorAll('.t959__container');for(var i=0;i<containers.length;i++){var container=containers[i];var cardsContent=container.querySelectorAll('.t959__card-content');var cards=container.querySelectorAll('.t959__card-inner');if(!cards.length){return}
var cardStyle=getComputedStyle(cards[0],null);var cardPaddingLeft=parseInt(cardStyle.paddingLeft)||0;var cardPaddingRight=parseInt(cardStyle.paddingRight)||0;var cardWidth=cards[0].clientWidth-(cardPaddingLeft+cardPaddingRight);var maxHeight=0;var ratio=container.getAttribute('data-ratio');var minHeightFromRatio=0;switch(ratio){case '16_9':minHeightFromRatio=cardWidth*0.5625;break;case '4_3':minHeightFromRatio=cardWidth*0.75;break;case '3_2':minHeightFromRatio=cardWidth*0.6666;break;case '1_1':minHeightFromRatio=cardWidth;break;case '2_3':minHeightFromRatio=cardWidth*1.5;break;case '3_4':minHeightFromRatio=cardWidth*1.3333;break;case '9_16':minHeightFromRatio=cardWidth*1.7777;break}
for(var j=0;j<cardsContent.length;j++){var cardContent=cardsContent[j];var titleHeight=t959_outerHeight(cardContent.querySelector('.t-card__title'));var descHeight=t959_outerHeight(cardContent.querySelector('.t-card__descr'));var colHeight=titleHeight+descHeight;if(colHeight>maxHeight)maxHeight=colHeight}
if(maxHeight>minHeightFromRatio){for(var j=0;j<cards.length;j++){cards[j].style.paddingBottom=maxHeight+'px'}}else{for(var j=0;j<cards.length;j++){cards[j].style.paddingBottom=null}}}}
function t959_outerHeight(element){if(!element)return 0;var height=element.offsetHeight;var style=getComputedStyle(element);height+=parseInt(style.marginTop)+parseInt(style.marginBottom);return height}
function t478_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var sizer=rec.querySelector('.t478__sizer');if(!sizer)return;var sizerStyle=getComputedStyle(sizer,null);var sizerPaddingTop=parseInt(sizerStyle.paddingTop);var sizerPaddingBottom=parseInt(sizerStyle.paddingBottom);var sizerPaddingLeft=parseInt(sizerStyle.paddingLeft);var sizerPaddingRight=parseInt(sizerStyle.paddingRight);var sizerHeight=sizer.clientHeight-(sizerPaddingTop+sizerPaddingBottom);var sizerWidth=sizer.clientWidth-(sizerPaddingLeft+sizerPaddingRight);var ratio=sizerWidth/sizerHeight;var wrappers=rec.querySelectorAll('.t478__blockimg, .t478__textwrapper');if(sizerHeight!==window.innerHeight){for(var i=0;i<wrappers.length;i++){wrappers[i].style.height=(sizerWidth/ratio)+'px'}}}
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)});rec.addEventListener('conditional-form-init',function(){t_onFuncLoad('t_form__conditionals_addFieldsListeners',function(){t_form__conditionals_addFieldsListeners(recId,function(){t_popup__resizePopup(recId)})})},{once:!0})}
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 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');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 t228__init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menuBlock=rec.querySelector('.t228');var mobileMenu=rec.querySelector('.t228__mobile');var menuSubLinkItems=rec.querySelectorAll('.t-menusub__link-item');var rightBtn=rec.querySelector('.t228__right_buttons_but .t-btn');var mobileMenuPosition=mobileMenu?mobileMenu.style.position||window.getComputedStyle(mobileMenu).position:'';var mobileMenuDisplay=mobileMenu?mobileMenu.style.display||window.getComputedStyle(mobileMenu).display:'';var isFixedMobileMenu=mobileMenuPosition==='fixed'&&mobileMenuDisplay==='block';var overflowEvent=document.createEvent('Event');var noOverflowEvent=document.createEvent('Event');overflowEvent.initEvent('t228_overflow',!0,!0);noOverflowEvent.initEvent('t228_nooverflow',!0,!0);if(menuBlock){menuBlock.addEventListener('t228_overflow',function(){t228_checkOverflow(recid)});menuBlock.addEventListener('t228_nooverflow',function(){t228_checkNoOverflow(recid)})}
rec.addEventListener('click',function(e){var targetLink=e.target.closest('.t-menusub__target-link');if(targetLink&&window.isMobile&&window.innerWidth<=980){if(targetLink.classList.contains('t-menusub__target-link_active')){if(menuBlock)menuBlock.dispatchEvent(overflowEvent)}else{if(menuBlock)menuBlock.dispatchEvent(noOverflowEvent)}}
var currentLink=e.target.closest('.t-menu__link-item:not(.tooltipstered):not(.t-menusub__target-link):not(.t794__tm-link):not(.t966__tm-link):not(.t978__tm-link):not(.t978__menu-link)');if(currentLink&&mobileMenu&&isFixedMobileMenu)mobileMenu.click()});Array.prototype.forEach.call(menuSubLinkItems,function(linkItem){linkItem.addEventListener('click',function(){if(mobileMenu&&isFixedMobileMenu)mobileMenu.click()})});if(rightBtn){rightBtn.addEventListener('click',function(){if(mobileMenu&&isFixedMobileMenu)mobileMenu.click()})}
if(menuBlock){menuBlock.addEventListener('showME601a',function(){var menuLinks=rec.querySelectorAll('.t966__menu-link');Array.prototype.forEach.call(menuLinks,function(menuLink){menuLink.addEventListener('click',function(){if(mobileMenu&&isFixedMobileMenu)mobileMenu.click()})})})}
t_onFuncLoad('t_throttle',function(){var onResizeThrottled=t_throttle(function(){t228_setWidth(recid)},50)
window.addEventListener('resize',onResizeThrottled)})}
function t228_checkOverflow(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t228'):null;if(!menu)return;var mobileContainer=document.querySelector('.t228__mobile_container');var mobileContainerHeight=t228_getFullHeight(mobileContainer);var windowHeight=document.documentElement.clientHeight;var menuPosition=menu.style.position||window.getComputedStyle(menu).position;if(menuPosition==='fixed'){menu.classList.add('t228__overflow');menu.style.setProperty('height',(windowHeight-mobileContainerHeight)+'px','important')}}
function t228_checkNoOverflow(recid){var rec=document.getElementById('rec'+recid);if(!rec)return!1;var menu=rec.querySelector('.t228');var menuPosition=menu?menu.style.position||window.getComputedStyle(menu).position:'';if(menuPosition==='fixed'){if(menu)menu.classList.remove('t228__overflow');if(menu)menu.style.height='auto'}}
function t228_setWidth(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menuCenterSideList=rec.querySelectorAll('.t228__centerside');Array.prototype.forEach.call(menuCenterSideList,function(menuCenterSide){menuCenterSide.classList.remove('t228__centerside_hidden')});if(window.innerWidth<=980)return;var menuBlocks=rec.querySelectorAll('.t228');Array.prototype.forEach.call(menuBlocks,function(menu){var maxWidth;var centerWidth=0;var paddingWidth=40;var leftSide=menu.querySelector('.t228__leftside');var rightSide=menu.querySelector('.t228__rightside');var menuList=menu.querySelector('.t228__list');var mainContainer=menu.querySelector('.t228__maincontainer');var leftContainer=menu.querySelector('.t228__leftcontainer');var rightContainer=menu.querySelector('.t228__rightcontainer');var centerContainer=menu.querySelector('.t228__centercontainer');var centerContainerLi=centerContainer?centerContainer.querySelectorAll('li'):[];var leftContainerWidth=t228_getFullWidth(leftContainer);var rightContainerWidth=t228_getFullWidth(rightContainer);var mainContainerWidth=mainContainer?mainContainer.offsetWidth:0;var dataAlign=menu.getAttribute('data-menu-items-align');var isDataAlignCenter=dataAlign==='center'||dataAlign===null;maxWidth=leftContainerWidth>=rightContainerWidth?leftContainerWidth:rightContainerWidth;maxWidth=Math.ceil(maxWidth);Array.prototype.forEach.call(centerContainerLi,function(li){centerWidth+=t228_getFullWidth(li)});leftSide.style.minWidth=''
rightSide.style.minWidth=''
if(mainContainerWidth-(maxWidth*2+paddingWidth*2)>centerWidth+20){if(isDataAlignCenter){if(leftSide)leftSide.style.minWidth=maxWidth+'px';if(rightSide)rightSide.style.minWidth=maxWidth+'px'}}else{if(leftSide)leftSide.style.minWidth=maxWidth+'';if(rightSide)rightSide.style.minWidth=maxWidth+''}
if(menuList&&menuList.classList.contains('t228__list_hidden'))menuList.classList.remove('t228__list_hidden')})}
function t228_getFullWidth(el){if(!el)return 0;var marginLeft=el.style.marginLeft||window.getComputedStyle(el).marginLeft;var marginRight=el.style.marginRight||window.getComputedStyle(el).marginRight;marginLeft=parseInt(marginLeft,10)||0;marginRight=parseInt(marginRight,10)||0;return el.offsetWidth+marginLeft+marginRight}
function t228_getFullHeight(el){if(!el)return 0;var marginTop=el.style.marginTop||window.getComputedStyle(el).marginTop;var marginBottom=el.style.marginBottom||window.getComputedStyle(el).marginBottom;marginTop=parseInt(marginTop,10)||0;marginBottom=parseInt(marginBottom,10)||0;return el.offsetHeight+marginTop+marginBottom}
window.requestAnimationFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60)}})();function t270_scroll(hash,offset){if(!hash)return;t270_checkLoad(hash,offset);var excludeHashes=['#!/tproduct/','#!/tab/','#opencart']
if(excludeHashes.includes(hash)){return!0}
var isHistoryChangeAllowed=window.location.hash!==hash;var wrapperBlock=document.querySelector('.t270');var dontChangeHistory=wrapperBlock?Boolean(wrapperBlock.getAttribute('data-history-disabled')):!1;t270_scrollToEl(hash,offset);if(!dontChangeHistory&&isHistoryChangeAllowed){if(history.pushState){history.pushState(null,null,hash)}else{window.location.hash=hash}
isHistoryChangeAllowed=!1}
return!0}
function t270_checkLoad(hash,offset){if(window.t270_loadChecked)return;var sliderWrappers=document.body.querySelectorAll('.t-slds__items-wrapper');if(!sliderWrappers.length)return;var lastWrapper=sliderWrappers[sliderWrappers.length-1];var sliderImgs=lastWrapper?lastWrapper.querySelectorAll('.t-slds__bgimg'):[];var lastImg=sliderImgs[sliderImgs.length-1];var imageUrl=lastImg?window.getComputedStyle(lastImg).backgroundImage:'';imageUrl=imageUrl.substring(5,imageUrl.length-2);var preloaderImg=document.createElement('img');preloaderImg.src=imageUrl?imageUrl:'';preloaderImg.addEventListener('load',function(){t270_scroll(hash,offset);window.t270_loadChecked=!0})}
function t270_scrollToEl(hash,offset){var SCROLL_DURATION_MS=500;var body=document.body;if(body.getAttribute('data-scroll'))return;var scrollTargetY=t270_getTarget(hash,offset);if(isNaN(scrollTargetY))return;var canSmoothScroll=window.CSS&&window.CSS.supports('scroll-behavior','smooth')&&'scrollBehavior' in document.documentElement.style;var userAgent=navigator.userAgent.toLowerCase();var isAndroid=userAgent.indexOf('android')!==-1;if(window.isMobile&&!isAndroid&&canSmoothScroll){body.setAttribute('data-scroll','true');window.scrollTo({left:0,top:scrollTargetY,behavior:'smooth'});setTimeout(function(){body.removeAttribute('data-scroll')},SCROLL_DURATION_MS)}else{t270_smoothScrollTo(scrollTargetY,SCROLL_DURATION_MS)}}
function t270_smoothScrollTo(targetY,duration=500){var body=document.body;var startY=window.scrollY||window.pageYOffset;var deltaY=targetY-startY;var startTime=performance.now();function easeInOutQuad(t){return Math.pow(t,2)}
function scroll(){var currentTime=performance.now();var elapsedTime=Math.min((currentTime-startTime)/duration,1);var ease=easeInOutQuad(elapsedTime);window.scrollTo(0,startY+deltaY*ease);if(elapsedTime<1){requestAnimationFrame(scroll)}else{body.removeAttribute('data-scroll');body.removeAttribute('data-scrollable');window.scrollTo(0,targetY)}}
body.setAttribute('data-scroll','true');body.setAttribute('data-scrollable','true');requestAnimationFrame(scroll)}
function t270_getTarget(hash,offset){var target;try{if(hash.substring(0,1)==='#'){target=document.getElementById(hash.substring(1))}else{target=document.querySelector(hash)}}catch(event){console.log('Exception t270: '+event.message);return}
if(!target){target=document.querySelector('a[name="'+hash.substr(1)+'"], div[id="'+hash.substr(1)+'"]');if(!target)return}
target=parseInt((target.getBoundingClientRect().top+window.pageYOffset)-offset,10);target=Math.max(target,0);return target}
function t390_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t390');if(!container)return;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;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 escapeEvent=t390_escClosePopup.bind(this,recId);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();t390_showPopup(recId,escapeEvent);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recId)});t390__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(){t390__lazyLoad()}));popup.addEventListener('click',function(event){if(event.target===this)t390_closePopup(recId,escapeEvent)});popupCloseBtn.addEventListener('click',function(){t390_closePopup(recId,escapeEvent)});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:'){t390_closePopup(recId,escapeEvent);if(!url||url.substring(0,7)=='#popup:'){setTimeout(function(){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed')},300)}}})}
var curPath=window.location.pathname;var curFullPath=window.location.origin+curPath;var isAndroid=/(android)/i.test(navigator.userAgent);if(isAndroid){var selects='a[href^="#"]:not([href="#"]):not([href^="#price"]):not([href^="#popup"]):not([href^="#prodpopup"]):not([href^="#order"]):not([href^="#!"]),'+'a[href^="'+curPath+'#"]:not([href*="#!/tproduct/"]):not([href*="#!/tab/"]):not([href*="#popup"]),'+'a[href^="'+curFullPath+'#"]:not([href*="#!/tproduct/"]):not([href*="#!/tab/"]):not([href*="#popup"])';var selectors=rec.querySelectorAll(selects);for(var i=0;i<selectors.length;i++){selectors[i].addEventListener('click',function(event){var hash=this.hash.trim();if(window.location.hash){setTimeout(function(){window.location.href=hash},50)}})}}
function t390_escClosePopup(recId){if(arguments[1].key==='Escape')t390_closePopup(recId,escapeEvent)}}
function t390_showPopup(recId,escapeEvent){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t390');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 documentBody=document.body;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('t390__body_popupshowed');document.addEventListener('keydown',escapeEvent)}
function t390_closePopup(recId,escapeEvent){var rec=document.getElementById('rec'+recId);var popup=rec.querySelector('.t-popup');var popupActive=document.querySelector('.t-popup.t-popup_show');if(popup===popupActive){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed');document.body.classList.remove('t390__body_popupshowed')}
popup.classList.remove('t-popup_show');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);document.removeEventListener('keydown',escapeEvent)}
function t390_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 t390__lazyLoad(){var allRecords=document.getElementById('allrecords');if(window.lazy==='y'||(allRecords&&allRecords.getAttribute('data-tilda-lazy')==='yes')){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
function t898_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t898');if(!container)return;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var whatsApp=rec.querySelector('.t898__icon-whatsapp_wrapper');if(whatsApp){var whatsAppHref=whatsApp.getAttribute('href');if(whatsAppHref&&(whatsAppHref.indexOf('whatsapp://')>-1||whatsAppHref.indexOf('wa.me')>-1)){t898_removeExtraSymbolsFromWhatsApp(whatsApp,whatsAppHref)}}
if(window.lazy==='y'||document.getElementById('allrecords').getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}}
function t898_removeExtraSymbolsFromWhatsApp(whatsApp,whatsAppHref){if(whatsAppHref&&whatsAppHref.indexOf('?text=')!==-1){var whatsAppHrefArr=whatsAppHref.split('?text=');whatsAppHrefArr[0]=whatsAppHrefArr[0].replace(/[\(\)+-]/g,'');whatsAppHref=whatsAppHrefArr[0]+'?text='+whatsAppHrefArr[1]}else{whatsAppHref=whatsAppHref.replace(/[\(\)+-]/,'')}
whatsApp.setAttribute('href',whatsAppHref)}