window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isTablet=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/i.test(navigator.userAgent);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 t794_init(recid){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t794'):null;var hook=menu?menu.getAttribute('data-tooltip-hook'):'';if(!hook)return;var hookLinks=document.querySelectorAll('a[href="'+hook+'"]');hookLinks=Array.prototype.filter.call(hookLinks,function(hookLink){var isSubmenuAllowed=hookLink.getAttribute('data-submenu-disallowed')!=='yes';if(isSubmenuAllowed){hookLink.classList.add('t794__tm-link');hookLink.setAttribute('data-tooltip-menu-id',recid);return!0}
return!1});var parentMenu=hookLinks.length?hookLinks[0].closest('[data-menu]'):null;var tooltipMenu=rec.querySelector('.t794__tooltip-menu');var isParentFixed=parentMenu&&window.getComputedStyle(parentMenu).position==='fixed';if(tooltipMenu)tooltipMenu.setAttribute('data-pos-fixed',isParentFixed?'yes':'no');t794_addArrow(recid,hookLinks);t794_setUpMenu(recid,hookLinks);t_onFuncLoad('t_submenublocks__highlightActiveLinks',function(){t_submenublocks__highlightActiveLinks('.t794__list_item a')});if(menu.hasAttribute('data-full-submenu-mob')&&(window.isMobile||'ontouchend' in document)){t_onFuncLoad('t_submenublocks__setFullScreenMenu',function(){t_submenublocks__setFullScreenMenu(menu)})}}
function t794_addArrow(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenuBlock=rec?rec.querySelector('.t794'):null;var isArrowAppend=submenuBlock.getAttribute('data-add-arrow');if(!isArrowAppend)return;hookLinks=Array.prototype.slice.call(hookLinks);hookLinks.forEach(function(hookLink){var arrow=document.createElement('div');arrow.classList.add('t794__arrow');hookLink.appendChild(arrow);var isInsideZero=hookLink.closest('.tn-atom');var hasCustomBorderColor=window.getComputedStyle(hookLink).borderColor!=='rgba(0, 0, 0, 0)';if(isInsideZero&&!hasCustomBorderColor){hookLink.style.borderColor='initial';hookLink.style.border='none'}})}
function t794_setUpMenu(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenu=rec?rec.querySelector('.t794__tooltip-menu'):null;if(!submenu)return;var menuBlock=rec?rec.querySelector('.t794'):null;var verticalIndent=menuBlock.getAttribute('data-tooltip-margin');var content=submenu.querySelector('.t794__content');var hooksAndSubmenu=hookLinks.concat(submenu);if(window.innerWidth>980&&!('ontouchend' in document)){t_onFuncLoad('t_submenublocks__addEventsDesktop',function(){t_submenublocks__addEventsDesktop(submenu,hooksAndSubmenu,verticalIndent,'.t794')})}else{t_onFuncLoad('t_submenublocks__addEventsMobile',function(){t_submenublocks__addEventsMobile(submenu,hookLinks,verticalIndent,'.t794')})}
window.addEventListener('scroll',t_throttle(function(){if(content){content.addEventListener('mouseleave',function(){if(submenu.classList.contains('t794__tooltip-menu_show')){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t794')})}})}},300));var tooltipLinks=document.querySelectorAll('.t794__tooltip-menu a[href*="#"]');Array.prototype.forEach.call(tooltipLinks,function(tooltipLink){tooltipLink.addEventListener('click',function(){t_onFuncLoad('t_submenublocks__hideSubmenu',function(){t_submenublocks__hideSubmenu(submenu,'.t794')});var menuList=document.querySelectorAll('.t450, .t199__mmenu, .t280, .t282, .t204__burger, .t451, .t466');Array.prototype.forEach.call(menuList,function(menu){var event=document.createEvent('Event');event.initEvent('clickedAnchorInTooltipMenu',!0,!0);menu.dispatchEvent(event)});Array.prototype.forEach.call(tooltipLinks,function(link){link.classList.remove('t-active')});tooltipLink.classList.add('t-active')})})}
function t654_showPanel(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t654');if(!container)return;var buttonClose=rec.querySelector('.t654__icon-close');var storageItem=container.getAttribute('data-storage-item');var delta=container.getAttribute('data-storage-delta')*86400;var today=Math.floor(Date.now()/1000);var lastOpen=null;var currentDelta;try{lastOpen=localStorage.getItem(storageItem);currentDelta=today-lastOpen}catch(e){console.log('Your web browser does not support localStorage.')}
if(lastOpen===null||currentDelta>=delta){container.classList.remove('t654_closed')}
buttonClose.addEventListener('click',function(event){container.classList.add('t654_closed');if(delta){try{localStorage.setItem(storageItem,Math.floor(Date.now()/1000))}catch(e){console.log('Your web browser does not support localStorage.')}}
event.preventDefault()});if(window.innerWidth>980){window.addEventListener('scroll',t_throttle(function(){if(container.classList.contains('t654_bottom')&&document.getElementById('tildacopy')&&(window.innerHeight+window.scrollY)>=document.body.offsetHeight-70){container.style.visibility='hidden'}else{var appearOffset=container.getAttribute('data-appearoffset');if(!appearOffset){container.style.visibility='visible'}}}))}}
function t654_setBg(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t654');if(!container)return;if(window.innerWidth>980){if(container.getAttribute('data-bgcolor-setbyscript')==='yes'){container.style.backgroundColor=container.getAttribute('data-bgcolor-rgba')}}else{container.style.backgroundColor=container.getAttribute('data-bgcolor-hex');container.setAttribute('data-bgcolor-setbyscript','yes')}}
function t654_appearMenu(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t654');if(!container)return;if(window.innerWidth>980){var appearOffset=container.getAttribute('data-appearoffset');if(appearOffset){if(appearOffset.indexOf('vh')>-1){appearOffset=Math.floor((window.innerHeight*(parseInt(appearOffset)/100)))}
appearOffset=parseInt(appearOffset,10);if(window.pageYOffset>=appearOffset){if(getComputedStyle(container,null).visibility==='hidden'){if(container.classList.contains('t654_top')){container.style.top='-50px';container.style.visibility='visible';t654__fadeIn(container);t654__animate(container,'top')}else{container.style.bottom='-50px';container.style.visibility='visible';t654__fadeIn(container);t654__animate(container,'bottom')}}}else{container.style.visibility='hidden'}}}}
function t654_changebgopacitymenu(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t654');if(!container)return;if(window.innerWidth>980){var bgColor=container.getAttribute('data-bgcolor-rgba');var bgColorAfterScroll=container.getAttribute('data-bgcolor-rgba-afterscroll');var bgOpacity=container.getAttribute('data-bgopacity');var bgOpacityTwo=container.getAttribute('data-bgopacity-two');var menuShadow=container.getAttribute('data-menushadow');var menuShadowValue=menuShadow;if(menuShadow!=='100'){menuShadowValue='0.'+menuShadow}
if(window.pageYOffset>20){container.style.backgroundColor=bgColorAfterScroll;if(bgOpacityTwo==='0'||menuShadow===' '){container.style.boxShadow='none'}else{container.style.boxShadow='0px 1px 3px rgba(0, 0, 0, '+menuShadowValue+')'}}else{container.style.backgroundColor=bgColor;if(bgOpacity==='0.0'||menuShadow===' '){container.style.boxShadow='none'}else{container.style.boxShadow='0px 1px 3px rgba(0, 0, 0, '+menuShadowValue+')'}}}}
function t654__fadeIn(el){if(el.style.display==='block')return;var opacity=0;el.style.opacity=opacity;el.style.display='block';var timer=setInterval(function(){el.style.opacity=opacity;opacity+=0.1;if(opacity>=1.0){clearInterval(timer);el.style.display=''}},20)}
function t654__animate(element,animate){var duration=200;var start=parseInt(getComputedStyle(element,null)[animate]);var change=0-start;var currentTime=0;var increment=16;function t654__easeInOutCubic(currentTime,start,change){if((currentTime/=duration/2)<1){return change/2*currentTime*currentTime*currentTime+start}else{return change/2*((currentTime-=2)*currentTime*currentTime+2)+start}}
function t654__animateScroll(){currentTime+=increment;element.style[animate]=t654__easeInOutCubic(currentTime,start,change)+'px';if(currentTime<duration){setTimeout(t654__animateScroll,increment)}else{element.style[animate]='0px'}}
t654__animateScroll()}
function t451_initMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var burgerList=rec.querySelectorAll('.t451 .t-menuburger');var menu=rec.querySelector('.t451m');var menuBlock=rec.querySelector('.t451');var overlay=rec.querySelector('.t451m__overlay');var links=rec.querySelectorAll('.t-menu__link-item');Array.prototype.forEach.call(burgerList,function(burger){burger.addEventListener('click',function(e){e.preventDefault();t451_closeMenu(menu,overlay);t451_showMenu(menu,overlay);t451_checkSize(menu)})});if(menu){menu.click(function(e){t451_closeMenu(menu,overlay);t451_showMenu(menu,overlay);t451_checkSize(menu);e.preventDefault()})}
if(menuBlock){menuBlock.addEventListener('clickedAnchorInTooltipMenu',function(){t451_closeMenu(menu,overlay)})}
rec.addEventListener('click',function(e){if(window.innerWidth>980)return;var submenuClassList=['.t451__link-item_submenu','.t966__tm-link','.t978__tm-link','.t978__menu-link_hook'];var isContainsSubmenuClass=submenuClassList.some(function(className){return e.target.closest(className)});if(!isContainsSubmenuClass)return;setTimeout(function(){t451_checkSize(menu)},100)});window.addEventListener('resize',function(){t451_checkSize(menu)});menu.addEventListener('menuOverflow',function(){t451_checkSize(menu)});var navLinks=rec.querySelectorAll('.t451 a.t-menu__link-item[href*="#"], .t451 a.t-menusub__link-item[href*="#"]');navLinks=Array.prototype.filter.call(navLinks,function(navLink){return!navLink.classList.contains('tooltipstered')});if(navLinks.length>0){t_onFuncLoad('t_menu__updateActiveLinks',function(){t_menu__updateActiveLinks(navLinks,'.t451')})}
t_onFuncLoad('t_menu__highlightActiveLinks',function(){t_menu__highlightActiveLinks('.t451m__menu a')});document.addEventListener('click',function(e){if(e.target.closest('.t451m__overlay, .t451m__close, a[href*="#"]:not(.tooltipstered):not(.t794__tm-link):not(.t978__tm-link):not(.t966__tm-link):not(.t978__menu-link_hook)')){t451_closeMenu(menu,overlay)}});document.addEventListener('keydown',function(e){if(e.keyCode===27){t451_closeMenu(menu,overlay)}})}
function t451_showMenu(menu,overlay){if(!menu)return;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t451__body_menushowed');menu.classList.add('t451m__menu_show');if(overlay)overlay.classList.add('t451m__menu_show')}
function t451_closeMenu(menu,overlay){if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t451__body_menushowed');if(menu)menu.classList.remove('t451m__menu_show');if(overlay)overlay.classList.remove('t451m__menu_show')}
function t451_checkSize(menu){if(!menu)return;var menuTop=menu.querySelector('.t451m__top');var menuRight=menu.querySelector('.t451m__rightside');var menuContainer=menu.querySelector('.t451m__container');var menuTopHeight=menuTop?menuTop.offsetHeight:0;var menuRightHeight=menuRight?menuRight.offsetHeight:0;var windowPadding=80;if(menuTopHeight+menuRightHeight+windowPadding>window.innerHeight){menu.classList.add('t451m__overflowed');if(menuContainer)menuContainer.style.height='auto'}else{menu.classList.remove('t451m__overflowed');if(menuContainer)menuContainer.style.height=''}}
function t451_appearMenu(recid){var rec=document.getElementById('rec'+recid);var burger=rec?rec.querySelector('.t451__panel'):null;if(!burger)return;var burgerAppearOffset=burger?burger.getAttribute('data-appearoffset'):'';if(burgerAppearOffset)burgerAppearOffset=t451_appearMenuParseNumber(burgerAppearOffset);if(window.pageYOffset>=burgerAppearOffset){if(burger.classList.contains('t451__beforeready')){burger.classList.remove('t451__beforeready')}}else{burger.classList.add('t451__beforeready')}}
function t451_appearMenuParseNumber(string){if(string.indexOf('vh')>-1){string=Math.floor((window.innerHeight*(parseInt(string,10)/100)))}
return parseInt(string,10)}
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 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)}
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 t367_createCookie(cookieName,cookieValue,cookieTime){var expires='';if(cookieTime){var date=new Date();date.setTime(date.getTime()+cookieTime*24*60*60*1000);expires='; expires='+date.toGMTString()}
document.cookie=cookieName+'='+cookieValue+expires+'; path=/'}
function t367_readCookie(cookieName){cookieName=cookieName+'=';var allCookies=document.cookie.split(';');for(var i=0;i<allCookies.length;i++){var cookie=allCookies[i];while(cookie.charAt(0)===' '){cookie=cookie.substring(1,cookie.length)}
if(cookie.indexOf(cookieName)===0){return cookie.substring(cookieName.length,cookie.length)}}
return null}
function t367_autoInit(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var screenMin=rec.getAttribute('data-screen-min');var screenMax=rec.getAttribute('data-screen-max');var windowWidth=window.innerWidth;if(typeof screenMin==='string'){if(windowWidth<parseInt(screenMin,10)){return!0}}
if(typeof screenMax==='string'){if(windowWidth>parseInt(screenMax,10)){return!0}}
var openerLink=rec.querySelector('.t367__opener');if(!t367_isPopupRecVisible(openerLink))return;var linkhook=openerLink.getAttribute('href');if(!linkhook)return;var cookieName=openerLink.getAttribute('data-cookie-name');var cookieTime=openerLink.getAttribute('data-cookie-time');var cookieValue='t367cookie';var cookie=t367_readCookie(cookieName);var timeout=parseInt(openerLink.getAttribute('data-trigger-time'),10)*1000;var wrapperBlock=rec.querySelector('.t367');if(!wrapperBlock)return;if(cookie)wrapperBlock.innerHTML='';else if(openerLink){setTimeout(function(){openerLink.click();wrapperBlock.innerHTML='';t367_createCookie(cookieName,cookieValue,cookieTime)},timeout)}}
function t367_isPopupRecVisible(openerLink){if(openerLink){var linkText=openerLink.getAttribute('href');var popupElement=document.querySelector('.t-popup[data-tooltip-hook="'+linkText+'"]');if(popupElement){var popupElementRec=popupElement.closest('.r');var minScreen=popupElementRec.getAttribute('data-screen-min');if(minScreen&&minScreen!==''){minScreen=minScreen.replace('px','');if(parseInt(minScreen,10)>window.innerWidth){return!1}}
var maxScreen=popupElementRec.getAttribute('data-screen-max');if(maxScreen&&maxScreen!==''){maxScreen=maxScreen.replace('px','');if(parseInt(maxScreen,10)<window.innerWidth){return!1}}}
return!0}}
function t651_initPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t651');if(!container)return;if(window.isMobile&&!window.isTablet){var phone=rec.querySelector('.t651__phone');if(!phone)return;var phoneText=phone.textContent.replace(/\s+/g,'');var button=rec.querySelector('.t651__btn');var buttonWrapper=rec.querySelector('.t651__btn_wrapper');var buttonText=rec.querySelector('.t651__btn-text');button.addEventListener('click',function(){window.location.href='tel:'+phoneText;if(buttonWrapper)buttonWrapper.classList.remove('t651__btn_animate');if(buttonText)buttonText.style.display='none'});return}
rec.setAttribute('data-animationappear','off');rec.style.opacity=1;var popup=rec.querySelector('.t651__popup');var analitics=popup.getAttribute('data-track-popup');var hook='TildaCallBackWidget'+recId;var button=rec.querySelector('.t651__btn');button.addEventListener('click',function(event){if(button.classList.contains('t651__btn_active')){t651_closePopup();return}
button.classList.add('t651__btn_active');t651_showPopup(recId);event.preventDefault();if(analitics&&window.Tilda){Tilda.sendEventToStatistics(analitics,hook)}})}
function t651_showPopup(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var popup=rec.querySelector('.t651__popup');if(!popup)return;var buttonWrapper=rec.querySelector('.t651__btn_wrapper');var buttonText=rec.querySelector('.t651__btn-text');if(buttonWrapper)buttonWrapper.classList.remove('t651__btn_animate');if(buttonText)buttonText.style.display='none';popup.style.display='block';setTimeout(function(){popup.classList.add('t651__popup_show')},50);document.addEventListener('keydown',t651_escClosePopup)}
function t651_escClosePopup(event){if(event.key==='Escape')t651_closePopup()}
function t651_closePopup(){var buttons=document.querySelectorAll('.t651__btn');var popups=document.querySelectorAll('.t651__popup');for(var i=0;i<buttons.length;i++){buttons[i].classList.remove('t651__btn_active')}
for(var i=0;i<popups.length;i++){popups[i].classList.remove('t651__popup_show')}
setTimeout(function(){var popupHide=document.querySelectorAll('.t651__popup:not(.t651__popup_show)');for(var i=0;i<popupHide.length;i++){popupHide[i].style.display='none'}},300);document.removeEventListener('keydown',t651_escClosePopup)}
function t706_onSuccessCallback(){var products=document.querySelector('.t706__cartwin-products');var cartBottom=document.querySelector('.t706__cartwin-bottom');var cartForm=document.querySelector('.t706 .t-form__inputsbox');if(products)t706_slideUp(products,10);if(cartBottom)t706_slideUp(cartBottom,10);if(cartForm)t706_slideUp(cartForm,700);try{tcart__unlockScroll()}catch(error){}}
function t706_slideUp(target,duration){if(!target)return;if(!duration&&duration!==0)duration=500;target.style.transitionProperty='height, margin, padding';target.style.transitionDuration=duration+'ms';target.style.boxSizing='border-box';target.style.height=target.offsetHeight+'px';target.style.overflow='hidden';target.style.height='0';target.style.paddingTop='0';target.style.paddingBottom='0';target.style.marginTop='0';target.style.marginBottom='0';setTimeout(function(){target.style.display='none';target.style.height='';target.style.paddingTop='';target.style.paddingBottom='';target.style.marginTop='';target.style.marginBottom='';target.style.overflow='';target.style.transitionDuration='';target.style.transitionProperty=''},duration)}
function t868_initPopup(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;rec.setAttribute('data-animationappear','off');rec.style.opacity='1';var popup=rec.querySelector('.t-popup');if(!popup)return;var hook=popup.getAttribute('data-tooltip-hook');if(!hook)return;var analitics=popup.getAttribute('data-track-popup');var customCodeHTML=t868__readCustomCode(rec);var recBlocks=document.querySelectorAll('.r');for(var i=0;i<recBlocks.length;i++){recBlocks[i].addEventListener('click',function(event){var target=event.target;var href=target.closest('a[href$="'+hook+'"]')?target:!1;if(!href)return;event.preventDefault();t868_showPopup(rec,customCodeHTML);t_onFuncLoad('t_popup__resizePopup',function(){t_popup__resizePopup(recid)});if(hook.substring(0,7)==='#popup:'&&analitics&&window.Tilda){var virtTitle=hook;virtTitle=virtTitle.substring(7);Tilda.sendEventToStatistics(analitics,virtTitle)}})}
if(!popup.getAttribute('data-popup-inited')&&'MutationObserver' in window){popup.setAttribute('data-popup-inited','yes');var stores=document.querySelectorAll('body .t-store');Array.prototype.forEach.call(stores,function(store){new MutationObserver(function(mutationsList){for(var mutation in mutationsList){var event=mutationsList[mutation];if(event.type==='attributes'){if(event.target.className.indexOf('t-popup_show')!==-1){popup.style.zIndex='99999999';t868_initPopup(recid);}}}}).observe(store,{attributes:!0,attributeFilter:['class'],subtree:!0,})})}}
function t868__readCustomCode(rec){var codeWrap=rec.querySelector('.t868 .t868__code-wrap');if(!codeWrap)return;var customCode=codeWrap.innerHTML;return customCode}
function t868_showPopup(rec){var popup=rec.querySelector('.t-popup');if(!popup)return;var popupContainer=popup.querySelector('.t-popup__container');if(!popupContainer)return;var codeWrap=popup.querySelector('.t868__code-wrap');if(!codeWrap)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;popup.style.display='block';codeWrap.style.display='block';t868_setHeight(rec);setTimeout(function(){popupContainer.classList.add('t-popup__container-animated');popup.classList.add('t-popup_show')},100);if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t-body_popupshowed');popup.addEventListener('click',function(event){var container=event.target.closest('.t-popup__container');if(!container)t868_closePopup(rec)});var closeButton=rec.querySelector('.t-popup__close');if(closeButton){closeButton.addEventListener('click',function(){t868_closePopup(rec)})}
var buttons=rec.querySelectorAll('a[href*="#"]');Array.prototype.forEach.call(buttons,function(button){button.addEventListener('click',function(){var url=button.getAttribute('href');if(url.indexOf('#order')!==-1){var popupContainer=rec.querySelector('.t-popup__container');setTimeout(function(){while(popupContainer.firstChild){popupContainer.removeChild(popupContainer.firstChild)}},600)}
if(!url||url.substring(0,7)!=='#price:'){t868_closePopup(rec);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)}}})});document.addEventListener('keydown',function(event){if(event.keyCode===27){t868_closePopup(rec)}})}
function t868_closePopup(rec){var popup=rec.querySelector('.t-popup');var codeWrap=rec.querySelector('.t868 .t868__code-wrap');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t-body_popupshowed');popup.classList.remove('t-popup_show');setTimeout(function(){if(!popup.classList.contains('.t-popup_show')){popup.style.display='none';if(codeWrap){codeWrap.style.display='none'}}},300)}
function t868_setHeight(rec){var videoCarier=rec.querySelector('.t868__video-carier');if(!videoCarier)return;var paddingLeft=parseInt(videoCarier.style.paddingLeft,10)||0;var paddingRight=parseInt(videoCarier.style.paddingRight,10)||0;var height=(videoCarier.clientWidth-(paddingLeft+paddingRight))/(16/9);videoCarier.style.height=height;Array.prototype.forEach.call(videoCarier.closest,function(parent){parent.style.height=height})}
if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.oMatchesSelector}
if(!Element.prototype.closest){Element.prototype.closest=function(s){var el=this;while(el&&el.nodeType===1){if(Element.prototype.matches.call(el,s)){return el}
el=el.parentElement||el.parentNode}
return null}}