function t142_checkSize(recid){var el=$("#rec"+recid).find(".t142__submit");if(el.length){var btnheight=el.height()+5;var textheight=el[0].scrollHeight;if(btnheight<textheight){var btntext=el.text();el.addClass("t142__submit-overflowed")}}}
function t190_scrollToTop(){$('html, body').animate({scrollTop:0},700)}
function t213_init(recid){var el=$("#t213-marker"+recid);var cotimer;var wnd=$(window);var bdy=$('body');var needcolor=el.attr("data-bg-color");bdy.css("transition","background-color 1000ms linear");if(window.t213higher===undefined)window.t213higher=1000000;if(window.t213higher>el.offset().top){window.t213higher=el.offset().top;window.t213higher_id=recid}
var bodydefcolor=bdy.css("background-color");var timer_count=0;wnd.scroll(function(){if(cotimer){window.clearTimeout(cotimer);if(timer_count>=15){t212_timer_do(el,wnd,bdy,needcolor,bodydefcolor,recid)}
timer_count++}
cotimer=window.setTimeout(function(){t212_timer_do(el,wnd,bdy,needcolor,bodydefcolor,recid);timer_count=0},100)});wnd.scroll()}
function t212_timer_do(el,wnd,bdy,needcolor,bodydefcolor,recid){var a,c,d,bc;a=el.offset().top;c=wnd.scrollTop();d=wnd.height();bc=bdy.attr("data-bg-color");if((c+d)>=a){bdy.css("background-color",needcolor)}else{if(window.t213higher_id==recid){bdy.css("background-color",bodydefcolor)}}}
function t228__init(recid){var el=$('#rec'+recid);var mobile=el.find('.t228__mobile');var fixedBlock=mobile.css('position')==='fixed'&&mobile.css('display')==='block';setTimeout(function(){el.find('.t-menu__link-item:not(.t-menusub__target-link):not(.tooltipstered):not(.t794__tm-link)').on('click',function(){if($(this).is(".t-menu__link-item.tooltipstered, .t-menu__link-item.t-menusub__target-link, .t-menu__link-item.t794__tm-link")){return}
if(fixedBlock){mobile.trigger('click')}});el.find('.t-menusub__link-item').on('click',function(){if(fixedBlock){mobile.trigger('click')}});el.find('.t228__right_buttons_but .t-btn').on('click',function(){if(fixedBlock){mobile.trigger('click')}})},500);el.find(".t228__centerside").removeClass("t228__centerside_hidden")}
function t228_highlight(){var url=window.location.href;var pathname=window.location.pathname;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="/"}
$(".t228__list_item a[href='"+url+"']").addClass("t-active");$(".t228__list_item a[href='"+url+"/']").addClass("t-active");$(".t228__list_item a[href='"+pathname+"']").addClass("t-active");$(".t228__list_item a[href='/"+pathname+"']").addClass("t-active");$(".t228__list_item a[href='"+pathname+"/']").addClass("t-active");$(".t228__list_item a[href='/"+pathname+"/']").addClass("t-active")}
function t228_checkAnchorLinks(recid){var el=$('#rec'+recid);if($(window).width()>980){var t228_navLinks=el.find(".t228__list_item a:not(.tooltipstered)[href*='#']");if(t228_navLinks.length>0){setTimeout(function(){t228_catchScroll(t228_navLinks)},500)}}}
function t228_catchScroll(t228_navLinks){var t228_clickedSectionId=null,t228_sections=[],t228_sectionIdTonavigationLink=[],t228_interval=100,t228_lastCall,t228_timeoutId;t228_navLinks=$(t228_navLinks.get().reverse());t228_navLinks.each(function(){var t228_cursection=t228_getSectionByHref($(this));if(typeof t228_cursection.attr("id")!="undefined"){t228_sections.push(t228_cursection)}
t228_sectionIdTonavigationLink[t228_cursection.attr("id")]=$(this)});t228_sections.sort(function(a,b){return b.offset().top-a.offset().top});t228_highlightNavLinks(t228_navLinks,t228_sections,t228_sectionIdTonavigationLink,t228_clickedSectionId);t228_navLinks.click(function(){var clickedSection=t228_getSectionByHref($(this));if(!$(this).hasClass("tooltipstered")&&typeof clickedSection.attr("id")!="undefined"){t228_navLinks.removeClass('t-active');$(this).addClass('t-active');t228_clickedSectionId=t228_getSectionByHref($(this)).attr("id")}});$(window).scroll(function(){var t228_now=new Date().getTime();if(t228_lastCall&&t228_now<(t228_lastCall+t228_interval)){clearTimeout(t228_timeoutId);t228_timeoutId=setTimeout(function(){t228_lastCall=t228_now;t228_clickedSectionId=t228_highlightNavLinks(t228_navLinks,t228_sections,t228_sectionIdTonavigationLink,t228_clickedSectionId)},t228_interval-(t228_now-t228_lastCall))}else{t228_lastCall=t228_now;t228_clickedSectionId=t228_highlightNavLinks(t228_navLinks,t228_sections,t228_sectionIdTonavigationLink,t228_clickedSectionId)}})}
function t228_getSectionByHref(curlink){var curLinkValue=curlink.attr('href').replace(/\s+/g,'').replace(/.*#/,'');if(curlink.is('[href*="#rec"]')){return $(".r[id='"+curLinkValue+"']")}else{return $(".r[data-record-type='215']").has("a[name='"+curLinkValue+"']")}}
function t228_highlightNavLinks(t228_navLinks,t228_sections,t228_sectionIdTonavigationLink,t228_clickedSectionId){var t228_scrollPosition=$(window).scrollTop();var t228_valueToReturn=t228_clickedSectionId;if(t228_sections.length!==0&&t228_clickedSectionId===null&&t228_sections[t228_sections.length-1].offset().top>(t228_scrollPosition+300)){t228_navLinks.removeClass('t-active');return null}
$(t228_sections).each(function(e){var t228_curSection=$(this),t228_id=t228_curSection.attr('id'),t228_sectionTop=t228_curSection.offset().top,t228_navLink=t228_sectionIdTonavigationLink[t228_id];if(((t228_scrollPosition+300)>=t228_sectionTop)||(t228_sections[0].attr("id")==t228_id&&t228_scrollPosition>=$(document).height()-$(window).height())){if(t228_clickedSectionId==null&&!t228_navLink.hasClass('t-active')){t228_navLinks.removeClass('t-active');t228_navLink.addClass('t-active');t228_valueToReturn=null}else{if(t228_clickedSectionId!=null&&t228_id==t228_clickedSectionId){t228_valueToReturn=null}}
return!1}});return t228_valueToReturn}
function t228_setWidth(recid){var el=$('#rec'+recid);if($(window).width()>980){el.find(".t228").each(function(){var el=$(this);var left_exist=el.find('.t228__leftcontainer').length;var left_w=el.find('.t228__leftcontainer').outerWidth(!0);var max_w=left_w;var right_exist=el.find('.t228__rightcontainer').length;var right_w=el.find('.t228__rightcontainer').outerWidth(!0);var items_align=el.attr('data-menu-items-align');if(left_w<right_w)max_w=right_w;max_w=Math.ceil(max_w);var center_w=0;el.find('.t228__centercontainer').find('li').each(function(){center_w+=$(this).outerWidth(!0)});var padd_w=40;var maincontainer_width=el.find(".t228__maincontainer").outerWidth();if(maincontainer_width-max_w*2-padd_w*2>center_w+20){if(items_align=="center"||typeof items_align==="undefined"){el.find(".t228__leftside").css("min-width",max_w+"px");el.find(".t228__rightside").css("min-width",max_w+"px");el.find(".t228__list").removeClass("t228__list_hidden")}}else{el.find(".t228__leftside").css("min-width","");el.find(".t228__rightside").css("min-width","")}})}
el.find(".t228__centerside").removeClass("t228__centerside_hidden")}
function t228_setBg(recid){var el=$('#rec'+recid);if($(window).width()>980){el.find(".t228").each(function(){var el=$(this);if(el.attr('data-bgcolor-setbyscript')=="yes"){var bgcolor=el.attr("data-bgcolor-rgba");el.css("background-color",bgcolor)}})}else{el.find(".t228").each(function(){var el=$(this);var bgcolor=el.attr("data-bgcolor-hex");el.css("background-color",bgcolor);el.attr("data-bgcolor-setbyscript","yes")})}}
function t228_appearMenu(recid){var el=$('#rec'+recid);if($(window).width()>980){el.find(".t228").each(function(){var el=$(this);var appearoffset=el.attr("data-appearoffset");if(appearoffset!=""){if(appearoffset.indexOf('vh')>-1){appearoffset=Math.floor((window.innerHeight*(parseInt(appearoffset)/100)))}
appearoffset=parseInt(appearoffset,10);if($(window).scrollTop()>=appearoffset){if(el.css('visibility')=='hidden'){el.finish();el.css("top","-50px");el.css("visibility","visible");var topoffset=el.data('top-offset');if(topoffset&&parseInt(topoffset)>0){el.animate({"opacity":"1","top":topoffset+"px"},200,function(){})}else{el.animate({"opacity":"1","top":"0px"},200,function(){})}}}else{el.stop();el.css("visibility","hidden");el.css("opacity","0")}}})}}
function t228_changebgopacitymenu(recid){var el=$('#rec'+recid);if($(window).width()>980){el.find(".t228").each(function(){var el=$(this);var bgcolor=el.attr("data-bgcolor-rgba");var bgcolor_afterscroll=el.attr("data-bgcolor-rgba-afterscroll");var bgopacityone=el.attr("data-bgopacity");var bgopacitytwo=el.attr("data-bgopacity-two");var menushadow=el.attr("data-menushadow");if(menushadow=='100'){var menushadowvalue=menushadow}else{var menushadowvalue='0.'+menushadow}
if($(window).scrollTop()>20){el.css("background-color",bgcolor_afterscroll);if(bgopacitytwo=='0'||(typeof menushadow=="undefined"&&menushadow==!1)){el.css("box-shadow","none")}else{el.css("box-shadow","0px 1px 3px rgba(0,0,0,"+menushadowvalue+")")}}else{el.css("background-color",bgcolor);if(bgopacityone=='0.0'||(typeof menushadow=="undefined"&&menushadow==!1)){el.css("box-shadow","none")}else{el.css("box-shadow","0px 1px 3px rgba(0,0,0,"+menushadowvalue+")")}}})}}
function t228_createMobileMenu(recid){var el=$("#rec"+recid);var menu=el.find(".t228");var burger=el.find(".t228__mobile");burger.on('click',function(e){menu.fadeToggle(300);burger.toggleClass("t228_opened")});$(window).bind('resize',t_throttle(function(){if($(window).width()>980){menu.fadeIn(0)}}))}
function t270_scroll(hash,offset,speed){if(hash.indexOf('#!/tproduct/')!==-1||hash.indexOf('#!/tab/')!==-1){return!0}
var $root=$('html, body');var target="";if(speed===undefined){speed=500}
try{target=$(hash)}catch(event){console.log("Exception t270: "+event.message);return!0}
if(target.length===0){target=$('a[name="'+hash.substr(1)+'"]');if(target.length===0){return!0}}
$root.animate({scrollTop:target.offset().top-offset},speed,function(){if(history.pushState){history.pushState(null,null,hash)}else{window.location.hash=hash}});return!0}
function t396_init(recid){var data='';var res=t396_detectResolution();t396_initTNobj();t396_switchResolution(res);t396_updateTNobj();t396_artboard_build(data,recid);window.tn_window_width=$(window).width();$(window).resize(function(){tn_console('>>>> t396: Window on Resize event >>>>');t396_waitForFinalEvent(function(){if($isMobile){var ww=$(window).width();if(ww!=window.tn_window_width){t396_doResize(recid)}}else{t396_doResize(recid)}},500,'resizeruniqueid'+recid)});$(window).on("orientationchange",function(){tn_console('>>>> t396: Orient change event >>>>');t396_waitForFinalEvent(function(){t396_doResize(recid)},600,'orientationuniqueid'+recid)});$(window).load(function(){var ab=$('#rec'+recid).find('.t396__artboard');t396_allelems__renderView(ab);if(typeof t_lazyload_update==='function'&&ab.css('overflow')==='auto'){ab.bind('scroll',t_throttle(function(){if(window.lazy==='y'||$('#allrecords').attr('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},500))}if(window.location.hash!==''&&ab.css('overflow')==='visible'){ab.css('overflow','hidden');setTimeout(function(){ab.css('overflow','visible')},1)}});var rec=$('#rec'+recid);if(rec.attr('data-connect-with-tab')=='yes'){rec.find('.t396').bind('displayChanged',function(){var ab=rec.find('.t396__artboard');t396_allelems__renderView(ab)})}}function t396_doResize(recid){var ww;if($isMobile){ww=$(window).width()}else{ww=window.innerWidth}window.tn_window_width=ww;var res=t396_detectResolution();var ab=$('#rec'+recid).find('.t396__artboard');t396_switchResolution(res);t396_updateTNobj();t396_ab__renderView(ab);t396_allelems__renderView(ab)}function t396_detectResolution(){var ww;if($isMobile){ww=$(window).width()}else{ww=window.innerWidth}var res;res=1200;if(ww<1200){res=960}if(ww<960){res=640}if(ww<640){res=480}if(ww<480){res=320}return(res)}function t396_initTNobj(){tn_console('func: initTNobj');window.tn={};window.tn.canvas_min_sizes=["320","480","640","960","1200"];window.tn.canvas_max_sizes=["480","640","960","1200",""];window.tn.ab_fields=["height","width","bgcolor","bgimg","bgattachment","bgposition","filteropacity","filtercolor","filteropacity2","filtercolor2","height_vh","valign"]}function t396_updateTNobj(){tn_console('func: updateTNobj');if(typeof window.zero_window_width_hook!='undefined'&&window.zero_window_width_hook=='allrecords'&&$('#allrecords').length){window.tn.window_width=parseInt($('#allrecords').width())}else{window.tn.window_width=parseInt($(window).width())}window.tn.window_height=parseInt($(window).height());if(window.tn.curResolution==1200){window.tn.canvas_min_width=1200;window.tn.canvas_max_width=window.tn.window_width}if(window.tn.curResolution==960){window.tn.canvas_min_width=960;window.tn.canvas_max_width=1200}if(window.tn.curResolution==640){window.tn.canvas_min_width=640;window.tn.canvas_max_width=960}if(window.tn.curResolution==480){window.tn.canvas_min_width=480;window.tn.canvas_max_width=640}if(window.tn.curResolution==320){window.tn.canvas_min_width=320;window.tn.canvas_max_width=480}window.tn.grid_width=window.tn.canvas_min_width;window.tn.grid_offset_left=parseFloat((window.tn.window_width-window.tn.grid_width)/2)}var t396_waitForFinalEvent=(function(){var timers={};return function(callback,ms,uniqueId){if(!uniqueId){uniqueId="Don't call this twice without a uniqueId"}if(timers[uniqueId]){clearTimeout(timers[uniqueId])}timers[uniqueId]=setTimeout(callback,ms)}})();function t396_switchResolution(res,resmax){tn_console('func: switchResolution');if(typeof resmax=='undefined'){if(res==1200)resmax='';if(res==960)resmax=1200;if(res==640)resmax=960;if(res==480)resmax=640;if(res==320)resmax=480}window.tn.curResolution=res;window.tn.curResolution_max=resmax}function t396_artboard_build(data,recid){tn_console('func: t396_artboard_build. Recid:'+recid);tn_console(data);var ab=$('#rec'+recid).find('.t396__artboard');t396_ab__renderView(ab);ab.find('.tn-elem').each(function(){var item=$(this);if(item.attr('data-elem-type')=='text'){t396_addText(ab,item)}if(item.attr('data-elem-type')=='image'){t396_addImage(ab,item)}if(item.attr('data-elem-type')=='shape'){t396_addShape(ab,item)}if(item.attr('data-elem-type')=='button'){t396_addButton(ab,item)}if(item.attr('data-elem-type')=='video'){t396_addVideo(ab,item)}if(item.attr('data-elem-type')=='html'){t396_addHtml(ab,item)}if(item.attr('data-elem-type')=='tooltip'){t396_addTooltip(ab,item)}if(item.attr('data-elem-type')=='form'){t396_addForm(ab,item)}if(item.attr('data-elem-type')=='gallery'){t396_addGallery(ab,item)}});$('#rec'+recid).find('.t396__artboard').removeClass('rendering').addClass('rendered');if(ab.attr('data-artboard-ovrflw')=='visible'){$('#allrecords').css('overflow','hidden')}if($isMobile){$('#rec'+recid).append('<style>@media only screen and (min-width:1366px) and (orientation:landscape) and (-webkit-min-device-pixel-ratio:2) {.t396__carrier {background-attachment:scroll!important;}}</style>')}}function t396_ab__renderView(ab){var fields=window.tn.ab_fields;for(var i=0;i<fields.length;i++){t396_ab__renderViewOneField(ab,fields[i])}var ab_min_height=t396_ab__getFieldValue(ab,'height');var ab_max_height=t396_ab__getHeight(ab);var offset_top=0;if(ab_min_height==ab_max_height){offset_top=0}else{var ab_valign=t396_ab__getFieldValue(ab,'valign');if(ab_valign=='top'){offset_top=0}else if(ab_valign=='center'){offset_top=parseFloat((ab_max_height-ab_min_height)/2).toFixed(1)}else if(ab_valign=='bottom'){offset_top=parseFloat((ab_max_height-ab_min_height)).toFixed(1)}else if(ab_valign=='stretch'){offset_top=0;ab_min_height=ab_max_height}else{offset_top=0}}ab.attr('data-artboard-proxy-min-offset-top',offset_top);ab.attr('data-artboard-proxy-min-height',ab_min_height);ab.attr('data-artboard-proxy-max-height',ab_max_height);var abHeightVh=t396_ab__getFieldValue(ab,'height_vh');if(window.isMobile&&abHeightVh){ab.css('height',document.documentElement.clientHeight*parseFloat(abHeightVh/100))}}function t396_addText(ab,el){tn_console('func: addText');var fields_str='top,left,width,container,axisx,axisy,widthunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el)}function t396_addImage(ab,el){tn_console('func: addImage');var fields_str='img,width,filewidth,fileheight,top,left,container,axisx,axisy,widthunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el);el.find('img').on("load",function(){t396_elem__renderViewOneField(el,'top');if(typeof $(this).attr('src')!='undefined'&&$(this).attr('src')!=''){setTimeout(function(){t396_elem__renderViewOneField(el,'top')},2000)}}).each(function(){if(this.complete)$(this).load()});el.find('img').on('tuwidget_done',function(e,file){t396_elem__renderViewOneField(el,'top')})}function t396_addShape(ab,el){tn_console('func: addShape');var fields_str='width,height,top,left,';fields_str+='container,axisx,axisy,widthunits,heightunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el)}function t396_addButton(ab,el){tn_console('func: addButton');var fields_str='top,left,width,height,container,axisx,axisy,caption,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el);return(el)}function t396_addVideo(ab,el){tn_console('func: addVideo');var fields_str='width,height,top,left,';fields_str+='container,axisx,axisy,widthunits,heightunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el);var viel=el.find('.tn-atom__videoiframe');var viatel=el.find('.tn-atom');viatel.css('background-color','#000');var vihascover=viatel.attr('data-atom-video-has-cover');if(typeof vihascover=='undefined'){vihascover=''}if(vihascover=='y'){viatel.click(function(){var viifel=viel.find('iframe');if(viifel.length){var foo=viifel.attr('data-original');viifel.attr('src',foo)}viatel.css('background-image','none');viatel.find('.tn-atom__video-play-link').css('display','none')})}var autoplay=t396_elem__getFieldValue(el,'autoplay');var showinfo=t396_elem__getFieldValue(el,'showinfo');var loop=t396_elem__getFieldValue(el,'loop');var mute=t396_elem__getFieldValue(el,'mute');var startsec=t396_elem__getFieldValue(el,'startsec');var endsec=t396_elem__getFieldValue(el,'endsec');var tmode=$('#allrecords').attr('data-tilda-mode');var url='';var viyid=viel.attr('data-youtubeid');if(typeof viyid!='undefined'&&viyid!=''){url='//www.youtube.com/embed/';url+=viyid+'?rel=0&fmt=18&html5=1';url+='&showinfo='+(showinfo=='y'?'1':'0');if(loop=='y'){url+='&loop=1&playlist='+viyid}if(startsec>0){url+='&start='+startsec}if(endsec>0){url+='&end='+endsec}if(mute=='y'){url+='&mute=1'}if(vihascover=='y'){url+='&autoplay=1';viel.html('<iframe id="youtubeiframe" width="100%" height="100%" data-original="'+url+'" frameborder="0" allowfullscreen data-flag-inst="y"></iframe>')}else{if(typeof tmode!='undefined'&&tmode=='edit'){}else{if(autoplay=='y'){url+='&autoplay=1'}}if(window.lazy=='y'){viel.html('<iframe id="youtubeiframe" class="t-iframe" width="100%" height="100%" data-original="'+url+'" frameborder="0" allowfullscreen data-flag-inst="lazy"></iframe>');el.append('<script>lazyload_iframe = new LazyLoad({elements_selector: ".t-iframe"});<\/script>')}else{viel.html('<iframe id="youtubeiframe" width="100%" height="100%" src="'+url+'" frameborder="0" allowfullscreen data-flag-inst="y"></iframe>')}}}var vivid=viel.attr('data-vimeoid');if(typeof vivid!='undefined'&&vivid>0){url='//player.vimeo.com/video/';url+=vivid+'?color=ffffff&badge=0';if(showinfo=='y'){url+='&title=1&byline=1&portrait=1'}else{url+='&title=0&byline=0&portrait=0'}if(loop=='y'){url+='&loop=1'}if(mute=='y'){url+='&muted=1'}if(vihascover=='y'){url+='&autoplay=1';viel.html('<iframe data-original="'+url+'" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>')}else{if(typeof tmode!='undefined'&&tmode=='edit'){}else{if(autoplay=='y'){url+='&autoplay=1'}}if(window.lazy=='y'){viel.html('<iframe class="t-iframe" data-original="'+url+'" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>');el.append('<script>lazyload_iframe = new LazyLoad({elements_selector: ".t-iframe"});<\/script>')}else{viel.html('<iframe src="'+url+'" width="100%" height="100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>')}}}}function t396_addHtml(ab,el){tn_console('func: addHtml');var fields_str='width,height,top,left,';fields_str+='container,axisx,axisy,widthunits,heightunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el)}function t396_addTooltip(ab,el){tn_console('func: addTooltip');var fields_str='width,height,top,left,';fields_str+='container,axisx,axisy,widthunits,heightunits,leftunits,topunits,tipposition';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el);var pinEl=el.find('.tn-atom__pin');var tipEl=el.find('.tn-atom__tip');var tipopen=el.attr('data-field-tipopen-value');if(isMobile||(typeof tipopen!='undefined'&&tipopen=='click')){t396_setUpTooltip_mobile(el,pinEl,tipEl)}else{t396_setUpTooltip_desktop(el,pinEl,tipEl)}setTimeout(function(){$('.tn-atom__tip-img').each(function(){var foo=$(this).attr('data-tipimg-original');if(typeof foo!='undefined'&&foo!=''){$(this).attr('src',foo)}})},3000)}function t396_addForm(ab,el){tn_console('func: addForm');var fields_str='width,top,left,';fields_str+='inputs,container,axisx,axisy,widthunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el)}function t396_addGallery(ab,el){tn_console('func: addForm');var fields_str='width,height,top,left,';fields_str+='imgs,container,axisx,axisy,widthunits,heightunits,leftunits,topunits';var fields=fields_str.split(',');el.attr('data-fields',fields_str);t396_elem__renderView(el)}function t396_elem__setFieldValue(el,prop,val,flag_render,flag_updateui,res){if(res=='')res=window.tn.curResolution;if(res<1200&&prop!='zindex'){el.attr('data-field-'+prop+'-res-'+res+'-value',val)}else{el.attr('data-field-'+prop+'-value',val)}if(flag_render=='render')elem__renderViewOneField(el,prop);if(flag_updateui=='updateui')panelSettings__updateUi(el,prop,val)}function t396_elem__getFieldValue(el,prop){var res=window.tn.curResolution;var r;if(res<1200){if(res==960){r=el.attr('data-field-'+prop+'-res-960-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-value')}}if(res==640){r=el.attr('data-field-'+prop+'-res-640-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-res-960-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-value')}}}if(res==480){r=el.attr('data-field-'+prop+'-res-480-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-res-640-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-res-960-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-value')}}}}if(res==320){r=el.attr('data-field-'+prop+'-res-320-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-res-480-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-res-640-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-res-960-value');if(typeof r=='undefined'){r=el.attr('data-field-'+prop+'-value')}}}}}}else{r=el.attr('data-field-'+prop+'-value')}return(r)}function t396_elem__renderView(el){tn_console('func: elem__renderView');var fields=el.attr('data-fields');if(!fields){return!1}fields=fields.split(',');for(var i=0;i<fields.length;i++){t396_elem__renderViewOneField(el,fields[i])}}function t396_elem__renderViewOneField(el,field){var value=t396_elem__getFieldValue(el,field);if(field=='left'){value=t396_elem__convertPosition__Local__toAbsolute(el,field,value);el.css('left',parseFloat(value).toFixed(1)+'px')}if(field=='top'){value=t396_elem__convertPosition__Local__toAbsolute(el,field,value);el.css('top',parseFloat(value).toFixed(1)+'px')}if(field=='width'){value=t396_elem__getWidth(el,value);el.css('width',parseFloat(value).toFixed(1)+'px');var eltype=el.attr('data-elem-type');if(eltype=='tooltip'){var pinSvgIcon=el.find('.tn-atom__pin-icon');if(pinSvgIcon.length>0){var pinSize=parseFloat(value).toFixed(1)+'px';pinSvgIcon.css({'width':pinSize,'height':pinSize})}el.css('height',parseInt(value).toFixed(1)+'px')}if(eltype=='gallery'){var borderWidth=t396_elem__getFieldValue(el,'borderwidth');var borderStyle=t396_elem__getFieldValue(el,'borderstyle');if(borderStyle=='none'||typeof borderStyle=='undefined'||typeof borderWidth=='undefined'||borderWidth=='')borderWidth=0;value=value*1-borderWidth*2;el.css('width',parseFloat(value).toFixed(1)+'px');el.find('.t-slds__main').css('width',parseFloat(value).toFixed(1)+'px');el.find('.tn-atom__slds-img').css('width',parseFloat(value).toFixed(1)+'px')}}if(field=='height'){var eltype=el.attr('data-elem-type');if(eltype=='tooltip'){return}value=t396_elem__getHeight(el,value);el.css('height',parseFloat(value).toFixed(1)+'px');if(eltype==='gallery'){var borderWidth=t396_elem__getFieldValue(el,'borderwidth');var borderStyle=t396_elem__getFieldValue(el,'borderstyle');if(borderStyle=='none'||typeof borderStyle=='undefined'||typeof borderWidth=='undefined'||borderWidth=='')borderWidth=0;value=value*1-borderWidth*2;el.css('height',parseFloat(value).toFixed(1)+'px');el.find('.tn-atom__slds-img').css('height',parseFloat(value).toFixed(1)+'px');el.find('.t-slds__main').css('height',parseFloat(value).toFixed(1)+'px')}}if(field=='container'){t396_elem__renderViewOneField(el,'left');t396_elem__renderViewOneField(el,'top')}if(field=='width'||field=='height'||field=='fontsize'||field=='fontfamily'||field=='letterspacing'||field=='fontweight'||field=='img'){t396_elem__renderViewOneField(el,'left');t396_elem__renderViewOneField(el,'top')}if(field=='inputs'){value=el.find('.tn-atom__inputs-textarea').val();try{t_zeroForms__renderForm(el,value)}catch(err){}}}function t396_elem__convertPosition__Local__toAbsolute(el,field,value){value=parseInt(value);if(field=='left'){var el_container,offset_left,el_container_width,el_width;var container=t396_elem__getFieldValue(el,'container');if(container=='grid'){el_container='grid';offset_left=window.tn.grid_offset_left;el_container_width=window.tn.grid_width}else{el_container='window';offset_left=0;el_container_width=window.tn.window_width}var el_leftunits=t396_elem__getFieldValue(el,'leftunits');if(el_leftunits=='%'){value=t396_roundFloat(el_container_width*value/100)}value=offset_left+value;var el_axisx=t396_elem__getFieldValue(el,'axisx');if(el_axisx=='center'){el_width=t396_elem__getWidth(el);value=el_container_width/2-el_width/2+value}if(el_axisx=='right'){el_width=t396_elem__getWidth(el);value=el_container_width-el_width+value}}if(field=='top'){var ab=el.parent();var el_container,offset_top,el_container_height,el_height;var container=t396_elem__getFieldValue(el,'container');if(container=='grid'){el_container='grid';offset_top=parseFloat(ab.attr('data-artboard-proxy-min-offset-top'));el_container_height=parseFloat(ab.attr('data-artboard-proxy-min-height'))}else{el_container='window';offset_top=0;el_container_height=parseFloat(ab.attr('data-artboard-proxy-max-height'))}var el_topunits=t396_elem__getFieldValue(el,'topunits');if(el_topunits=='%'){value=(el_container_height*(value/100))}value=offset_top+value;var el_axisy=t396_elem__getFieldValue(el,'axisy');if(el_axisy=='center'){el_height=t396_elem__getHeight(el);value=el_container_height/2-el_height/2+value}if(el_axisy=='bottom'){el_height=t396_elem__getHeight(el);value=el_container_height-el_height+value}}return(value)}function t396_ab__setFieldValue(ab,prop,val,res){if(res=='')res=window.tn.curResolution;if(res<1200){ab.attr('data-artboard-'+prop+'-res-'+res,val)}else{ab.attr('data-artboard-'+prop,val)}}function t396_ab__getFieldValue(ab,prop){var res=window.tn.curResolution;var r;if(res<1200){if(res==960){r=ab.attr('data-artboard-'+prop+'-res-960');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'')}}if(res==640){r=ab.attr('data-artboard-'+prop+'-res-640');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'-res-960');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'')}}}if(res==480){r=ab.attr('data-artboard-'+prop+'-res-480');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'-res-640');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'-res-960');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'')}}}}if(res==320){r=ab.attr('data-artboard-'+prop+'-res-320');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'-res-480');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'-res-640');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'-res-960');if(typeof r=='undefined'){r=ab.attr('data-artboard-'+prop+'')}}}}}}else{r=ab.attr('data-artboard-'+prop)}return(r)}function t396_ab__renderViewOneField(ab,field){var value=t396_ab__getFieldValue(ab,field)}function t396_allelems__renderView(ab){tn_console('func: allelems__renderView: abid:'+ab.attr('data-artboard-recid'));ab.find(".tn-elem").each(function(){t396_elem__renderView($(this))})}function t396_ab__filterUpdate(ab){var filter=ab.find('.t396__filter');var c1=filter.attr('data-filtercolor-rgb');var c2=filter.attr('data-filtercolor2-rgb');var o1=filter.attr('data-filteropacity');var o2=filter.attr('data-filteropacity2');if((typeof c2=='undefined'||c2=='')&&(typeof c1!='undefined'&&c1!='')){filter.css("background-color","rgba("+c1+","+o1+")")}else if((typeof c1=='undefined'||c1=='')&&(typeof c2!='undefined'&&c2!='')){filter.css("background-color","rgba("+c2+","+o2+")")}else if(typeof c1!='undefined'&&typeof c2!='undefined'&&c1!=''&&c2!=''){filter.css({background:"-webkit-gradient(linear, left top, left bottom, from(rgba("+c1+","+o1+")), to(rgba("+c2+","+o2+")) )"})}else{filter.css("background-color",'transparent')}}function t396_ab__getHeight(ab,ab_height){if(typeof ab_height=='undefined')ab_height=t396_ab__getFieldValue(ab,'height');ab_height=parseFloat(ab_height);var ab_height_vh=t396_ab__getFieldValue(ab,'height_vh');if(ab_height_vh!=''){ab_height_vh=parseFloat(ab_height_vh);if(isNaN(ab_height_vh)===!1){var ab_height_vh_px=parseFloat(window.tn.window_height*parseFloat(ab_height_vh/100));if(ab_height<ab_height_vh_px){ab_height=ab_height_vh_px}}}return(ab_height)}function t396_hex2rgb(hexStr){var hex=parseInt(hexStr.substring(1),16);var r=(hex&0xff0000)>>16;var g=(hex&0x00ff00)>>8;var b=hex&0x0000ff;return[r,g,b]}String.prototype.t396_replaceAll=function(search,replacement){var target=this;return target.replace(new RegExp(search,'g'),replacement)};function t396_elem__getWidth(el,value){if(typeof value=='undefined')value=parseFloat(t396_elem__getFieldValue(el,'width'));var el_widthunits=t396_elem__getFieldValue(el,'widthunits');if(el_widthunits=='%'){var el_container=t396_elem__getFieldValue(el,'container');if(el_container=='window'){value=parseFloat(window.tn.window_width*parseFloat(parseInt(value)/100))}else{value=parseFloat(window.tn.grid_width*parseFloat(parseInt(value)/100))}}return(value)}function t396_elem__getHeight(el,value){if(typeof value=='undefined')value=t396_elem__getFieldValue(el,'height');value=parseFloat(value);if(el.attr('data-elem-type')=='shape'||el.attr('data-elem-type')=='video'||el.attr('data-elem-type')=='html'||el.attr('data-elem-type')=='gallery'){var el_heightunits=t396_elem__getFieldValue(el,'heightunits');if(el_heightunits=='%'){var ab=el.parent();var ab_min_height=parseFloat(ab.attr('data-artboard-proxy-min-height'));var ab_max_height=parseFloat(ab.attr('data-artboard-proxy-max-height'));var el_container=t396_elem__getFieldValue(el,'container');if(el_container=='window'){value=parseFloat(ab_max_height*parseFloat(value/100))}else{value=parseFloat(ab_min_height*parseFloat(value/100))}}}else if(el.attr('data-elem-type')=='button'){value=value}else{value=parseFloat(el.innerHeight())}return(value)}function t396_roundFloat(n){n=Math.round(n*100)/100;return(n)}function tn_console(str){if(window.tn_comments==1)console.log(str)}function t396_setUpTooltip_desktop(el,pinEl,tipEl){var timer;pinEl.mouseover(function(){$('.tn-atom__tip_visible').each(function(){var thisTipEl=$(this).parents('.t396__elem');if(thisTipEl.attr('data-elem-id')!=el.attr('data-elem-id')){t396_hideTooltip(thisTipEl,$(this))}});clearTimeout(timer);if(tipEl.css('display')=='block'){return}t396_showTooltip(el,tipEl)});pinEl.mouseout(function(){timer=setTimeout(function(){t396_hideTooltip(el,tipEl)},300)})}function t396_setUpTooltip_mobile(el,pinEl,tipEl){pinEl.on('click',function(e){if(tipEl.css('display')=='block'&&$(e.target).hasClass("tn-atom__pin")){t396_hideTooltip(el,tipEl)}else{t396_showTooltip(el,tipEl)}});var id=el.attr("data-elem-id");$(document).click(function(e){var isInsideTooltip=($(e.target).hasClass("tn-atom__pin")||$(e.target).parents(".tn-atom__pin").length>0);if(isInsideTooltip){var clickedPinId=$(e.target).parents(".t396__elem").attr("data-elem-id");if(clickedPinId==id){return}}t396_hideTooltip(el,tipEl)})}function t396_hideTooltip(el,tipEl){tipEl.css('display','');tipEl.css({"left":"","transform":"","right":""});tipEl.removeClass('tn-atom__tip_visible');el.css('z-index','')}function t396_showTooltip(el,tipEl){var pos=el.attr("data-field-tipposition-value");if(typeof pos=='undefined'||pos==''){pos='top'};var elSize=el.height();var elTop=el.offset().top;var elBottom=elTop+elSize;var elLeft=el.offset().left;var elRight=el.offset().left+elSize;var winTop=$(window).scrollTop();var winWidth=$(window).width();var winBottom=winTop+$(window).height();var tipElHeight=tipEl.outerHeight();var tipElWidth=tipEl.outerWidth();var padd=15;if(pos=='right'||pos=='left'){var tipElRight=elRight+padd+tipElWidth;var tipElLeft=elLeft-padd-tipElWidth;if((pos=='right'&&tipElRight>winWidth)||(pos=='left'&&tipElLeft<0)){pos='top'}}if(pos=='top'||pos=='bottom'){var tipElRight=elRight+(tipElWidth/2-elSize/2);var tipElLeft=elLeft-(tipElWidth/2-elSize/2);if(tipElRight>winWidth){var rightOffset=-(winWidth-elRight-padd);tipEl.css({"left":"auto","transform":"none","right":rightOffset+"px"})}if(tipElLeft<0){var leftOffset=-(elLeft-padd);tipEl.css({"left":leftOffset+"px","transform":"none"})}}if(pos=='top'){var tipElTop=elTop-padd-tipElHeight;var tipElBottom=elBottom+padd+tipElHeight;if(winBottom>tipElBottom&&winTop>tipElTop){pos='bottom'}}if(pos=='bottom'){var tipElTop=elTop-padd-tipElHeight;var tipElBottom=elBottom+padd+tipElHeight;if(winBottom<tipElBottom&&winTop<tipElTop){pos='top'}}tipEl.attr('data-tip-pos',pos);tipEl.css('display','block');tipEl.addClass('tn-atom__tip_visible');el.css('z-index','1000')}function t396_hex2rgba(hexStr,opacity){var hex=parseInt(hexStr.substring(1),16);var r=(hex&0xff0000)>>16;var g=(hex&0x00ff00)>>8;var b=hex&0x0000ff;return[r,g,b,parseFloat(opacity)]}
function t431_init(recid){var tableHead=t431__escapeHTML($('#rec'+recid+' .t431 .t431__data-part1').html()||"");var tableBody=t431__escapeHTML($('#rec'+recid+' .t431 .t431__data-part2').html()||"");var tableColSize=$('#rec'+recid+' .t431 .t431__table').attr("data-table-width");var hasTargetBlank=$('#rec'+recid+' .t431 .t431__table').attr("data-target-blank");var tHead=t431_parseData(tableHead);var tBody=t431_parseData(tableBody);var colSize=t431_parseData(tableColSize);var maxColNum=t431__findMaxRowLengthInTable(tHead,tBody);var colWidth=t431__setColumnsWidth(colSize,maxColNum,recid);var container=$('#rec'+recid+' .t431 .t431__table');var html="";if(tHead){html+=t431__generateTable(tHead,"th",hasTargetBlank,colWidth,maxColNum)}
if(tBody){html+=t431__generateTable(tBody,"td",hasTargetBlank,colWidth,maxColNum)}
container.append(html)}
function t431__findMaxRowLengthInTable(arrayHead,arrayData){var headMaxLength=0;var dataMaxLength=0;if(arrayHead){headMaxLength=t431__findMaxRowLengInArray(arrayHead)}
if(arrayData){dataMaxLength=t431__findMaxRowLengInArray(arrayData)}
if(dataMaxLength>headMaxLength){return dataMaxLength}else{return headMaxLength}}
function t431__escapeHTML(string){var html=string.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&').replace(/&nbsp;/g,' ');var result="";var allowedTags="";['b','i','u','ul','li','ol','br','img','s','sub','sup','span','hr','pre','code','mark','strong','small'].forEach(function(value){allowedTags+=":not("+value+")"});var allowedAttrs=['alt','class','title','id','src','style','width','height'];var fakeDOM=document.implementation.createHTMLDocument('fake');$.each($.parseHTML(html,fakeDOM)||[],function(i,$el){var el=$($el)[0];if(!$($el).is(allowedTags)){if(el.nodeType!==3){var temp=document.createElement(el.tagName);allowedAttrs.forEach(function(value){if(el.getAttribute(value)!==null){temp.setAttribute(value,el.getAttribute(value).replace(/javascript:/gi,''))}});temp.textContent=el.textContent;result+=temp.outerHTML}else{result+=el.textContent}}});return result}
function t431__findMaxRowLengInArray(curArray){var maxLength=0;for(var i=0;i<curArray.length;i++){if(curArray[i].length>maxLength){maxLength=curArray[i].length}}
return maxLength}
function t431__setColumnsWidth(colWidth,colsNumber,recid){if(colWidth){return colWidth[0]}else{var tableWidth=$('#rec'+recid+' .t431 .t-container .t-col').width();return(tableWidth/colsNumber+"px")}}
function t431__generateTable(arrayValues,colTag,hasTargetBlank,colWidth,maxColNumber){var html="";var tag="";if(colTag=="td"){tag="tbody"}else{tag="thead"}
html+='<'+tag+' class="t431__'+tag+'">';for(var i=0;i<arrayValues.length;i++){if(colTag=="td"){if((i+1)%2>0){html+='<tr class="t431__oddrow">'}else{html+='<tr class="t431__evenrow">'}}else{html+='<tr>'}
var addingCols=0;if(arrayValues[i].length<maxColNumber){addingCols=maxColNumber-arrayValues[i].length}
for(var j=0;j<(arrayValues[i].length+addingCols);j++){if(arrayValues[i][j]){var curWidth="";if(Array.isArray(colWidth)&&colWidth[j]){curWidth=colWidth[j].myText}else{curWidth=colWidth}
var ColWithAttr='';if(colTag=="td"){ColWithAttr='<td class="t431__td t-text" width="'+curWidth+'">'}else{ColWithAttr='<th class="t431__th t-title" width="'+curWidth+'">'}
if(arrayValues[i][j].myHref){var tBlank="";if(hasTargetBlank){tBlank="target=\"_blank\""}
var linkWithAttr="";var linkCloseTag="";if(arrayValues[i][j].myHrefType=="link"){linkWithAttr='<a href="'+arrayValues[i][j].myHref+'"'+tBlank+'>';linkCloseTag='</a>'}else{linkWithAttr='<div class="t431__btnwrapper"><a href="'+arrayValues[i][j].myHref+'"'+tBlank+' class="t-btn t-btn_sm"><table style="width:100%; height:100%"><tr><td>';linkCloseTag='</td></tr></table></a></div>'}
html+=ColWithAttr+linkWithAttr+arrayValues[i][j].myText+linkCloseTag+'</'+colTag+'>'}else{html+=ColWithAttr+arrayValues[i][j].myText+'</'+colTag+'>'}}else{html+='<'+colTag+' class="t431__'+colTag+'" width="'+curWidth+'">'+'</'+colTag+'>'}}
html+="</tr>"}
html+="</"+tag+">";return html}
function t431_parseData(data){if(data!==""&&typeof data!="undefined"){data=t431__addBrTag(data);var arrayTable=[];var arrayRow=[];var curItem={myText:"",myHref:"",myHrefType:""};var hasLink="";var hasLinkWithSpace="";var hasBtn="";var hasBtnWithSpace="";var endLine="";for(var i=0;i<data.length;i++){if(data[i]==";"&&!(data.slice(i-4,i)=="&lt;"||data.slice(i-4,i)=="&gt;"||data.slice(i-5,i)=="&amp;"||data.slice(i-6,i)=="&nbsp;")){arrayRow.push(curItem);curItem={myText:"",myHref:""};hasLink="";hasLinkWithSpace="";hasBtn="";hasBtnWithSpace=""}else{if(hasLink=="link="||hasLinkWithSpace==" link="||hasBtn=="button="||hasBtnWithSpace==" button="){if(curItem.myHref===""&&hasLink==="link="){curItem.myText=curItem.myText.slice(0,-5);curItem.myHrefType="link"}else{if(curItem.myHref===""&&hasLinkWithSpace===" link="){curItem.myText=curItem.myText.slice(0,-6);curItem.myHrefType="link"}else{if(curItem.myHref===""&&hasBtn==="button="){curItem.myText=curItem.myText.slice(0,-7);curItem.myHrefType="btn"}else{if(curItem.myHref===""&&hasBtnWithSpace===" button="){curItem.myText=curItem.myText.slice(0,-8);curItem.myHrefType="btn"}}}}
curItem.myHref+=(data[i])}else{curItem.myText+=(data[i]);hasLink=t431__checkSubstr("link=",hasLink,data[i]);hasLinkWithSpace=t431__checkSubstr(" link=",hasLinkWithSpace,data[i]);hasBtn=t431__checkSubstr("button=",hasBtn,data[i]);hasBtnWithSpace=t431__checkSubstr(" button=",hasBtnWithSpace,data[i])}
endLine=t431__checkSubstr("<br />",endLine,data[i]);if(endLine=="<br />"){if(curItem.myHref){curItem.myHref=curItem.myHref.slice(0,-6)}else{curItem.myText=curItem.myText.slice(0,-6)}
arrayRow.push(curItem);arrayTable.push(arrayRow);curItem={myText:"",myHref:""};hasLink="";hasLinkWithSpace="";hasBtn="";hasBtnWithSpace="";arrayRow=[]}}}
if(arrayRow.length>0||curItem.myText!==""){if(curItem!==""){arrayRow.push(curItem)}
arrayTable.push(arrayRow)}}
return arrayTable}
function t431__checkSubstr(targetSubstr,curSubstr,curSymbol){if(!curSubstr&&curSymbol==targetSubstr[0]){return curSymbol}else{if(curSubstr){for(var i=0;i<(targetSubstr.length-1);i++){if(curSubstr[curSubstr.length-1]==targetSubstr[i]&&curSymbol==targetSubstr[i+1]){return(curSubstr+=curSymbol)}}}}}
function t431__addBrTag(oldStringItem){var newStringItem="";for(var i=0;i<oldStringItem.length;i++){if(oldStringItem[i]=="\n"||oldStringItem[i]=="\r"){newStringItem+="<br />"}else{newStringItem+=oldStringItem[i]}}
return newStringItem.replace(/&nbsp;/g,' ')}
function t431_createTable(recid,tablehead,tabledata,tablecolsize,hastargetblank,btnstyles,t431__tdstyles,t431__thstyles,t431__oddrowstyles,t431__evenrowstyles){var t431__arrayColSize=t431_parseData(tablecolsize);var t431__arrayHead=t431_parseData(tablehead);var t431__arrayData=t431_parseData(tabledata);var t431__maxcolnumber=t431__findMaxRowLengthInTable(t431__arrayHead,t431__arrayData);var t431__colWidth=t431__setColumnsWidth(t431__arrayColSize,t431__maxcolnumber,recid);if(t431__colWidth[0].myText&&t431__colWidth[0].myText[t431__colWidth[0].myText.length-1]=="%"){for(var i=0;i<t431__colWidth.length;i++){t431__colWidth[i].myText=t431__colWidth[i].myText.slice(0,-1);t431__colWidth[i].myText+="vw"}}
var t431__container=$('#rec'+recid+' .t431 .t-container .t431__table');var t431__htmlTable="";if(t431__arrayHead){t431__htmlTable+=t431__generateHtml(recid,t431__arrayHead,"th",hastargetblank,t431__colWidth,btnstyles,t431__thstyles,null,null,t431__maxcolnumber)}
t431__container.append(t431__htmlTable);t431__htmlTable="";if(t431__arrayData){t431__htmlTable+=t431__generateHtml(recid,t431__arrayData,"td",hastargetblank,t431__colWidth,btnstyles,t431__tdstyles,t431__oddrowstyles,t431__evenrowstyles,t431__maxcolnumber)}
t431__container.append(t431__htmlTable)}
function t431__generateHtml(recid,arrayValues,coltag,hastargetblank,colWidth,btnstyles,colstyles,oddrowstyles,evenrowstyles,maxcolnumber){var t431__htmlpart="";if(coltag=="td"){var t431__theadorbodytag="tbody"}else{var t431__theadorbodytag="thead"}
t431__htmlpart+='<'+t431__theadorbodytag+' class="t431__'+t431__theadorbodytag+'">';var t431__firstbodyrowstyle="";if($('#rec'+recid+' .t431 .t-container .t431__thead th').length>0&&$('#rec'+recid+' .t431 .t-container .t431__thead th').css("border-bottom-width")[0]!="0"){t431__firstbodyrowstyle="border-top: 0 !important;"}
for(var i=0;i<arrayValues.length;i++){if(coltag=="td"){if((i+1)%2>0){t431__htmlpart+="<tr class=\"t431__oddrow\""+"style=\""+oddrowstyles+"\">"}else{t431__htmlpart+="<tr class=\"t431__evenrow\""+"style=\""+evenrowstyles+"\">"}}else{t431__htmlpart+="<tr>"}
var t431__addingcols=0;if(arrayValues[i].length<maxcolnumber){t431__addingcols=maxcolnumber-arrayValues[i].length}
for(var j=0;j<(arrayValues[i].length+t431__addingcols);j++){if(arrayValues[i][j]){if(Array.isArray(colWidth)&&colWidth[j]){var t431__curWidth=colWidth[j].myText}else{var t431__curWidth=colWidth}
if(i==0&&coltag=="td"){var t431__colwithattr="<"+coltag+" class=\"t431__"+coltag+"\" style=\"width:"+t431__curWidth+";"+colstyles+t431__firstbodyrowstyle+"\">"}else{var t431__colwithattr="<"+coltag+" class=\"t431__"+coltag+"\" style=\"width:"+t431__curWidth+";"+colstyles+"\">"}
if(arrayValues[i][j].myHref){var t431__tblank="";if(hastargetblank){var t431__tblank="target=\"_blank\""}
if(arrayValues[i][j].myHrefType=="link"){var t431__linkwithattr="<a href=\""+arrayValues[i][j].myHref+"\""+t431__tblank+">";var t431__linkclosetag="</a>"}else{var t431__linkwithattr="<div class=\"t431__btnwrapper\"><a href=\""+arrayValues[i][j].myHref+"\""+t431__tblank+" class=\"t-btn t-btn_sm\" style=\""+btnstyles+"\"><table style=\"width:100%; height:100%;\"><tr><td>";var t431__linkclosetag="</td></tr></table></a></div>"}
t431__htmlpart+=t431__colwithattr+t431__linkwithattr+arrayValues[i][j].myText+t431__linkclosetag+"</"+coltag+">"}else{t431__htmlpart+=t431__colwithattr+arrayValues[i][j].myText+"</"+coltag+">"}}else{t431__htmlpart+="<"+coltag+" class=\"t431__"+coltag+"\" style=\"width:"+t431__curWidth+";"+colstyles+"\">"+"</"+coltag+">"}}
t431__htmlpart+="</tr>"}
t431__htmlpart+="</"+t431__theadorbodytag+">";return t431__htmlpart}
function t450_showMenu(recid){var el=$('#rec'+recid);$('body').addClass('t450__body_menushowed');el.find('.t450').addClass('t450__menu_show');el.find('.t450__overlay').addClass('t450__menu_show');$('.t450').bind('clickedAnchorInTooltipMenu',function(){t450_closeMenu()});el.find('.t450__overlay, .t450__close, a[href*=#]').click(function(){var url=$(this).attr('href');if(typeof url!='undefined'&&url!=''&&(url.substring(0,7)=='#price:'||url.substring(0,9)=='#submenu:')){return}
t450_closeMenu()});$(document).keydown(function(e){if(e.keyCode===27){$('body').removeClass('t390__body_popupshowed');$('.t390').removeClass('t390__popup_show')}})}
function t450_closeMenu(){$('body').removeClass('t450__body_menushowed');$('.t450').removeClass('t450__menu_show');$('.t450__overlay').removeClass('t450__menu_show')}
function t450_checkSize(recid){var el=$('#rec'+recid).find('.t450');var windowheight=$(window).height()-80;var contentheight=el.find(".t450__top").height()+el.find(".t450__rightside").height();if(contentheight>windowheight){setTimeout(function(){el.addClass('t450__overflowed');el.find(".t450__container").css('height','auto')},200)}}
function t450_appearMenu(recid){var el=$('#rec'+recid);var burger=el.find(".t450__burger_container");burger.each(function(){var el=$(this);var appearoffset=el.attr("data-appearoffset");var hideoffset=el.attr("data-hideoffset");if(appearoffset!=""){if(appearoffset.indexOf('vh')>-1){appearoffset=Math.floor((window.innerHeight*(parseInt(appearoffset)/100)))}
appearoffset=parseInt(appearoffset,10);if($(window).scrollTop()>=appearoffset){if(el.hasClass('t450__beforeready')){el.finish();el.removeClass("t450__beforeready")}}else{el.stop();el.addClass("t450__beforeready")}}
if(hideoffset!=""){if(hideoffset.indexOf('vh')>-1){hideoffset=Math.floor((window.innerHeight*(parseInt(hideoffset)/100)))}
hideoffset=parseInt(hideoffset,10);if($(window).scrollTop()+$(window).height()>=$(document).height()-hideoffset){if(!el.hasClass('t450__beforeready')){el.finish();el.addClass("t450__beforeready")}}else{if(appearoffset!=""){if($(window).scrollTop()>=appearoffset){el.stop();el.removeClass("t450__beforeready")}}else{el.stop();el.removeClass("t450__beforeready")}}}})}
function t450_initMenu(recid){var el=$('#rec'+recid).find('.t450');var hook=el.attr('data-tooltip-hook');if(hook!==''){$('.r').on('click','a[href="'+hook+'"]',function(e){t450_closeMenu();t450_showMenu(recid);t450_checkSize(recid);e.preventDefault()})}
$('#rec'+recid).find('.t450__burger_container').click(function(e){t450_closeMenu();t450_showMenu(recid);t450_checkSize(recid)});if(isMobile){$('#rec'+recid).find('.t-menu__link-item').each(function(){var $this=$(this);if($this.hasClass('t450__link-item_submenu')){$this.on('click',function(){setTimeout(function(){t450_checkSize(recid)},100)})}})}
t450_highlight()}
function t450_highlight(){var url=window.location.href;var pathname=window.location.pathname;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="/"}
$(".t450__menu a[href='"+url+"']").addClass("t-active");$(".t450__menu a[href='"+url+"/']").addClass("t-active");$(".t450__menu a[href='"+pathname+"']").addClass("t-active");$(".t450__menu a[href='/"+pathname+"']").addClass("t-active");$(".t450__menu a[href='"+pathname+"/']").addClass("t-active");$(".t450__menu a[href='/"+pathname+"/']").addClass("t-active")}
function t451_initMenu(recid){var el=$('#rec'+recid);var obj=el.find('.t451__burger');obj.click(function(e){t451_closeMenu();t451_showMenu(recid);t451_checkSize(recid);e.preventDefault()});$('.t451').bind('clickedAnchorInTooltipMenu',function(){t451_closeMenu()});if(isMobile){$('#rec'+recid).find('.t-menu__link-item').each(function(){var $this=$(this);if($this.hasClass('t451__link-item_submenu')){$this.on('click',function(){setTimeout(function(){t451_checkSize(recid)},100)})}})}
var navLinks=el.find('.t451 a.t-menusub__link-item:not(.tooltipstered)[href*="#"]');if(navLinks.length>0){t451_catchScroll(navLinks)}
t451_highlight()}
function t451_showMenu(recid){var el=$('#rec'+recid);$('body').addClass('t451__body_menushowed');el.find('.t451m').addClass('t451m__menu_show');el.find('.t451m__overlay').addClass('t451m__menu_show');el.find('.t451m__overlay, .t451m__close, a[href*=#]').click(function(){if($(this).is('.tooltipstered, .t794__tm-link')){return}
t451_closeMenu()});$(document).keydown(function(e){if(e.keyCode==27){$('body').removeClass('t451__body_menushowed');$('.t451m').removeClass('t451m__menu_show');$('.t451m__overlay').removeClass('t451m__menu_show')}})}
function t451_closeMenu(){$('body').removeClass('t451__body_menushowed');$('.t451m').removeClass('t451m__menu_show');$('.t451m__overlay').removeClass('t451m__menu_show')}
function t451_checkSize(recid){var el=$('#rec'+recid).find('.t451m');var windowheight=$(window).height()-80;var contentheight=el.find('.t451m__top').height()+el.find('.t451m__rightside').height();if(contentheight>windowheight){el.addClass('t451m__overflowed');el.find('.t451m__container').css('height','auto')}}
function t451_highlight(){var url=window.location.href;var pathname=window.location.pathname;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='/'}
$('.t451m__menu a[href="'+url+'"]').addClass('t-active');$('.t451m__menu a[href="'+url+'/"]').addClass('t-active');$('.t451m__menu a[href="'+pathname+'"]').addClass('t-active');$('.t451m__menu a[href="/'+pathname+'"]').addClass('t-active');$('.t451m__menu a[href="'+pathname+'/"]').addClass('t-active');$('.t451m__menu a[href="/'+pathname+'/"]').addClass('t-active')}
function t451_changeBgOpacityMenu(recid){var window_width=$(window).width();var record=$('#rec'+recid);record.find('.t451__container__bg').each(function(){var el=$(this);var bgcolor=el.attr('data-bgcolor-rgba');var bgcolor_afterscroll=el.attr('data-bgcolor-rgba-afterscroll');var bgopacity=el.attr('data-bgopacity');var bgopacity_afterscroll=el.attr('data-bgopacity2');var menu_shadow=el.attr('data-menu-shadow');if($(window).scrollTop()>20){el.css('background-color',bgcolor_afterscroll);if(bgopacity_afterscroll!='0'&&bgopacity_afterscroll!='0.0'){el.css('box-shadow',menu_shadow)}else{el.css('box-shadow','none')}}else{el.css('background-color',bgcolor);if(bgopacity!='0'&&bgopacity!='0.0'){el.css('box-shadow',menu_shadow)}else{el.css('box-shadow','none')}}})}
function t451_appearMenu(recid){var window_width=$(window).width();var record=$('#rec'+recid);record.find('.t451__panel').each(function(){var el=$(this);var appearoffset=el.attr('data-appearoffset');if(appearoffset!=''){if(appearoffset.indexOf('vh')>-1){appearoffset=Math.floor((window.innerHeight*(parseInt(appearoffset)/100)))}
appearoffset=parseInt(appearoffset,10);if($(window).scrollTop()>=appearoffset){if(el.hasClass('t451__beforeready')){el.removeClass('t451__beforeready')}}else{el.addClass('t451__beforeready')}}})}
function t451_catchScroll(navLinks){var clickedSectionId=null;var sections=new Array();var sectionIdTonavigationLink=[];var interval=100;var lastCall;var timeoutId;navLinks=$(navLinks.get().reverse());navLinks.each(function(){var cursection=t451_getSectionByHref($(this));if(typeof cursection.attr('id')!='undefined'){sections.push(cursection)}
sectionIdTonavigationLink[cursection.attr('id')]=$(this)});$(window).bind('resize',t_throttle(function(){t451_updateSectionsOffsets(sections)},200));$('.t451').bind('displayChanged',function(){t451_updateSectionsOffsets(sections)});setInterval(function(){t451_updateSectionsOffsets(sections)},5000);setTimeout(function(){t451_updateSectionsOffsets(sections);t451_highlightNavLinks(navLinks,sections,sectionIdTonavigationLink,clickedSectionId)},1000);navLinks.click(function(){if(!$(this).hasClass('tooltipstered')){navLinks.removeClass('t-active');sectionIdTonavigationLink[t451_getSectionByHref($(this)).attr('id')].addClass('t-active');clickedSectionId=t451_getSectionByHref($(this)).attr('id')}});$(window).scroll(function(){var now=new Date().getTime();if(lastCall&&now<(lastCall+interval)){clearTimeout(timeoutId);timeoutId=setTimeout(function(){lastCall=now;clickedSectionId=t451_highlightNavLinks(navLinks,sections,sectionIdTonavigationLink,clickedSectionId)},interval-(now-lastCall))}else{lastCall=now;clickedSectionId=t451_highlightNavLinks(navLinks,sections,sectionIdTonavigationLink,clickedSectionId)}})}
function t451_updateSectionsOffsets(sections){$(sections).each(function(){var curSection=$(this);curSection.attr('data-offset-top',curSection.offset().top)})}
function t451_getSectionByHref(curlink){var curLinkValue=curlink.attr('href').replace(/\s+/g,'');if(curlink.is('[href*="#rec"]')){return $(".r[id='"+curLinkValue.substring(1)+"']")}else{return $(".r[data-record-type='215']").has("a[name='"+curLinkValue.substring(1)+"']")}}
function t451_highlightNavLinks(navLinks,sections,sectionIdTonavigationLink,clickedSectionId){var scrollPosition=$(window).scrollTop();var valueToReturn=clickedSectionId;if(sections.length!=0&&clickedSectionId==null&&sections[sections.length-1].attr('data-offset-top')>(scrollPosition+300)){navLinks.removeClass('t-active');return null}
$(sections).each(function(){var curSection=$(this);var sectionTop=curSection.attr('data-offset-top');var id=curSection.attr('id');var navLink=sectionIdTonavigationLink[id];if(((scrollPosition+300)>=sectionTop)||(sections[0].attr('id')==id&&scrollPosition>=$(document).height()-$(window).height())){if(clickedSectionId==null&&!navLink.hasClass('t-active')){navLinks.removeClass('t-active');navLink.addClass('t-active');valueToReturn=null}else{if(clickedSectionId!=null&&id==clickedSectionId){valueToReturn=null}}
return!1}});return valueToReturn}
function t480_setHeight(recid){var el=$('#rec'+recid);var sizer=el.find('.t480__sizer');var height=sizer.height();var width=sizer.width();var ratio=width/height;var imgwrapper=el.find(".t480__blockimg");var imgwidth=imgwrapper.width();if(height!=$(window).height()){imgwrapper.css({'height':((imgwidth/ratio)+'px')})}}
function t517_unifyHeights(recid){if($(window).width()>=960){$('#rec'+recid+' .t517 .t-container .t517__row').each(function(){var t517__highestBox=0;var t517__currow=$(this);$('.t517__col',this).each(function(){var t517__curcol=$(this);var t517__curcolinfo=t517__curcol.find('.t517__sectioninfowrapper');var t517__curcolpers=t517__curcol.find('.t517__personwrapper');var t517__curcolinnerheight=t517__curcolinfo.outerHeight()+t517__curcolpers.outerHeight();if(t517__curcolinnerheight>t517__highestBox){t517__highestBox=t517__curcolinnerheight}});$('.t517__col',this).css('height',t517__highestBox)})}};function t527_setHeight(recid){var t527__el=$("#rec"+recid),t527__image=t527__el.find(".t527__bgimg:first"),t527__width=t527__image.attr("data-image-width"),t527__height=t527__image.attr("data-image-height"),t527__ratio=t527__height/t527__width,t527__padding=t527__ratio*100;$("#rec"+recid+" .t527__bgimg").css("padding-bottom",t527__padding+"%")}
function t570_init(recid){if($(window).width()>750){t570_setMapHeight(recid);$(window).load(function(){t570_setMapHeight(recid)});$(window).resize(function(){t570_setMapHeight(recid)})}}
function t570_setMapHeight(recid){var t570__el=$('#rec'+recid),t570__map=t570__el.find('.t-map');var t570__textwrapper=t570__el.find('.t570__col_text').height();t570__map.css('height',t570__textwrapper).trigger('sizechange')}
function t585_init(recid){var el=$('#rec'+recid);var toggler=el.find(".t585__header");var accordion=el.find('.t585__accordion');if(accordion){accordion=accordion.attr('data-accordion')}else{accordion="false"}
toggler.click(function(){if(accordion==="true"){toggler.not(this).removeClass("t585__opened").next().slideUp()}
$(this).toggleClass("t585__opened");$(this).next().slideToggle();if(window.lazy==='y'||$('#allrecords').attr('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}})}
function t599_init(recid){var el=$('#rec'+recid);if(el.find('.t599__title').length){t599_equalHeight(el.find('.t599__title'))}
if(el.find('.t599__descr').length){t599_equalHeight(el.find('.t599__descr'))}
if(el.find('.t599__price').length){t599_equalHeight(el.find('.t599__price'))}
if(el.find('.t599__subtitle').length){t599_equalHeight(el.find('.t599__subtitle'))}};function t599_equalHeight(element){var highestBox=0;element.css('height','');element.each(function(){if($(this).height()>highestBox)highestBox=$(this).height()});if($(window).width()>=960){element.css('height',highestBox)}else{element.css('height','')}}
function t650_unifyHeights(recid){if($(window).width()>=960){$('#rec'+recid+' .t650 .t-container .t650__row').each(function(){var t650_highestBox=0,t650_currow=$(this);$('.t650__inner-col',this).each(function(){var t650_curCol=$(this),t650_curText=t650_curCol.find(".t650__text"),t650_curBtn=t650_curCol.find(".t650__btn-container"),t650_curColHeight=t650_curText.outerHeight()+t650_curBtn.outerHeight();if(t650_curColHeight>t650_highestBox){t650_highestBox=t650_curColHeight}});$('.t650__inner-col',this).css('height',t650_highestBox)})}else{$('.t650__inner-col').css('height','auto')}}
function t668_init(recid){var el=$('#rec'+recid);var toggler=el.find(".t668__header");var accordion=el.find('.t668__accordion');if(accordion){accordion=accordion.attr('data-accordion')}else{accordion="false"}
toggler.click(function(){if(accordion==="true"){toggler.not(this).removeClass("t668__opened").next().slideUp()}
$(this).toggleClass("t668__opened");$(this).next().slideToggle();if(window.lazy==='y'||$('#allrecords').attr('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}})}
function t937_init(recid,styles){var rec=$('#rec'+recid);var playlist=rec.find('.t937__playlist-wrap');var videoColumn=rec.find('.t937__col_video');var videoData=t937_parseData(recid);var params=t937_getUrlParametrs(recid);var activeVideoId=params.activeVideoId;t937_setSizes(recid,styles);t937_renderVideoCount(videoData,recid,styles);t937_renderPlaylist(videoData,activeVideoId,recid,styles);t937_renderVideoFrame(videoData,activeVideoId,recid,styles);videoColumn.css('height','');playlist.css('visibility','visible');t937_addEvents(recid,styles)}
function t937_getUrlParametrs(recid){var activeRecId,activeVideoId;var hash=window.location.hash;if(hash&&hash.indexOf('#tlection=')===-1){activeRecId=recid;activeVideoId=1}else{var params=hash.replace('#tlection=','').split('_');activeRecId=params[0];activeVideoId=+recid===+activeRecId?params[1]:1}
return{activeRecId:activeRecId,activeVideoId:activeVideoId}}
function t937_parseData(recid){var rec=$('#rec'+recid);var data=rec.find('.t937__data').html();data=data.replace(/&amp;/gi,'&');var segments=data.split('\n');var videos=[];for(var i=0;i<segments.length;i++){var segment=segments[i];var parts=segment.split(';');var video=t937_getVideoData(parts);if(video.url||video.section){videos.push(video)}}
return videos}
function t937_getVideoData(data){var first=data[0].trim();if(first.indexOf('[')===0&&first.indexOf(']')===first.length-1){return{section:first.slice(1,-1)}}
var url=data[0]&&data[0].length?data[0].trim():null;var title=data[1]?data[1].trim():null;var time=data[2]?data[2].trim():null;var description=data[3]?data[3].trim():null;var type=null;if(/youtube.com|youtu.be/gi.test(url)){type='youtube'}
if(/vimeo.com/gi.test(url)){type='vimeo'}
return{url:url,title:title,time:time,description:description,type:type}}
function t937_renderPlaylist(videoData,activeVideoId,recid,styles){var rec=$('#rec'+recid);var container=rec.find('.t937__playlist');container.data('data-video-data',videoData);container.data('playlist-styles',styles);var videoCount=1;t937_setSizes(recid,styles);container.empty();var mainColor=styles.mainColor.length?'color: '+styles.mainColor+';':'';var secondaryColor=styles.secondaryColor.length?'color: '+styles.secondaryColor+';':'';var border=styles.borderColor.length?'border-bottom: 1px solid '+styles.borderColor+';':'';t937_renderFade(recid,styles.bgColor);for(var i=0;i<videoData.length;i++){var data=videoData[i];var id=i+1;var isActive=Number(id)===Number(activeVideoId);var activeClass=isActive?' t937__playlist-link_active':'';var item;if(Object.prototype.hasOwnProperty.call(data,'section')){item=$(''+'<div class="t937__playlist-item t937__playlist-item_section" style="'+border+'">'+'</div>');item.append($(''+'<div class="t937__playlist-section t-name t-name_xs" style="'+mainColor+'">'+'</div>').text(data.section))}else{var title=data.title&&data.title.length?data.title:t937_translate('videoTitle');var time=data.time?data.time:'';var linkBgColor=isActive&&styles.linkBgColor.length?'background-color: '+styles.linkBgColor+';':'';item=$(''+'<div class="t937__playlist-item" data-video-id="'+id+'" '+'style="'+border+'" '+'onclick="t937_onVideoClick('+id+','+recid+');">'+'<div class="t937__playlist-link'+activeClass+' t-text t-text_xs" style="'+linkBgColor+'">'+'<div class="t937__playlist-number" style="'+secondaryColor+'">'+videoCount+'</div>'+'<div class="t937__playlist-title" style="'+mainColor+'">'+title+'</div>'+'<div class="t937__playlist-time" style="'+secondaryColor+'">'+time+'</div>'+'</div>'+'</div>');item.hover(function(){var hoverBgColor=styles.linkBgColor.length?styles.linkBgColor:'#F0F0F0';$(this).css('background-color',hoverBgColor)},function(){$(this).css('background-color','')});videoCount++}
container.append(item)}}
function t937_renderVideoFrame(data,activeVideoId,recid){var frame,video;var rec=$('#rec'+recid);var container=rec.find('.t937__video');var height=container.width()*0.5625;container.removeClass('t937__video_empty');for(var i=activeVideoId-1;i<data.length;i++){if(data[i].url){video=data[i];t937_renderDescription(video,recid);break}}
if(!data.length){container.addClass('t937__video_empty');frame='<div class="t937__system-message">'+t937_translate('noData')+'</div>'}else if(!video||!video.type){container.addClass('t937__video_empty');frame='<div class="t937__system-message">'+t937_translate('wrongFormat')+'</div>'}else if(video.type==='youtube'){var regex=/youtu(?:.*\/v\/|.*v\=|\.be\/)([A-Za-z0-9_\-]{11})/;var id=video.url.match(regex);if(id!==null){id=id[1]}
frame='<iframe class="t937__video-frame t937__video-frame_youtube" '+'width="100%" '+'height="'+height+'" '+'src="https://www.youtube.com/embed/'+id+'?rel=0&fmt=18&html5=1&enablejsapi=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'}else if(video.type==='vimeo'){var regex=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/;var id=video.url.match(regex)[3];frame='<iframe class="t937__video-frame t937__video-frame_vimeo" title="vimeo-player" '+'src="https://player.vimeo.com/video/'+id+'" '+'width="100%" '+'height="'+height+'" '+'frameborder="0" allowfullscreen></iframe>'}
container.html(frame)}
function t937_renderDescription(videoData,recid){var rec=$('#rec'+recid);var wrapper=rec.find('.t937__col_description');var titleContainer=wrapper.find('.t937__video-title');var descriptionContainer=wrapper.find('.t937__video-description');wrapper.addClass('t937__col_hidden');titleContainer.empty();descriptionContainer.empty();if(!videoData.description){return}
wrapper.removeClass('t937__col_hidden');var title=videoData.title&&videoData.title.length?videoData.title:t937_translate('videoTitle');var descriptionCotent=t937_parseDescription(videoData.description);titleContainer.text(title);descriptionContainer.html(descriptionCotent)}
function t937_renderVideoCount(data,recid,styles){var rec=$('#rec'+recid);var subheading=rec.find('.t937__subheading-title');var icon=rec.find('.t937__subheading-icon');var size=0;var color=styles.secondaryColor.length?styles.secondaryColor.replace('#','%23'):'%23111111';icon.css('backgroundImage','url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' width=\'16\' height=\'16\'%3E%3Ctitle%3Evideo playlist%3C/title%3E%3Cg class=\'nc-icon-wrapper\' stroke-width=\'1\' fill='+'\''+color+'\''+' stroke='+'\''+color+'\''+'%3E%3Crect x=\'0.5\' y=\'2.5\' width=\'15\' height=\'12\' rx=\'1\' fill=\'none\' stroke='+'\''+color+'\''+' stroke-linecap=\'round\' stroke-linejoin=\'round\'/%3E%3Cpolygon points=\'6.5 5.5 11.5 8.5 6.5 11.5 6.5 5.5\' fill=\'none\' stroke-linecap=\'round\' stroke-linejoin=\'round\' data-color=\'color-2\'/%3E%3Cline x1=\'3.5\' y1=\'0.5\' x2=\'12.5\' y2=\'0.5\' fill=\'none\' stroke='+'\''+color+'\''+' stroke-linecap=\'round\' stroke-linejoin=\'round\'/%3E%3C/g%3E%3C/svg%3E\"');for(var item in data){if(!data[item].section){size++}}
var videoPart=t937_translate('videoPart');subheading.text(size+' '+videoPart);}
function t937_renderFade(recid,color){color=color.length?color:'#ffffff';var rec=$('#rec'+recid);var playlistFade=rec.find('.t937__playlist-fade');var colorFrom=t937_hex2rgb(color,0);var colorTo=t937_hex2rgb(color,1);playlistFade.css('backgroundImage','linear-gradient('+colorFrom+' 0%, '+colorTo+' 90%)')}
function t937_parseDescription(string){var result=$('<div></div>');var parts=string.split('<br>');for(var i=0;i<parts.length;i++){var part=parts[i];if(!part.length){result.append($('<br>'))}else{result.append($('<p class="t937__paragraph"></p>').html(part))}}
return result.children()}
function t937_setSizes(recid,styles){var rec=$('#rec'+recid);var playlistWrapper=rec.find('.t937__playlist-wrap');var iframe=rec.find('.t937__video-frame');var playlistCol=rec.find('.t937__col_playlist');var description=rec.find('.t937__description');var videoCol=rec.find('.t937__col_video');var height=videoCol.width()*0.5625;iframe.attr('height',height);if(window.innerWidth>=960){$(description).css('width',videoCol.width());$(playlistWrapper).css('height',height+'px');$(playlistWrapper).css('max-height','');if(styles.playlistWidth.length){$(playlistCol).css('width',styles.playlistWidth)}}else{$(playlistWrapper).css('max-height',height+'px');$(playlistWrapper).css('height','');$(playlistCol).css('width','');$(description).css('width','')}}
function t937_translate(keyword){var dict=[];dict.videoTitle={RU:'Без названия',EN:'Untitled video',FR:'Vidéo sans titre',DE:'Video ohne Titel',ES:'Video sin título',PT:'Bez tytułu wideo',UK:'Відео без назви',JA:'無題の動画',ZH:'无标题的视频',};dict.videoPart={RU:'видео',EN:'videos',FR:'vidéos',DE:'videos',ES:'videos',PT:'filmy',UK:'відео',JA:'ビデオ',ZH:'影片',};dict.noData={RU:'Пожалуйста, добавьте хотя бы одно видео в плейлист',EN:'Please add at least one video to the playlist',};dict.wrongFormat={RU:'Пожалуйста, проверьте корректность заполненных данных',EN:'Please check that the data is filled in correctly',};var lang=window.browserLang;if(dict[keyword]!==undefined){if(dict[keyword][lang]!==undefined&&dict[keyword][lang]!==''){return dict[keyword][lang]}else{return dict[keyword].EN}}
return 'Text not found #'+keyword}
function t937_hex2rgb(hex,opacity){var h=hex.replace('#','');h=h.match(new RegExp('(.{'+h.length/3+'})','g'));for(var i=0;i<h.length;i++){h[i]=parseInt(h[i].length==1?h[i]+h[i]:h[i],16)}
if(typeof opacity!='undefined'){h.push(opacity)}
return 'rgba('+h.join(',')+')'}
function t937_addEvents(recid,styles){$(window).bind('resize',t_throttle(function(){t937_setSizes(recid,styles)}));$('.t937').bind('displayChanged',function(){t937_setSizes(recid,styles)});var rec=$('#rec'+recid);var playlistWrap=rec.find('.t937__playlist-wrap');var playlistFade=rec.find('.t937__playlist-fade');playlistWrap.on('scroll',function(){var height=playlistWrap.height();var scrollTop=playlistWrap.scrollTop();var scrollHeight=playlistWrap[0].scrollHeight;var marginBottom=30;if(height+scrollTop>=scrollHeight-marginBottom){playlistFade.css('backgroundImage','')}else{t937_renderFade(recid,styles.bgColor)}})}
function t937_onVideoClick(id,recid){var rec=$('#rec'+recid);var container=rec.find('.t937__playlist');var videoData=container.data('data-video-data');var styles=container.data('playlist-styles');window.location.hash='tlection='+recid+'_'+id;t937_renderPlaylist(videoData,id,recid,styles);t937_renderVideoFrame(videoData,id,recid,styles);t937_playVideo(recid)}
function t937_playVideo(recid){var rec=$('#rec'+recid);var videoFrame=rec.find('.t937__video-frame');if(videoFrame.length&&videoFrame.hasClass('t937__video-frame_youtube')){videoFrame.load(function(){var command='playVideo';videoFrame[0].contentWindow.postMessage('{"event":"command","func":"'+command+'","args":""}','*')})}}