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 t121_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t121');var videoLazy=rec.querySelector('.t-video-lazyload');if(videoLazy){t_onFuncLoad('t_video_lazyload__setHeight',function(){var videoHeight=videoLazy.getAttribute('data-videolazy-height');if(videoHeight!=='540px')return;t_video_lazyload__setHeight(videoLazy);window.addEventListener('resize',function(){t_video_lazyload__setHeight(videoLazy)});if(!wrapperBlock)return;wrapperBlock.addEventListener('displayChanged',function(){t_video_lazyload__setHeight(videoLazy)})})}
var videoCarrier=rec.querySelector('.t-video-carier');if(!videoCarrier)return;var screenMin=rec.getAttribute('data-screenmin');var screenMax=rec.getAttribute('data-screenmax');var isLoad=!1;if(window.innerWidth<parseInt(screenMin,10)||window.innerWidth>parseInt(screenMax,10))return;window.addEventListener('scroll',t_throttle(function(){if(!isLoad){var videoCarrierOffsetTop=videoCarrier.getBoundingClientRect().top+window.pageYOffset;var videoCarrierHeight=parseInt(window.getComputedStyle(videoCarrier).height,10);var windowScrollTop=window.pageYOffset;var windowHeight=window.innerHeight;if(windowScrollTop+windowHeight>videoCarrierOffsetTop-500&&windowScrollTop<videoCarrierOffsetTop+videoCarrierHeight+501){t_onFuncLoad('processYoutubeVideo',function(){processYoutubeVideo(videoCarrier,videoCarrier.style.height)});isLoad=!0}}}));var event=document.createEvent('HTMLEvents');event.initEvent('scroll',!0,!1);window.dispatchEvent(event)}
function t456_setListMagin(recid,imglogo){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<=980)return;var menu=rec.querySelector('.t456');var leftSide=menu?menu.querySelector('.t456__leftwrapper'):null;var list=menu?menu.querySelector('.t456__list'):null;var leftSideWidth=leftSide?leftSide.offsetWidth:0;if(list)list.style.marginRight=(imglogo?leftSideWidth:leftSideWidth+30)+'px'}