window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isSafari=!1;if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){window.isSafari=!0}
window.isSafariVersion='';if(window.isSafari){var version=(navigator.appVersion).match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/);if(version!==null){window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
window.isIE=!!document.documentMode;window.browserLang=(window.navigator.userLanguage||window.navigator.language).toUpperCase().slice(0,2);window.tildaBrowserLang=window.browserLang;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 t509_setHeight(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t509');if(!container)return;var images=rec.querySelectorAll('.t509__blockimg');t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)});for(var i=0;i<images.length;i++){var image=images[i];var imageWidth=image.getAttribute('data-image-width');var imageHeight=image.getAttribute('data-image-height');if(imageHeight.indexOf('vh')===-1){imageHeight=parseInt(imageHeight,10)}else{imageHeight=parseInt(imageHeight,10)/100*window.innerHeight}
var imageRatio=imageHeight/imageWidth;var imagePadding=imageRatio*100;image.style.paddingBottom=imagePadding+'%'}
if(window.innerWidth>960){var desktopImage=rec.querySelector('.t509__desktopimg');if(desktopImage){var height=desktopImage.clientHeight;var textWrappers=rec.querySelectorAll('.t509__textwrapper');for(var i=0;i<textWrappers.length;i++){textWrappers[i].style.height=height+'px'}}}}
function t830_init(recid){var rec=document.getElementById('rec'+recid);var allRec=document.getElementById('allrecords');if(!allRec||!rec)return;var panel=rec.querySelector('.t830__panel');var overlay=rec.querySelector('.t830m__overlay');var menu=rec.querySelector('.t830m');var submenu=rec.querySelector('.t830m__submenu');var burger=rec.querySelector('.t830__side .t830__burger');var menuItemList=rec.querySelectorAll('.t830m__list-title a');var submenuItemList=rec.querySelectorAll('.t830m__submenu-item a');t830_initMenu(rec,menu,burger,overlay);t830_removePadding(rec,allRec);t830_calcCol(rec,menu,allRec,!1);t_onFuncLoad('t_menu__highlightActiveLinks',function(){t_menu__highlightActiveLinks('.t830m__list a');t830_openSubmenu(rec)});t830_hoverShowMenu(rec,menu,panel,overlay,burger);window.addEventListener('resize',function(){t830_calcCol(rec,menu,allRec,!0);t830_removePadding(rec,allRec);if(menu&&menu.classList.contains('t830m_close')&&window.innerWidth>1499){if(overlay)overlay.classList.remove('t830m__menu_show')}});if(submenu&&submenu.classList.contains('t830m__submenu_close')){t830_toggleMenu(rec)}
if(window.innerWidth>1199){t830_scrollSideMenu(rec)}
var isHashNotEmpty=window.location.hash.length!==0;Array.prototype.forEach.call(menuItemList,function(menuItem){menuItem.addEventListener('click',function(){if(isHashNotEmpty){Array.prototype.forEach.call(menuItemList,function(menuEl){menuEl.classList.remove('t-active')});menuItem.classList.add('t-active')}})});Array.prototype.forEach.call(submenuItemList,function(submenuItem){submenuItem.addEventListener('click',function(){if(isHashNotEmpty){Array.prototype.forEach.call(submenuItemList,function(submenuEl){submenuEl.classList.remove('t-active')});submenuItem.classList.add('t-active')}})});t_onFuncLoad('t_menu__findAnchorLinks',function(){t_menu__findAnchorLinks(recid,'.t830m__list a')})}
function t830_calcCol(rec,menu,allrecords,isResized){if(window.innerWidth<=1199||!menu||window.getComputedStyle(rec).display==='none')return;var label=document.querySelector('.t-tildalabel');if(menu.classList.contains('t830m_open')){if(allrecords)allrecords.classList.add('t830__allrecords_padd-small');if(label)label.classList.add('t830__t-tildalabel_padd-small')}else{if(allrecords)allrecords.classList.add('t830__allrecords_padd');if(label)label.classList.add('t830__t-tildalabel_padd')}
if(isResized)return;var event=document.createEvent('Event');event.initEvent('allRecPaddingInit',!0,!0);if(allrecords)allrecords.dispatchEvent(event)}
function t830_toggleMenu(rec){var titleList=rec.querySelectorAll('.t830m__list-title_toggle');Array.prototype.forEach.call(titleList,function(listTitle){listTitle.addEventListener('click',function(){var submenu=listTitle.nextElementSibling;var textTitle=listTitle.querySelector('.t830m__list-title-text');t830_slideToggle(submenu);if(textTitle)textTitle.classList.toggle('t830m__list-title-text_opacity');if(textTitle)textTitle.classList.toggle('t-menu__link-item')})})}
function t830_openSubmenu(rec){var activeLink=rec.querySelector('.t830m__submenu-item a.t-active');var submenu=activeLink?activeLink.closest('.t830m__submenu'):null;if(submenu)submenu.style.display='block'}
function t830_hoverShowMenu(rec,menu,panel,overlay,burger){if(window.innerWidth<=1199||!panel||!panel.classList.contains('t830__panel_hover'))return;panel.addEventListener('mouseenter',function(){if(menu)menu.classList.add('t830m__menu_show');if(burger)burger.classList.add('t830__burger_open');if(overlay)overlay.classList.add('t830m__overlay_hover')});if(menu){menu.addEventListener('mouseleave',function(){menu.classList.remove('t830m__menu_show');if(burger)burger.classList.remove('t830__burger_open')})}
if(overlay){overlay.addEventListener('mouseenter',function(){overlay.classList.remove('t830m__overlay_hover');if(burger)burger.classList.remove('t830__burger_open');if(menu)menu.classList.remove('t830m__menu_show')})}
var menuLinks=menu.querySelectorAll('a');Array.prototype.forEach.call(menuLinks,function(link){link.addEventListener('click',function(){menu.classList.remove('t830m__menu_show');if(burger)burger.classList.remove('t830__burger_open')})});if(burger){burger.addEventListener('click',function(){if(burger.classList.contains('t830__burger_open')){t830_closeMenu(rec,menu,overlay);burger.classList.remove('t830__burger_open')}else{burger.classList.add('t830__burger_open');if(menu)menu.classList.add('t830m__menu_show');if(overlay)overlay.classList.add('t830m__overlay_hover')}})}}
function t830_showMenu(rec,menu,burger,overlay){var panel=rec.querySelector('.t830__panel');if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupShowed');document.body.classList.add('t830__body_menushowed');if(overlay)overlay.classList.add('t830m__menu_show');if(menu)menu.classList.add('t830m__menu_show');var closedMenuEls=rec.querySelectorAll('.t830m__overlay, .t830m__close, a[href*="#"]');closedMenuEls=Array.prototype.filter.call(closedMenuEls,function(el){return!(el.classList.contains('tooltipstered')||el.classList.contains('t794__tm-link')||el.classList.contains('t978__tm-link')||el.classList.contains('t966__tm-link'))});closedMenuEls.forEach(function(el){el.addEventListener('click',function(){t830_closeMenu(rec,menu,overlay);if(burger)burger.classList.remove('t830__burger_open')})});if(panel)panel.classList.add('t830__panel_close');var popupBg=document.querySelector('.t-site-search-popup__background');document.addEventListener('keydown',function(e){if(e.keyCode!==27||popupBg)return;if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t830__body_menushowed');if(menu)menu.classList.remove('t830m__menu_show');if(burger)burger.classList.remove('t830__burger_open');if(overlay)overlay.classList.remove('t830m__menu_show')})}
function t830_closeMenu(rec,menu,overlay){var panel=rec.querySelector('.t830__panel');if(menu&&menu.classList.contains('t830m_open')&&window.innerWidth<1500){if(panel)panel.classList.remove('t830__panel_close')}
if(typeof t_triggerEvent==='function')t_triggerEvent(document.body,'popupHidden');document.body.classList.remove('t830__body_menushowed');if(menu)menu.classList.remove('t830m__menu_show');if(overlay)overlay.classList.remove('t830m__menu_show')}
function t830_initMenu(rec,menu,burger,overlay){if(!rec)return;var panel=rec.querySelector('.t830__panel');var menuContent=rec.querySelector('.t830__menu__content');if(typeof jQuery!=='undefined'){$('.t830').bind('clickedAnchorInTooltipMenu',function(){t830_closeMenu(rec,menu,overlay)})}else{var menuBlock=document.querySelector('.t830');if(menuBlock){menuBlock.addEventListener('clickedAnchorInTooltipMenu',function(){t830_closeMenu(rec,menu,overlay)})}}
if(!panel||!menuContent||!menu)return;if(panel.classList.contains('t830__panel_click')||(panel.classList.contains('t830__panel_hover')&&window.innerWidth<=1199)){menuContent.addEventListener('click',function(e){if(menu.classList.contains('t830m__menu_show')){if(burger)burger.classList.remove('t830__burger_open');t830_closeMenu(rec,menu,overlay)}else{if(burger)burger.classList.add('t830__burger_open');t830_showMenu(rec,menu,burger,overlay)}})}}
function t830_scrollSideMenu(rec){var container=rec?rec.querySelector('.t830m__container'):null;if(!container)return;var events=['scroll','wheel','DOMMouseScroll','mousewheel'];events.forEach(function(event){container.addEventListener(event,function(e){var searchResult=rec.querySelector('.t-site-search-dm');if(!searchResult){t830_stopScroll(container,e)}})})}
function t830_stopScroll(container,eventScroll){var scrollTop=container.scrollTop;var scrollHeight=container.scrollHeight;var height=container.offsetHeight;var delta=eventScroll.type==='DOMMouseScroll'?eventScroll.detail*-40:eventScroll.wheelDelta;var up=delta>0;var prevent=function(){eventScroll.stopPropagation();eventScroll.preventDefault();eventScroll.returnValue=!1;return!1};if(!up&&-delta>scrollHeight-height-scrollTop){container.scrollTo(0,scrollHeight);return prevent()}else if(up&&delta>scrollTop){container.scrollTo(0,0);return prevent()}}
function t830_removePadding(rec,allrecords){if(!allrecords||!rec||window.getComputedStyle(rec).display!=='none')return;allrecords.classList.remove('t830__allrecords_padd');allrecords.classList.remove('t830__allrecords_padd-small');allrecords.style.paddingLeft='';var label=document.querySelector('.t-tildalabel');if(label){label.classList.remove('t830__t-tildalabel_padd');label.classList.remove('t830__t-tildalabel_padd-small');label.style.paddingLeft=''}}
function t830_slideToggle(target){if(!target)return;if(target.getAttribute('data-slide')==='y')return;if(window.getComputedStyle(target).display==='none'){return t830_slideDown(target)}else{return t830_slideUp(target)}}
function t830_slideUp(target){if(!target)return;var step=target.offsetHeight/30;var difference=target.offsetHeight;target.style.overflow='hidden';target.setAttribute('data-slide','y');var timerID=setInterval(function(){difference-=step;target.style.height=difference+'px';if(difference<=0){target.style.height='';target.style.overflow='';target.style.display='none';target.removeAttribute('data-slide');clearInterval(timerID)}},10)}
function t830_slideDown(target){if(!target)return;target.style.display='';var currentDisplayValue=window.getComputedStyle(target).display;target.style.display=currentDisplayValue==='none'?'block':currentDisplayValue;var targetHeight=target.offsetHeight;target.style.height='0';target.style.overflow='hidden';target.setAttribute('data-slide','y');var step=targetHeight/30;var difference=0;var timerID=setInterval(function(){target.style.height=difference+'px';difference+=step;if(difference>=targetHeight){target.style.height='';target.style.overflow='';target.removeAttribute('data-slide');clearInterval(timerID)}},10)}
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);if(hash.indexOf('#!/tproduct/')!==-1||hash.indexOf('#!/tab/')!==-1){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){if(document.body.getAttribute('data-scroll'))return;var scrollTargetY=t270_getTarget(hash,offset);if(isNaN(scrollTargetY))return;var body=document.body;var canSmoothScroll=window.CSS&&window.CSS.supports('scroll-behavior','smooth');if(window.isMobile&&canSmoothScroll&&'scrollBehavior' in document.documentElement.style){body.setAttribute('data-scroll','true');window.scrollTo({left:0,top:scrollTargetY,behavior:'smooth'});setTimeout(function(){body.removeAttribute('data-scroll')},500)}else{var html=document.querySelector('html');var documentHeight=Math.max(body.scrollHeight,body.offsetHeight,body.clientHeight,html.offsetHeight);var scrollY=window.scrollY||document.documentElement.scrollTop;var speed=2000;var time=Math.max(.1,Math.min(Math.abs(scrollY-scrollTargetY)/speed,.8));var currentTime=0;function t270_easeInQuad(pos){return Math.pow(pos,2)}
function t270_animationScroll(){currentTime+=1/60;var newDocumentHeight=Math.max(body.scrollHeight,body.offsetHeight,body.clientHeight,html.offsetHeight);if(documentHeight<newDocumentHeight){documentHeight=newDocumentHeight;scrollTargetY=t270_getTarget(hash,offset);scrollY=window.scrollY||document.documentElement.scrollTop;time=Math.max(.1,Math.min(Math.abs(scrollY-scrollTargetY)/speed,.8))}
var difference=currentTime/time;var animation=t270_easeInQuad(difference);if(difference<1){requestAnimationFrame(t270_animationScroll);window.scrollTo(0,scrollY+((scrollTargetY-scrollY)*animation))}else{body.removeAttribute('data-scroll');body.removeAttribute('data-scrollable');window.scrollTo(0,scrollTargetY)}}
body.setAttribute('data-scroll','true');body.setAttribute('data-scrollable','true');t270_animationScroll()}}
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)+'"]');if(!target)return}
target=parseInt((target.getBoundingClientRect().top+window.pageYOffset)-offset,10);target=Math.max(target,0);return target}
function t280_showMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var isChrome=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor);var isAndroid=/(android)/i.test(navigator.userAgent);var menu=rec.querySelector('.t280');var menuItems=rec.querySelectorAll('.t280__menu__item');var menuLinks=rec.querySelectorAll('.t978__menu-link');var menuContainer=rec.querySelector('.t280__menu');var menuBurger=menu?menu.querySelector('.t-menuburger'):null;var clickElementsList=rec.querySelectorAll('.t280 .t-menuburger, .t280__menu__bg, .t280__menu__link:not(.tooltipstered):not(.t280__menu__link_submenu), .t978__tooltip-menu_mobile');Array.prototype.forEach.call(clickElementsList,function(clickElement){clickElement.addEventListener('click',function(){if(clickElement.closest('.t280__menu__link.tooltipstered')||clickElement.closest('.t794__tm-link'))return;if(isChrome&&isAndroid&&menuItems.length>10&&window.location.hash){setTimeout(function(){var hash=window.location.hash;window.location.hash='';window.location.hash=hash},50)}
if(!clickElement.closest('.t978__tm-link, .t966__tm-link')){document.body.classList.toggle('t280_opened');if(menu)menu.classList.toggle('t280__main_opened')}
if(clickElement.classList.contains('t-menuburger')){var expandedStatus=clickElement.classList.contains('t-menuburger-opened');clickElement.setAttribute('aria-expanded',expandedStatus)}
t280_changeSize(recid);t280_highlight(recid)})});document.addEventListener('click',function(e){if(e.target.closest('.t978__tm-link, .t966__tm-link, .t-menusub__target-link, .t978__menu-link_hook')){t280_changeSize(recid);if(menuContainer)menuContainer.style.transition='none'}});Array.prototype.forEach.call(menuLinks,function(link){link.addEventListener('click',function(){t280_changeSize(recid)})});if(menu){menu.addEventListener('clickedAnchorInTooltipMenu',function(){document.body.classList.remove('t280_opened');menu.classList.remove('t280__main_opened')})}
var submenuLinks=rec.querySelectorAll('.t-menusub__link-item');Array.prototype.forEach.call(submenuLinks,function(link){link.addEventListener('click',function(){document.body.classList.remove('t280_opened');if(menu)menu.classList.remove('t280__main_opened');if(menuBurger){menuBurger.classList.remove('t-menuburger-opened');menuBurger.setAttribute('aria-expanded',!1)}})})}
function t280_changeSize(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menu=rec.querySelector('.t280__menu');var menuBottom=rec.querySelector('.t280__bottom');var menuContainer=rec.querySelector('.t280__container');var menuWrapper=rec.querySelector('.t280__menu__wrapper');setTimeout(function(){var menuHeight=menu?menu.offsetHeight:0;var menuBottomHeight=menuBottom?menuBottom.offsetHeight:0;var menuContainerHeight=menuContainer?menuContainer.offsetHeight:0;var padding=140;if(menuHeight>document.documentElement.clientHeight-(menuBottomHeight+menuContainerHeight+padding)){if(menuWrapper)menuWrapper.classList.add('t280__menu_static');if(menu)menu.style.paddingTop=(menuContainerHeight||0)+'px'}else{if(menuWrapper)menuWrapper.classList.remove('t280__menu_static');if(menu)menu.style.paddingTop=''}},100)}
function t280_changeBgOpacityMenu(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var menuBlocks=rec.querySelectorAll('.t280__container__bg');Array.prototype.forEach.call(menuBlocks,function(menu){var bgColor=menu.getAttribute('data-bgcolor-rgba');var bgColorAfterScroll=menu.getAttribute('data-bgcolor-rgba-afterscroll');var bgOpacity=menu.getAttribute('data-bgopacity');var bgOpacityTwo=menu.getAttribute('data-bgopacity2');var menuShadowOpacity=parseInt(menu.getAttribute('data-menushadow'),10)||0;menuShadowOpacity/=100;var menuShadowCSS=menu.getAttribute('data-menushadow-css');menu.style.backgroundColor=window.pageYOffset>20?bgColorAfterScroll:bgColor;if((window.pageYOffset>20&&bgOpacityTwo==='0')||(window.pageYOffset<=20&&(bgOpacity==='0.0'||bgOpacity==='0'))||(!menuShadowOpacity&&!menuShadowCSS)){menu.style.boxShadow='none'}else if(menuShadowCSS){menu.style.boxShadow=menuShadowCSS}else if(menuShadowOpacity){menu.style.boxShadow='0px 1px 3px rgba(0,0,0,'+menuShadowOpacity+')'}})}
function t280_appearMenu(){var menuBlocks=document.querySelectorAll('.t280');Array.prototype.forEach.call(menuBlocks,function(menuBlock){var menu=menuBlock.querySelector('.t280__positionfixed');if(menu){var appearOffset=menuBlock.getAttribute('data-appearoffset');if(appearOffset&&appearOffset.indexOf('vh')!==-1){appearOffset=Math.floor((window.innerHeight*(parseInt(appearOffset)/100)))}
appearOffset=parseInt(appearOffset,10);var menuHeight=menu.clientHeight;if(isNaN(appearOffset))return;if(window.pageYOffset>=appearOffset){if(menu.style.transform==='translateY(-'+menuHeight+'px)'){t280_slideUpElement(menu,menuHeight,'toBottom')}}else if(menu.style.transform==='translateY(0px)'){t280_slideUpElement(menu,menuHeight,'toTop')}else{menu.style.transform='translateY(-'+menuHeight+'px)';menu.style.opacity='0'}}})}
function t280_slideUpElement(menu,menuHeight,direction){var diff=direction==='toTop'?0:menuHeight;var diffOpacity=direction==='toTop'?1:0;var timerID=setInterval(function(){menu.style.transform='translateY(-'+diff+'px)';menu.style.opacity=diffOpacity.toString();diffOpacity=direction==='toTop'?diffOpacity-0.1:diffOpacity+0.1;diff=direction==='toTop'?diff+(menuHeight/20):diff-(menuHeight/20);if(direction==='toTop'&&diff>=menuHeight){menu.style.transform='translateY(-'+menuHeight+'px)';menu.style.opacity='0';clearInterval(timerID)}
if(direction==='toBottom'&&diff<=0){menu.style.transform='translateY(0px)';menu.style.opacity='1';clearInterval(timerID)}},10)}
function t280_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('.t280__menu a[href=\''+url+'\'], '+'.t280__menu a[href=\''+url+'/\'], '+'.t280__menu a[href=\''+pathname+'\'], '+'.t280__menu a[href=\'/'+pathname+'\'], '+'.t280__menu a[href=\''+pathname+'/\'], '+'.t280__menu a[href=\'/'+pathname+'/\']'+(hash?', .t280__menu a[href=\''+hash+'\']':'')+(hash?', .t280__menu a[href=\'/'+hash+'\']':'')+(hash?', .t280__menu a[href=\''+hash+'/\']':'')+(hash?', .t280__menu a[href=\'/'+hash+'/\']':''));var rec=document.getElementById('rec'+recid);var menuLinks=rec?rec.querySelectorAll('.t280__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 t985_init(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;if(searchVariants.length>0){t985_addSearchVariants(recid,searchVariants)}
var searchWidgetIcon=rec.querySelectorAll('.t985__search-widget-icon');Array.prototype.forEach.call(searchWidgetIcon,function(widgetIcon){widgetIcon.addEventListener('click',function(){t985_showSearch(rec)})});var closeIcon=rec.querySelector('.t985__close-icon');if(closeIcon){closeIcon.addEventListener('click',function(){t985_hideSearch(rec)})}
var overlay=rec.querySelector('.t985__overlay');if(overlay){overlay.addEventListener('click',function(event){var target=event.target;var parentTarget=target.parentElement;if(!target.classList.contains('.t985__widgetheader')&&!parentTarget.classList.contains('.t985__widgetheader')){t985_hideSearch(rec)}})}}
function t985_addSearchVariants(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;var container=rec.querySelector('.t985__searchvariants');var cleanVariants=searchVariants.replace(/(<([^>]+)>)/gi,'')
var searchArray=cleanVariants.split(',');Array.prototype.forEach.call(searchArray,function(variant){container.innerHTML+='<div class="t985__searchvariant t-text t-text_xs">'+variant+'</div>'})}
function t985_showSearch(rec){rec.querySelector('.t985__overlay').style.display='block';rec.querySelector('.t985__search-widget-icon').style.display='none'}
function t985_hideSearch(rec){rec.querySelector('.t985__overlay').style.display='none';rec.querySelector('.t985__search-widget-icon').style.display='block'}
function t890_init(recId,offset){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t890');if(!container)return;var windowOffset=offset||window.innerHeight;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;window.addEventListener('scroll',t_throttle(function(){if(window.pageYOffset>windowOffset){container.style.display='block'}else{t890__fadeOut(container)}},200));var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);rec.addEventListener('click',function(e){if(e.target.closest('.t890__arrow')){isSafari?t890__animateScrollPolyfill(0):t890__scrollToTop()}})}
function t890__fadeOut(el){if(el.style.display==='none')return;var opacity=1;var timer=setInterval(function(){el.style.opacity=opacity;opacity-=0.1;if(opacity<=0.1){clearInterval(timer);el.style.display='none';el.style.opacity=null}},20)}
function t890__scrollToTop(){if(window.isIE){window.scrollTo(0,0)}else{window.scrollTo({left:0,top:0,behavior:'smooth'})}}
function t890__animateScrollPolyfill(target){var documentHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var bottomViewportPoint=documentHeight-document.documentElement.clientHeight;if(target>bottomViewportPoint)target=bottomViewportPoint;if(target===window.pageYOffset)return!1;var currentPosition=window.pageYOffset;var step=(target-currentPosition)/30;var difference=window.pageYOffset;var timerID=setInterval(function(){difference+=step;window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if((target-currentPosition<0&&window.pageYOffset<=target)||(target-currentPosition>0&&window.pageYOffset>=target)){clearInterval(timerID);document.body.removeAttribute('data-scrollable')}},10)}