window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t1032_init(recId){var rec=document.querySelector('#rec'+recId);if(!rec)return;t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)});var orderLinks=rec.querySelectorAll('a[href^="#order"]');if(orderLinks.length!==0){Array.prototype.forEach.call(orderLinks,function(orderLink){orderLink.addEventListener('click',function(){var linkElement=this;var payBoxElement=document.querySelector('.js-payment-systembox');t1032_setCoordinateToPaymentBox(linkElement,payBoxElement);payBoxElement.style.marginTop='0';payBoxElement.style.marginLeft='0';window.addEventListener('resize',function(){if(getComputedStyle(payBoxElement,null).display==='block'&&linkElement){t1032_setCoordinateToPaymentBox(linkElement,payBoxElement)}})})})}}
function t1032_setCoordinateToPaymentBox(linkElement,payBoxElement){var oldTopCoord=0;var newTopCoord=0;var linkTopOffset=linkElement.getBoundingClientRect().top+window.pageYOffset;var linkLeftOffset=linkElement.getBoundingClientRect().left+window.pageXOffset;var offsetParent=linkElement.closest('.t1032__col');var offsetParentDimensions=t1032_getElementDimension(offsetParent);var payBoxDimensions=t1032_getElementDimension(payBoxElement);var paddingParent=offsetParentDimensions.paddingLeft+offsetParentDimensions.paddingRight;var top=linkTopOffset+offsetParentDimensions.height-payBoxDimensions.height;var left=linkLeftOffset+(offsetParentDimensions.width-paddingParent)/2-payBoxDimensions.width/2;oldTopCoord=payBoxElement.style.top;payBoxElement.style.top=top+'px';payBoxElement.style.left=left+'px';newTopCoord=payBoxElement.style.top;var difference=21;if(parseInt(oldTopCoord,10)-parseInt(newTopCoord,10)===difference){payBoxElement.style.top=top+difference+'px'}
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}}}
function t1032_unifyHeights(recId){var rec=document.querySelector('#rec'+recId);if(!rec)return;var container=rec.querySelector(' .t1032 .t-container');if(!container)return;var allRows=container.querySelectorAll('.t1032__row');for(var i=0;i<allRows.length;i++){var allTitles=allRows[i].querySelectorAll('.t-card__title');var allDescriptions=allRows[i].querySelectorAll('.t-card__descr');var allWrappers=allRows[i].querySelectorAll('.t1032__wrapper');var highestTitle=0;var highestDescription=0;var highestWrapper=0;Array.prototype.forEach.call(allTitles,function(title){title.style.height='auto';var titleDimension=t1032_getElementDimension(title);if(titleDimension.height>highestTitle){highestTitle=titleDimension.height}});if(window.innerWidth>=960&&t1032_isVisible(container)){Array.prototype.forEach.call(allTitles,function(title){title.style.height=highestTitle+'px'})}else{Array.prototype.forEach.call(allTitles,function(title){title.style.height='auto'})}
Array.prototype.forEach.call(allDescriptions,function(description){description.style.height='auto';var descriptionDimension=t1032_getElementDimension(description);if(descriptionDimension.height>highestDescription){highestDescription=descriptionDimension.height}});if(window.innerWidth>=960&&t1032_isVisible(container)){Array.prototype.forEach.call(allDescriptions,function(description){description.style.height=highestDescription+'px'})}else{Array.prototype.forEach.call(allDescriptions,function(description){description.style.height='auto'})}
Array.prototype.forEach.call(allWrappers,function(wrapper){wrapper.style.height='auto';var wrapperDimension=t1032_getElementDimension(wrapper);if(wrapperDimension.height>highestWrapper){highestWrapper=wrapperDimension.height}});if(window.innerWidth>=960&&t1032_isVisible(container)){Array.prototype.forEach.call(allWrappers,function(wrapper){wrapper.style.height=highestWrapper+'px'})}else{Array.prototype.forEach.call(allWrappers,function(wrapper){wrapper.style.height='auto'})}}}
function t1032_getElementDimension(element){var zeroes={height:0,width:0,paddingLeft:0,paddingRight:0,}
if(!element)return zeroes;var elStyle=getComputedStyle(element);if(!elStyle)return zeroes;return{height:parseFloat(elStyle.height.replace('px',''),10),width:parseFloat(elStyle.width.replace('px',''),10),paddingLeft:parseFloat(elStyle.paddingLeft.replace('px',''),10),paddingRight:parseFloat(elStyle.paddingRight.replace('px',''),10),}}
function t1032_isVisible(element){return!!(element.offsetWidth||element.offsetHeight||element.getClientRects().length)}
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()})})})}}
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)});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}