window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isFirefox=/firefox/i.test(navigator.userAgent);window.isOpera=(!!window.opr&&!!window.opr.addons)||!!window.opera||navigator.userAgent.indexOf(' OPR/')>=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 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});t794_addArrow(recid,hookLinks);t794_setUpMenu(recid,hookLinks);t794_highlight()}
function t794_setUpMenu(recid,hookLinks){var rec=document.getElementById('rec'+recid);var submenu=rec?rec.querySelector('.t794__tooltip-menu'):null;if(!submenu)return;var content=submenu.querySelector('.t794__content');if(window.isMobile){t794_setUpMenu_mobile(recid,hookLinks,submenu)}else{t794_setUpMenu_desktop(recid,hookLinks,submenu)}
window.addEventListener('scroll',t_throttle(function(){if(content){content.addEventListener('mouseleave',function(){if(submenu.classList.contains('t794__tooltip-menu_show')){t794_hideSubmenu(submenu)}})}},300));var tooltipLinks=document.querySelectorAll('.t794__tooltip-menu a[href*="#"]');Array.prototype.forEach.call(tooltipLinks,function(tooltipLink){tooltipLink.addEventListener('click',function(){t794_hideSubmenu(submenu);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 t794_setUpMenu_mobile(recid,hookLinks,submenu){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t794'):null;if(!menu)return;var verticalIndent=menu?menu.getAttribute('data-tooltip-margin'):'';hookLinks.forEach(function(hookLink){hookLink.addEventListener('click',function(e){e.preventDefault();if(submenu&&submenu.classList.contains('t794__tooltip-menu_show')){t794_hideSubmenu(submenu)}else{t794_showSubmenu(hookLink,submenu,verticalIndent)}})});document.addEventListener('click',function(e){var currentAnchor=e.target.closest('.t794__tm-link');if(currentAnchor&&currentAnchor.getAttribute('data-tooltip-menu-id')!==recid&&submenu&&submenu.classList.contains('t794__tooltip-menu_show')){t794_hideSubmenu(submenu)}
var insideMenu=e.target.closest('.t794__tooltip-menu');if(!insideMenu&&!currentAnchor&&submenu&&submenu.classList.contains('t794__tooltip-menu_show')){t794_hideSubmenu(submenu)}})}
function t794_setUpMenu_desktop(recid,hookLinks,submenu){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t794'):null;var verticalIndent=menu?menu.getAttribute('data-tooltip-margin'):'';var timer;var hooksAndSubmenu=hookLinks.concat(submenu);hooksAndSubmenu.forEach(function(el){el.addEventListener('mouseover',function(){if(el.classList.contains('t794__tooltip-menu')&&!el.classList.contains('t794__tooltip-menu_show'))return;if(timer)clearTimeout(timer);if(el.classList.contains('t794__tooltip-menu')&&el.classList.contains('t794__tooltip-menu_show'))return;t794_showSubmenu(el,submenu,verticalIndent)});el.addEventListener('mouseout',function(){timer=setTimeout(function(){t794_hideSubmenu(submenu)},300)})});hookLinks.forEach(function(hookLink){hookLink.addEventListener('click',function(e){e.preventDefault()})})}
function t794_showSubmenu(currentAnchor,submenu,verticalIndent){submenu.style.display='block';var submenuHeight=submenu.offsetHeight;var submenuWidth=submenu.offsetWidth;submenu.style.display='';var anchorHeight=t794_getValueWithoutPadding(currentAnchor,'height');var anchorWidth=t794_getValueWithoutPadding(currentAnchor,'width');if(currentAnchor.classList.contains('t-btn')){anchorWidth=currentAnchor.offsetWidth}
var scrollTop=window.pageYOffset;var anchorLeft=currentAnchor.getBoundingClientRect().left+window.pageXOffset;var anchorTop=currentAnchor.getBoundingClientRect().top+window.pageYOffset;var parentZeroMenu=currentAnchor.closest('.t396__artboard');if(parentZeroMenu&&parentZeroMenu.classList.contains('t396__artboard_scale')&&window.tn_scale_factor&&!window.isFirefox&&!window.isOpera){anchorTop*=window.tn_scale_factor}
submenu.setAttribute('data-pos-fixed','no');var parentMenu=currentAnchor.closest('[data-menu="yes"]');if(parentMenu&&(parentMenu.style.position==='fixed'||window.getComputedStyle(parentMenu).position==='fixed')){submenu.setAttribute('data-pos-fixed','yes')}
var menuFixed=submenu.getAttribute('data-pos-fixed');var submenuContent=submenu.querySelector('.t794__content');if(verticalIndent){verticalIndent=parseInt(verticalIndent,10);verticalIndent+=10}
var axisY;if(menuFixed==='yes'){axisY=(anchorTop-scrollTop)+anchorHeight+verticalIndent;submenu.style.position='fixed';submenu.classList.remove('t794__tooltip-menu_top');submenu.classList.add('t794__tooltip-menu_bottom');if(submenuContent)submenuContent.maxHeight='calc(100vh - '+axisY+'px)'}else{axisY=anchorTop+anchorHeight+verticalIndent;submenu.style.position='absolute';var topSpace=anchorTop-scrollTop;var bottomSpace=window.innerHeight-topSpace;if(axisY+submenuHeight>scrollTop+window.innerHeight&&topSpace>bottomSpace){axisY=axisY-submenuHeight-anchorHeight-verticalIndent*2;submenu.classList.remove('t794__tooltip-menu_bottom');submenu.classList.add('t794__tooltip-menu_top')}else{submenu.classList.remove('t794__tooltip-menu_top');submenu.classList.add('t794__tooltip-menu_bottom')}}
var axisX=anchorLeft;if(parentZeroMenu&&parentZeroMenu.classList.contains('t396__artboard_scale')&&window.tn_scale_factor){axisX=window.isFirefox||window.isOpera?axisX:axisX*window.tn_scale_factor;anchorWidth=anchorWidth*window.tn_scale_factor}
if(axisX+submenuWidth/2<window.innerWidth){axisX=axisX+(anchorWidth-submenuWidth)/2;if(axisX<0){axisX=10}}else{axisX=window.innerWidth-submenuWidth-10}
submenu.style.display='block';submenu.style.left=axisX+'px';submenu.style.top=axisY+'px';submenu.offsetHeight;submenu.classList.add('t794__tooltip-menu_show');currentAnchor.classList.add('t794__tm-link_active')}
function t794_hideSubmenu(submenu){submenu.style.display='';submenu.style.left='';submenu.style.top='';submenu.classList.remove('t794__tooltip-menu_show');var activeLinks=document.querySelectorAll('.t794__tm-link_active');Array.prototype.forEach.call(activeLinks,function(activeLink){activeLink.classList.remove('t794__tm-link_active')})}
function t794_addArrow(recid,hookLinks){var rec=document.getElementById('rec'+recid);var menu=rec?rec.querySelector('.t794'):null;var isArrowAppend=menu.getAttribute('data-add-arrow');if(!isArrowAppend)return;hookLinks.forEach(function(hookLink){var arrow=document.createElement('div');arrow.classList.add('t794__arrow');hookLink.appendChild(arrow);var isZero=hookLink.classList.contains('tn-atom');var hasCustomBorderColor=window.getComputedStyle(hookLink).borderColor!=='rgba(0, 0, 0, 0)';if(isZero&&!hasCustomBorderColor){hookLink.style.borderColor='initial';hookLink.style.border='none'}})}
function t794_highlight(){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('.t794__list_item a[href=\''+url+'\'], '+'.t794__list_item a[href=\''+url+'/\'], '+'.t794__list_item a[href=\''+pathname+'\'], '+'.t794__list_item a[href=\'/'+pathname+'\'], '+'.t794__list_item a[href=\''+pathname+'/\'], '+'.t794__list_item a[href=\'/'+pathname+'/\']'+(hash?', .t794__list_item a[href="'+hash+'"]':''));Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
function t794_getValueWithoutPadding(el,value){if(!el)return 0;var elWidth=el.offsetWidth||parseInt(window.getComputedStyle(el).width,10);var elHeight=el.offsetHeight||parseInt(window.getComputedStyle(el).height,10);switch(value){case 'width':var paddingLeft=el.style.paddingLeft||parseInt(window.getComputedStyle(el).paddingLeft,10);var paddingRight=el.style.paddingLeft||parseInt(window.getComputedStyle(el).paddingRight,10);return elWidth-(paddingLeft+paddingRight);case 'height':var paddingTop=el.style.paddingTop||parseInt(window.getComputedStyle(el).paddingTop,10);var paddingBottom=el.style.paddingBottom||parseInt(window.getComputedStyle(el).paddingBottom,10);return elHeight-(paddingTop+paddingBottom)}}
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*="#"]');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)}}});t450_highlight(recid)}
function t450_closeMenu(menu,overlay){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');if(container)container.style.height='auto'}else{menu.classList.remove('t450__overflowed');if(container)container.style.height=''}})}
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){link.classList.remove('t-active')});Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
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)}