function t190_scrollToTop(){$('html, body').animate({scrollTop:0},700)} 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)})}function t396_doResize(recid){var ww=$(window).width();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=$(window).width();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)}});$('#rec'+recid).find('.t396__artboard').removeClass('rendering').addClass('rendered')}function t396_ab__renderView(ab){var fields=window.tn.ab_fields;for(var i=0;i0){url+='&start='+startsec}if(endsec>0){url+='&end='+endsec}if(vihascover=='y'){url+='&autoplay=1';viel.html('')}else{if(typeof tmode!='undefined'&&tmode=='edit'){}else{if(autoplay=='y'){url+='&autoplay=1'}}if(window.lazy=='y'){viel.html('');el.append('')}else{viel.html('')}}}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(vihascover=='y'){url+='&autoplay=1';viel.html('')}else{if(typeof tmode!='undefined'&&tmode=='edit'){}else{if(autoplay=='y'){url+='&autoplay=1'}}if(window.lazy=='y'){viel.html('');el.append('')}else{viel.html('')}}}}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_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>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'){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;if(winTop>tipElTop){pos='bottom'}}if(pos=='bottom'){var tipElBottom=elBottom+padd+tipElHeight;if(winBottom0&&$(this).hasClass('t400__submit_hide-back')){t400_alltabs_updateContent(recid);$(this).removeClass('t400__submit_hide-back');btn.html(showMoreText);return} var rec_ids=$(this).attr('data-hidden-rec-ids').split(',');rec_ids.forEach(function(rec_id,i,arr){var rec_el=$('#rec'+rec_id);rec_el.removeClass('t400__off');rec_el.css('opacity','')});$('.t544, .t477, .t532, .t764, .t418, .t774, .t480, .t686, .t599, .t570, .t554, .t650, .t351, .t353, .t341, .t385, .t226, .t404, .t412, .t552, .t279, .t384, .t229, .t456, .t268, .t334, .t121, .t517, .t545, .t518, .t744, .t778, .t604, .t774, .t694, .t230, .t609, .t688, .t670, .t592, .t740').trigger('displayChanged');setTimeout(function(){$('.t351, .t353, .t341, .t410, .t385').trigger('displayChanged')},50);if(typeof hideBackText!='undefined'&&hideBackText.length>0){btn.addClass('t400__submit_hide-back');btn.html(hideBackText)}else{el.addClass('t400__off').hide()} if(window.lazy=='y'){t_lazyload_update()}});t400_alltabs_updateContent(recid);t400_checkSize(recid)} function t400_alltabs_updateContent(recid){var el=$('#rec'+recid);el.find(".t400__submit").each(function(i){var rec_ids=$(this).attr('data-hidden-rec-ids').split(',');rec_ids.forEach(function(rec_id,i,arr){var rec_el=$('#rec'+rec_id);rec_el.attr('data-animationappear','off');rec_el.addClass('t400__off')})})} function t400_checkSize(recid){var el=$("#rec"+recid).find(".t400__submit");if(el.length){var btnheight=el.height();var textheight=el[0].scrollHeight;if(btnheight"+btntext+"")}}} function t481_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="/"} $(".t481__list_item a[href='"+url+"']").addClass("t-active");$(".t481__list_item a[href='"+url+"/']").addClass("t-active");$(".t481__list_item a[href='"+pathname+"']").addClass("t-active");$(".t481__list_item a[href='/"+pathname+"']").addClass("t-active");$(".t481__list_item a[href='"+pathname+"/']").addClass("t-active");$(".t481__list_item a[href='/"+pathname+"/']").addClass("t-active")} function t481_checkAnchorLinks(recid){if($(window).width()>=960){var t481_navLinks=$("#rec"+recid+" .t481__list_item a:not(.tooltipstered)[href*='#']");if(t481_navLinks.length>0){t481_catchScroll(t481_navLinks)}}} function t481_catchScroll(t481_navLinks){var t481_clickedSectionId=null,t481_sections=new Array(),t481_sectionIdTonavigationLink={},t481_interval=100,t481_lastCall,t481_timeoutId,t481_offsetTop=$(".t270").attr("data-offset-top");if(typeof t481_offsetTop=="undefined"){t481_offsetTop=0} t481_navLinks=$(t481_navLinks.get().reverse());t481_navLinks.each(function(){var t481_cursection=t481_getSectionByHref($(this));if(typeof t481_cursection.attr("id")!="undefined"){t481_sections.push(t481_cursection)} t481_sectionIdTonavigationLink[t481_cursection.attr("id")]=$(this)});t481_highlightNavLinks(t481_navLinks,t481_sections,t481_sectionIdTonavigationLink,t481_clickedSectionId,t481_offsetTop);t481_navLinks.click(function(){if(!$(this).hasClass("tooltipstered")){t481_navLinks.removeClass('t-active');t481_sectionIdTonavigationLink[t481_getSectionByHref($(this)).attr("id")].addClass('t-active');t481_clickedSectionId=t481_getSectionByHref($(this)).attr("id")}});$(window).scroll(function(){var t481_now=new Date().getTime();if(t481_lastCall&&t481_now<(t481_lastCall+t481_interval)){clearTimeout(t481_timeoutId);t481_timeoutId=setTimeout(function(){t481_lastCall=t481_now;t481_clickedSectionId=t481_highlightNavLinks(t481_navLinks,t481_sections,t481_sectionIdTonavigationLink,t481_clickedSectionId,t481_offsetTop)},t481_interval-(t481_now-t481_lastCall))}else{t481_lastCall=t481_now;t481_clickedSectionId=t481_highlightNavLinks(t481_navLinks,t481_sections,t481_sectionIdTonavigationLink,t481_clickedSectionId,t481_offsetTop)}})} function t481_getSectionByHref(curlink){if(curlink.is('[href*="#rec"]')){return $(".r[id='"+curlink.attr("href").substring(1)+"']")}else{return $(".r[data-record-type='215']").has("a[name='"+curlink.attr("href").substring(1)+"']")}} function t481_highlightNavLinks(t481_navLinks,t481_sections,t481_sectionIdTonavigationLink,t481_clickedSectionId,offsetTop){var t481_scrollPosition=$(window).scrollTop(),t481_valueToReturn=t481_clickedSectionId;$(t481_sections).each(function(e){var t481_curSection=$(this),t481_sectionTop=t481_curSection.offset().top,t481_id=t481_curSection.attr('id'),t481_navLink=t481_sectionIdTonavigationLink[t481_id];if(t481_scrollPosition>=(t481_sectionTop-offsetTop)||(t481_sections[0].attr("id")==t481_id&&$(window).scrollTop()>=$(document).height()-$(window).height())){if(t481_clickedSectionId==null&&!t481_navLink.hasClass('t-active')){t481_navLinks.removeClass('t-active');t481_navLink.addClass('t-active');t481_valueToReturn=null}else{if(t481_clickedSectionId!=null&&t481_id==t481_clickedSectionId){t481_valueToReturn=null}} return!1}});return t481_valueToReturn} function t481_setPath(){} function t481_setWidth(recid){var window_width=$(window).width();if(window_width>980){$(".t481").each(function(){var el=$(this);var left_exist=el.find('.t481__leftcontainer').length;var left_w=el.find('.t481__leftcontainer').outerWidth(!0);var max_w=left_w;var right_exist=el.find('.t481__rightcontainer').length;var right_w=el.find('.t481__rightcontainer').outerWidth(!0);var items_align=el.attr('data-menu-items-align');if(left_wcenter_w+20){if(items_align=="center"||typeof items_align==="undefined"){el.find(".t481__leftside").css("min-width",max_w+"px");el.find(".t481__rightside").css("min-width",max_w+"px")}}else{el.find(".t481__leftside").css("min-width","");el.find(".t481__rightside").css("min-width","")}})}} function t481_setBg(recid){var window_width=$(window).width();if(window_width>980){$(".t481").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{$(".t481").each(function(){var el=$(this);var bgcolor=el.attr("data-bgcolor-hex");el.css("background-color",bgcolor);el.attr("data-bgcolor-setbyscript","yes")})}} function t481_appearMenu(recid){var window_width=$(window).width();if(window_width>980){$(".t481").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("visibility","visible");el.animate({"opacity":"1"},200,function(){})}}else{el.stop();el.animate({"opacity":"0"},200,function(){});el.css("visibility","hidden")}}})}} function t481_changebgopacitymenu(recid){var window_width=$(window).width();if(window_width>980){$(".t481").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'||menushadow==' '){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'||menushadow==' '){el.css("box-shadow","none")}else{el.css("box-shadow","0px 1px 3px rgba(0,0,0,"+menushadowvalue+")")}}})}} function t481_createMobileMenu(recid){var window_width=$(window).width(),el=$("#rec"+recid),menu=el.find(".t481"),burger=el.find(".t481__mobile");burger.click(function(e){menu.fadeToggle(300);$(this).toggleClass("t481_opened")}) $(window).bind('resize',t_throttle(function(){window_width=$(window).width();if(window_width>980){menu.fadeIn(0)}},200))} function t607_init(recid){t607_checkAnchorLinks(recid)} function t607_checkAnchorLinks(recid){if($(window).width()>=960){var t607_navLinks=$("#rec"+recid+" .t607__list_item a:not(.tooltipstered)[href*='#']");if(t607_navLinks.length>0){t607_catchScroll(t607_navLinks)}}} function t607_catchScroll(t607_navLinks){var t607_clickedSectionId=null,t607_sections=new Array(),t607_sectionIdTonavigationLink={},t607_interval=100,t607_lastCall,t607_timeoutId;t607_navLinks=$(t607_navLinks.get().reverse());t607_navLinks.each(function(){var t607_cursection=t607_getSectionByHref($(this));if(typeof t607_cursection.attr("id")!="undefined"){t607_sections.push(t607_cursection)} t607_sectionIdTonavigationLink[t607_cursection.attr("id")]=$(this)});t607_highlightNavLinks(t607_navLinks,t607_sections,t607_sectionIdTonavigationLink,t607_clickedSectionId);setTimeout(function(){t607_highlightNavLinks(t607_navLinks,t607_sections,t607_sectionIdTonavigationLink,t607_clickedSectionId)},1000);$(document).keydown(function(e){var t607_direction="";switch(e.which){case 38:t607_direction="top";break;case 40:t607_direction="bottom";break;case 33:t607_direction="top";break;case 34:t607_direction="bottom";break;default:return} if(t607_direction!=""){var t607_curActiveSectionId=t607_getSectionByHref(t607_navLinks.filter(".t-active")).attr("id"),t607_newActiveSectionIndex=$.map(t607_sections,function(obj,index){if(obj.attr("id")==t607_curActiveSectionId&&t607_direction=="top"){return index+1} if(obj.attr("id")==t607_curActiveSectionId&&t607_direction=="bottom"){return index-1}});var t607_newActiveSection=t607_sections[t607_newActiveSectionIndex[0]];if(typeof t607_newActiveSection=="undefined"){return} t607_navLinks.removeClass('t-active');var $root=$('html, body'),t607_offsetTop=$(".t607").attr("data-offset-top");t607_sectionIdTonavigationLink[t607_newActiveSection.attr("id")].addClass('t-active');t607_clickedSectionId=t607_newActiveSection.attr("id");if(typeof t607_offsetTop!="undefined"){$root.animate({scrollTop:t607_newActiveSection.offset().top-t607_offsetTop},500)}else{$root.animate({scrollTop:t607_newActiveSection.offset().top},500)}}});t607_navLinks.click(function(){if(!$(this).hasClass("tooltipstered")){t607_navLinks.removeClass('t-active');var t607_clickedSection=t607_getSectionByHref($(this)),$root=$('html, body'),t607_offsetTop=$(".t607").attr("data-offset-top");if(!$(this).hasClass("t-active")){t607_clickedSectionId=t607_clickedSection.attr("id")} t607_sectionIdTonavigationLink[t607_clickedSection.attr("id")].addClass('t-active');if(typeof t607_offsetTop!="undefined"){$root.animate({scrollTop:t607_clickedSection.offset().top-t607_offsetTop},500)}else{$root.animate({scrollTop:t607_clickedSection.offset().top},500)} return!1}});$(window).scroll(function(){var t607_now=new Date().getTime();if(t607_lastCall&&t607_now<(t607_lastCall+t607_interval)){clearTimeout(t607_timeoutId);t607_timeoutId=setTimeout(function(){t607_lastCall=t607_now;t607_clickedSectionId=t607_highlightNavLinks(t607_navLinks,t607_sections,t607_sectionIdTonavigationLink,t607_clickedSectionId)},t607_interval-(t607_now-t607_lastCall))}else{t607_lastCall=t607_now;t607_clickedSectionId=t607_highlightNavLinks(t607_navLinks,t607_sections,t607_sectionIdTonavigationLink,t607_clickedSectionId)}})} function t607_getSectionByHref(curlink){var t651_curLinkValue=curlink.attr("href").replace(/\s+/g,'');if(curlink.is('[href*="#rec"]')){return $(".r[id='"+t651_curLinkValue.substring(1)+"']")}else{return $(".r[data-record-type='215']").has("a[name='"+t651_curLinkValue.substring(1)+"']")}} function t607_highlightNavLinks(t607_navLinks,t607_sections,t607_sectionIdTonavigationLink,t607_clickedSectionId){var t607_scrollPosition=$(window).scrollTop(),t607_valueToReturn=t607_clickedSectionId;if(typeof t607_sections[t607_sections.length-2]!="undefined"&&t607_sections[t607_sections.length-2].offset().top<=$(window).height()/2&&t607_scrollPosition==0){t607_navLinks.removeClass('t-active');t607_navLink=t607_sectionIdTonavigationLink[t607_sections[t607_sections.length-1].attr("id")];t607_navLink.addClass('t-active');return null} $(t607_sections).each(function(e){var t607_curSection=$(this),t607_sectionTop=t607_curSection.offset().top,t607_id=t607_curSection.attr('id'),t607_navLink=t607_sectionIdTonavigationLink[t607_id];if((t607_scrollPosition+$(window).height()/2)>=t607_sectionTop||(t607_sections[0].attr("id")==t607_id&&$(window).scrollTop()>=$(document).height()-$(window).height())){if(t607_clickedSectionId==null&&!t607_navLink.hasClass('t-active')){t607_navLinks.removeClass('t-active');t607_navLink.addClass('t-active');t607_valueToReturn=null}else{if(t607_clickedSectionId!=null&&t607_id==t607_clickedSectionId){t607_valueToReturn=null}} return!1}});return t607_valueToReturn} function t702_onSuccess(t702_form){var t702_inputsWrapper=t702_form.find('.t-form__inputsbox');var t702_inputsHeight=t702_inputsWrapper.height();var t702_inputsOffset=t702_inputsWrapper.offset().top;var t702_inputsBottom=t702_inputsHeight+t702_inputsOffset;var t702_targetOffset=t702_form.find('.t-form__successbox').offset().top;if($(window).width()>960){var t702_target=t702_targetOffset-200}else{var t702_target=t702_targetOffset-100} if(t702_targetOffset>$(window).scrollTop()||($(document).height()-t702_inputsBottom)<($(window).height()-100)){t702_inputsWrapper.addClass('t702__inputsbox_hidden');setTimeout(function(){if($(window).height()>$('.t-body').height()){$('.t-tildalabel').animate({opacity:0},50)}},300)}else{$('html, body').animate({scrollTop:t702_target},400);setTimeout(function(){t702_inputsWrapper.addClass('t702__inputsbox_hidden')},400)} var successurl=t702_form.data('success-url');if(successurl&&successurl.length>0){setTimeout(function(){window.location.href=successurl},500)}} function t702_lockScroll(){var body=$("body");if(!body.hasClass('t-body_scroll-locked')){var bodyScrollTop=(typeof window.pageYOffset!=='undefined')?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;body.addClass('t-body_scroll-locked');body.css("top","-"+bodyScrollTop+"px");body.attr("data-popup-scrolltop",bodyScrollTop)}} function t702_unlockScroll(){var body=$("body");if(body.hasClass('t-body_scroll-locked')){var bodyScrollTop=$("body").attr("data-popup-scrolltop");body.removeClass('t-body_scroll-locked');body.css("top","");body.removeAttr("data-popup-scrolltop") window.scrollTo(0,bodyScrollTop)}} function t702_showPopup(recid){var el=$('#rec'+recid),popup=el.find('.t-popup');popup.css('display','block');el.find('.t-range').trigger('popupOpened');if(window.lazy=='y'){t_lazyload_update()} setTimeout(function(){popup.find('.t-popup__container').addClass('t-popup__container-animated');popup.addClass('t-popup_show')},50);$('body').addClass('t-body_popupshowed t702__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream){setTimeout(function(){t702_lockScroll()},500)} el.find('.t-popup').click(function(e){if(e.target==this){t702_closePopup()}});el.find('.t-popup__close').click(function(e){t702_closePopup()});el.find('a[href*=#]').click(function(e){var url=$(this).attr('href');if(!url||url.substring(0,7)!='#price:'){t702_closePopup();if(!url||url.substring(0,7)=='#popup:'){setTimeout(function(){$('body').addClass('t-body_popupshowed')},300)}}});$(document).keydown(function(e){if(e.keyCode==27){t702_closePopup()}})} function t702_closePopup(){$('body').removeClass('t-body_popupshowed t702__body_popupshowed');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&!window.MSStream){t702_unlockScroll()} $('.t-popup').removeClass('t-popup_show');setTimeout(function(){$('.t-popup').not('.t-popup_show').css('display','none')},300)} function t702_resizePopup(recid){var el=$("#rec"+recid),div=el.find(".t-popup__container").height(),win=$(window).height()-120,popup=el.find(".t-popup__container");if(div>win){popup.addClass('t-popup__container-static')}else{popup.removeClass('t-popup__container-static')}} function t702_sendPopupEventToStatistics(popupname){var virtPage='/tilda/popup/';var virtTitle='Popup: ';if(popupname.substring(0,7)=='#popup:'){popupname=popupname.substring(7)} virtPage+=popupname;virtTitle+=popupname;if(window.Tilda&&typeof Tilda.sendEventToStatistics=='function'){Tilda.sendEventToStatistics(virtPage,virtTitle,'',0)}else{if(ga){if(window.mainTracker!='tilda'){ga('send',{'hitType':'pageview','page':virtPage,'title':virtTitle})}} if(window.mainMetrika>''&&window[window.mainMetrika]){window[window.mainMetrika].hit(virtPage,{title:virtTitle,referer:window.location.href})}}} function t702_initPopup(recid){$('#rec'+recid).attr('data-animationappear','off');$('#rec'+recid).css('opacity','1');var el=$('#rec'+recid).find('.t-popup'),hook=el.attr('data-tooltip-hook'),analitics=el.attr('data-track-popup');if(hook!==''){var obj=$('a[href="'+hook+'"]');obj.click(function(e){t702_showPopup(recid);t702_resizePopup(recid);e.preventDefault();if(window.lazy=='y'){t_lazyload_update()} if(analitics>''){var virtTitle=hook;if(virtTitle.substring(0,7)=='#popup:'){virtTitle=virtTitle.substring(7)} Tilda.sendEventToStatistics(analitics,virtTitle)}})}} function t706_onSuccessCallback(t706_form){if(typeof localStorage==='object'){try{localStorage.removeItem("tcart")}catch(e){console.log('Your web browser does not support localStorage.')}} delete window.tcart;tcart__loadLocalObj();$(".t706__cartwin-products").slideUp(10,function(){});$(".t706__cartwin-bottom").slideUp(10,function(){});$(".t706 .t-form__inputsbox").slideUp(700,function(){});window.tcart_success='yes';try{tcart__unlockScroll()}catch(e){}} function t720_onSuccess(t720_form){var t720_inputsWrapper=t720_form.find('.t-form__inputsbox');var t720_inputsHeight=t720_inputsWrapper.height();var t720_inputsOffset=t720_inputsWrapper.offset().top;var t720_inputsBottom=t720_inputsHeight+t720_inputsOffset;var t720_targetOffset=t720_form.find('.t-form__successbox').offset().top;if($(window).width()>960){var t720_target=t720_targetOffset-200}else{var t720_target=t720_targetOffset-100} if(t720_targetOffset>$(window).scrollTop()||($(document).height()-t720_inputsBottom)<($(window).height()-100)){t720_inputsWrapper.addClass('t720__inputsbox_hidden');setTimeout(function(){if($(window).height()>$('.t-body').height()){$('.t-tildalabel').animate({opacity:0},50)}},300)}else{$('html, body').animate({scrollTop:t720_target},400);setTimeout(function(){t720_inputsWrapper.addClass('t720__inputsbox_hidden')},400)} var successurl=t720_form.data('success-url');if(successurl&&successurl.length>0){setTimeout(function(){window.location.href=successurl},500)}} function t720_fixcontentheight(id){var el=$("#rec"+id);var hcover=el.find(".t-cover").height();var hcontent=el.find("div[data-hook-content]").outerHeight();if(hcontent>300&&hcover1000){hcontent+=100} console.log('auto correct cover height: '+hcontent);el.find(".t-cover").height(hcontent);el.find(".t-cover__filter").height(hcontent);el.find(".t-cover__carrier").height(hcontent);el.find(".t-cover__wrapper").height(hcontent);if($isMobile==!1){setTimeout(function(){var divvideo=el.find(".t-cover__carrier");if(divvideo.find('iframe').length>0){console.log('correct video from cover_fixcontentheight');setWidthHeightYoutubeVideo(divvideo,hcontent+'px')}},2000)}}} function t778__init(recid){t778_unifyHeights(recid);$(window).load(function(){t778_unifyHeights(recid)});$(window).bind('resize',t_throttle(function(){t778_unifyHeights(recid)},200));$(".t778").bind("displayChanged",function(){t778_unifyHeights(recid)});setTimeout(function(){t_prod__init(recid);t778_initPopup(recid);t778__updateLazyLoad(recid)},500)} function t778__updateLazyLoad(recid){var scrollContainer=$("#rec"+recid+" .t778__container_mobile-flex");var curMode=$(".t-records").attr("data-tilda-mode");if(scrollContainer.length&&curMode!="edit"&&curMode!="preview"){scrollContainer.bind('scroll',t_throttle(function(){t_lazyload_update()},500))}} function t778_unifyHeights(recid){var t778_el=$('#rec'+recid),t778_blocksPerRow=t778_el.find(".t778__container").attr("data-blocks-per-row"),t778_cols=t778_el.find(".t778__content"),t778_mobScroll=t778_el.find(".t778__scroll-icon-wrapper").length;if($(window).width()<=480&&t778_mobScroll==0){t778_cols.css("height","auto");return} var t778_perRow=+t778_blocksPerRow;if($(window).width()<=960&&t778_mobScroll>0){var t778_perRow=t778_cols.length}else{if($(window).width()<=960){var t778_perRow=2}} for(var i=0;it778_maxHeight){t778_maxHeight=t778_itemHeight}});t778_row.css("height",t778_maxHeight)}} function t778_initPopup(recid){var rec=$('#rec'+recid);rec.find('[href^="#prodpopup"]').one("click",function(e){e.preventDefault();var el_popup=rec.find('.t-popup');var el_prod=$(this).closest('.js-product');var lid_prod=el_prod.attr('data-product-lid');t_sldsInit(recid+' #t778__product-'+lid_prod+'')});rec.find('[href^="#prodpopup"]').click(function(e){e.preventDefault();t778_showPopup(recid);var el_popup=rec.find('.t-popup');var el_prod=$(this).closest('.js-product');var lid_prod=el_prod.attr('data-product-lid');el_popup.find('.js-product').css('display','none');var el_fullprod=el_popup.find('.js-product[data-product-lid="'+lid_prod+'"]') el_fullprod.css('display','block');var analitics=el_popup.attr('data-track-popup');if(analitics>''){var virtTitle=el_fullprod.find('.js-product-name').text();if(!virtTitle){virtTitle='prod'+lid_prod} Tilda.sendEventToStatistics(analitics,virtTitle)} var curUrl=window.location.href;if(curUrl.indexOf('#!/tproduct/')<0&&curUrl.indexOf('%23!/tproduct/')<0){if(typeof history.replaceState!='undefined'){window.history.replaceState('','',window.location.href+'#!/tproduct/'+recid+'-'+lid_prod)}} t778_updateSlider(recid+' #t778__product-'+lid_prod+'');if(window.lazy=='y'){t_lazyload_update()}});if($('#record'+recid).length==0){t778_checkUrl(recid)} t778_copyTypography(recid)} function t778_checkUrl(recid){var curUrl=window.location.href;var tprodIndex=curUrl.indexOf('#!/tproduct/');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&tprodIndex<0){tprodIndex=curUrl.indexOf('%23!/tproduct/')} if(tprodIndex>=0){var curUrl=curUrl.substring(tprodIndex,curUrl.length);var curProdLid=curUrl.substring(curUrl.indexOf('-')+1,curUrl.length);var rec=$('#rec'+recid);if(curUrl.indexOf(recid)>=0&&rec.find('[data-product-lid='+curProdLid+']').length){rec.find('[data-product-lid='+curProdLid+'] [href^="#prodpopup"]').triggerHandler('click')}}} function t778_updateSlider(recid){var el=$('#rec'+recid);t_slds_SliderWidth(recid);var sliderWrapper=el.find('.t-slds__items-wrapper');var sliderWidth=el.find('.t-slds__container').width();var pos=parseFloat(sliderWrapper.attr('data-slider-pos'));sliderWrapper.css({transform:'translate3d(-'+(sliderWidth*pos)+'px, 0, 0)'});t_slds_UpdateSliderHeight(recid);t_slds_UpdateSliderArrowsHeight(recid)} function t778_showPopup(recid){var el=$('#rec'+recid);var popup=el.find('.t-popup');popup.css('display','block');setTimeout(function(){popup.find('.t-popup__container').addClass('t-popup__container-animated');popup.addClass('t-popup_show');if(window.lazy=='y'){t_lazyload_update()}},50);$('body').addClass('t-body_popupshowed');el.find('.t-popup').click(function(e){if(e.target==this){t778_closePopup()}});el.find('.t-popup__close, .t778__close-text').click(function(e){t778_closePopup()});$(document).keydown(function(e){if(e.keyCode==27){t778_closePopup()}})} function t778_closePopup(){$('body').removeClass('t-body_popupshowed');$('.t-popup').removeClass('t-popup_show');var curUrl=window.location.href;var indexToRemove=curUrl.indexOf('#!/tproduct/');if(/iPhone|iPad|iPod/i.test(navigator.userAgent)&&indexToRemove<0){indexToRemove=curUrl.indexOf('%23!/tproduct/')} curUrl=curUrl.substring(0,indexToRemove);setTimeout(function(){$(".t-popup").scrollTop(0);$('.t-popup').not('.t-popup_show').css('display','none');if(typeof history.replaceState!='undefined'){window.history.replaceState('','',curUrl)}},300)} function t778_removeSizeStyles(styleStr){if(typeof styleStr!="undefined"&&(styleStr.indexOf('font-size')>=0||styleStr.indexOf('padding-top')>=0||styleStr.indexOf('padding-bottom')>=0)){var styleStrSplitted=styleStr.split(';');styleStr="";for(var i=0;i=0||styleStrSplitted[i].indexOf('padding-top')>=0||styleStrSplitted[i].indexOf('padding-bottom')>=0){styleStrSplitted.splice(i,1);i--;continue} if(styleStrSplitted[i]==""){continue} styleStr+=styleStrSplitted[i]+";"}} return styleStr} function t778_copyTypography(recid){var rec=$('#rec'+recid);var titleStyle=rec.find('.t778__title').attr('style');var descrStyle=rec.find('.t778__descr').attr('style');rec.find('.t-popup .t778__title').attr("style",t778_removeSizeStyles(titleStyle));rec.find('.t-popup .t778__descr, .t-popup .t778__text').attr("style",t778_removeSizeStyles(descrStyle))} function t794_init(recid){var hook=$("#rec"+recid+" .t794").attr("data-tooltip-hook");if(typeof hook=="undefined"||hook==""){return};var hookLinks=$("a[href='"+hook+"']");hookLinks.addClass("t794__tm-link");hookLinks.attr("data-tooltip-menu-id",recid);t794_addArrow(recid,hookLinks);t794_setUpMenu(recid,hookLinks);t794_highlight()} function t794_setUpMenu(recid,hookLinks){var submenu=$("#rec"+recid+" .t794__tooltip-menu");if(isMobile){t794_setUpMenu_mobile(recid,hookLinks,submenu)}else{t794_setUpMenu_desktop(recid,hookLinks,submenu)} $(window).bind('scroll',t_throttle(function(){if(submenu.hasClass("t794__tooltip-menu_show")){t794_hideSubmenu(submenu)}},300));$(".t794__tooltip-menu a[href*=#]").click(function(){t794_hideSubmenu(submenu);$('.t450, .t199__mmenu, .t280, .t282, .t204__burger, .t451, .t466').trigger('clickedAnchorInTooltipMenu')})} function t794_setUpMenu_mobile(recid,hookLinks,submenu){var vIndent=$("#rec"+recid+" .t794").attr('data-tooltip-margin');hookLinks.on("click",function(e){if(submenu.hasClass("t794__tooltip-menu_show")){t794_hideSubmenu(submenu)}else{var curAnchor=$(this);t794_showSubmenu(curAnchor,submenu,vIndent)} e.preventDefault()});$(document).click(function(e){var isInsideSubmenu=($(e.target).hasClass("t794__tooltip-menu")||$(e.target).parents(".t794__tooltip-menu").length>0);var isAnchor=($(e.target).hasClass("t794__tm-link")||$(e.target).parents(".t794__tm-link").length>0);if(isAnchor){var curAnchor;if($(e.target).hasClass("t794__tm-link")){curAnchor=$(e.target)}else{curAnchor=$(e.target).parents(".t794__tm-link")} if(curAnchor.attr("data-tooltip-menu-id")!=recid&&submenu.hasClass("t794__tooltip-menu_show")){t794_hideSubmenu(submenu)}} if(!isInsideSubmenu&&!isAnchor&&submenu.hasClass("t794__tooltip-menu_show")){t794_hideSubmenu(submenu)}})} function t794_setUpMenu_desktop(recid,hookLinks,submenu){var vIndent=$("#rec"+recid+" .t794").attr('data-tooltip-margin');var timer;hookLinks.add(submenu).on("mouseover",function(){if($(this).hasClass("t794__tooltip-menu")&&!$(this).hasClass("t794__tooltip-menu_show")){return} clearTimeout(timer);if($(this).hasClass("t794__tooltip-menu")&&submenu.hasClass("t794__tooltip-menu_show")){return} var curAnchor=$(this);t794_showSubmenu(curAnchor,submenu,vIndent)});hookLinks.add(submenu).on("mouseout",function(){timer=setTimeout(function(){t794_hideSubmenu(submenu)},300)});hookLinks.on("click",function(e){e.preventDefault()})} function t794_showSubmenu(curAnchor,submenu,vIndent){var submenuHeight=submenu.outerHeight();var submenuWidth=submenu.outerWidth();var anchorHeight=curAnchor.height();var anchorWidth=curAnchor.width();if(curAnchor.hasClass('t-btn')){anchorWidth=curAnchor.outerWidth()} var winHeight=$(window).height();var winWidth=$(window).width();var scrollTop=$(window).scrollTop();var anchorLeft=curAnchor.offset().left;if(typeof vIndent!="undefined"&&vIndent!=""){vIndent=vIndent.replace("px","")*1;vIndent=vIndent+10} var posy=curAnchor.offset().top+anchorHeight+vIndent;var posx=anchorLeft;if(posy+submenuHeight>scrollTop+winHeight){posy=Math.max(posy-submenuHeight-anchorHeight-vIndent*2,scrollTop);submenu.removeClass("t794__tooltip-menu_bottom").addClass("t794__tooltip-menu_top")}else{submenu.removeClass("t794__tooltip-menu_top").addClass("t794__tooltip-menu_bottom")} if(posx+submenuWidth/2")})} function t794_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="/"} $(".t794__list_item a[href='"+url+"']").addClass("t-active");$(".t794__list_item a[href='"+url+"/']").addClass("t-active");$(".t794__list_item a[href='"+pathname+"']").addClass("t-active");$(".t794__list_item a[href='/"+pathname+"']").addClass("t-active");$(".t794__list_item a[href='"+pathname+"/']").addClass("t-active");$(".t794__list_item a[href='/"+pathname+"/']").addClass("t-active")};