function t121_setHeight(recid){ var div=$("#youtubeiframe"+recid); var height=div.width() * 0.5625; div.height(height); div.parent().height(height); } function t071_unifyHeights(recid) { $('#rec'+recid+' .t071 .t-container').each(function() { var highestBox = 0; $('.t071__wrapper', this).each(function(){ if($(this).height() > highestBox)highestBox = $(this).height(); }); if($(window).width()>=960){ $('.t071__wrapper',this).css('height', highestBox); }else{ $('.t071__wrapper',this).css('height', "auto"); } }); } function t113_highlight(recid){ 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 = "/"; } $(".t113__list_item a[href='"+url+"']").addClass("t-active"); $(".t113__list_item a[href='"+url+"/']").addClass("t-active"); $(".t113__list_item a[href='"+pathname+"']").addClass("t-active"); $(".t113__list_item a[href='/"+pathname+"']").addClass("t-active"); $(".t113__list_item a[href='"+pathname+"/']").addClass("t-active"); $(".t113__list_item a[href='/"+pathname+"/']").addClass("t-active"); } function t113_showMenu(recid,pageid){ var $flagmenudo = "2ok"; $(window).bind('scroll', function() { if ($(window).scrollTop() > 200) { if($flagmenudo != "1ok"){$flagmenudo="1";} } else { if($flagmenudo!="2ok"){$flagmenudo="2";} } if ($flagmenudo=="1") { $('.t113').addClass('t113__fixed'); $('.t113').css('display','none'); $('.t113').fadeIn( "slow" ); $('#rec'+recid).find('.t113__space').hide(); $flagmenudo="1ok"; } if ($flagmenudo=="2") { $('.t113').removeClass('t113__fixed'); $('#rec'+recid).find('.t113__space').show(); $flagmenudo="2ok"; } }); var current_path = window.location.pathname.split('/').pop(); if(current_path=="page"+pageid+".html"){ $("#t113linktopage"+pageid).css("opacity",".7"); } } function t113_setWidth(recid){ var t113timer; var el=$('#rec'+recid); $(window).resize(function() { if(t113timer) { window.clearTimeout(t113timer); } t113timer = window.setTimeout(function() { if($(window).width()>640){ var w1= el.find("div[data-hook-left]").width()+20+50; el.find(".t113__list").css("padding-right",w1+"px"); }else{ el.find(".t113__list").css("padding-right",10+"px"); } }, 100); }); $(window).resize(); } function t126_unifyHeights() { $('.t126 .t-container').each(function() { var highestBox = 0; $('.t126__title', this).each(function(){ $(this).css("height","auto"); if($(this).height() > highestBox)highestBox = $(this).height(); }); if($(window).width()>=960){ $('.t126__title',this).css('height', highestBox); }else{ $('.t126__title',this).css('height', "auto"); } var highestBox = 0; $('.t126__descr', this).each(function(){ if($(this).height() > highestBox)highestBox = $(this).height(); }); if($(window).width()>=960){ $('.t126__descr',this).css('height', highestBox); }else{ $('.t126__descr',this).css('height', "auto"); } }); } function t131_unifyHeights() { $('.t131 .t-container').each(function() { var highestBox = 0; $('.t131__title', this).each(function(){ if($(this).height() > highestBox)highestBox = $(this).height(); }); if($(window).width()>=960){ $('.t131__title',this).css('height', highestBox); }else{ $('.t131__title',this).css('height', "auto"); } var highestBox = 0; $('.t131__descr', this).each(function(){ if($(this).height() > highestBox)highestBox = $(this).height(); }); if($(window).width()>=960){ $('.t131__descr',this).css('height', highestBox); }else{ $('.t131__descr',this).css('height', "auto"); } }); } function t132_unifyHeights() { $('.t132__box').children('.t132__wrappper').each(function() { $(this).children('a').children('div').css('width', $(this).outerWidth()-1); $(this).children('a').children('div').css('height', $(this).outerHeight()-40); }); } if (! window.yashare2scriptLoaded){ var scriptService = document.createElement('script'); scriptService .src = "https://yastatic.net/share2/share.js"; scriptService .type = "text/javascript"; scriptService .charset = "UTF-8"; document.documentElement.appendChild(scriptService); window.yashare2scriptLoaded = true; } 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"); el.html("" + btntext + ""); } } } function t179_showvideo(recid){ $("#rec"+recid+" .t179__playbutton").css("display","none"); $("#rec"+recid+" .t179__videocontainer").css("display","block"); var height=$("#rec"+recid+" .t179__videocontainer").attr("data-height"); var youtubeid=$("#rec"+recid+" .t179__videocontainer").attr("data-youtube-id"); if(height=="")height="540"; $("#youtubeiframe_carier"+recid).html(""); if(height==""){ var div=$("#youtubeiframe"+recid); var height=div.width() * 0.5625; div.css("height",height); } } function t190_scrollToTop(){ $('html, body').animate({scrollTop: 0}, 700); } function t199_showMenu(recid){ var el=$("#rec"+recid); el.find('.t199__js__menu').each(function() { var $toggler = el.find('.t199__js__menu-toggler'), $menu = $(this), $body = $('body'), CLASS_MENU = 't199__is__menu'; $menu.find('.t199__menu-item').each(function() { if($(this).attr('href').indexOf('#') > -1 ){ $(this).on('click', function(e) { $body.removeClass(CLASS_MENU); }); } }); $toggler.on('click', function(e) { e.stopPropagation(); e.preventDefault(); $body.toggleClass(CLASS_MENU); }); $(document).on('click', function() { $body.removeClass(CLASS_MENU); }); $menu.on('click', function(e) { e.stopPropagation(); }); }) } function t199_positionHeader(recid){ var el=$("#rec"+recid); var $header = el.find('.t199__js__header'), isScrolling = false, CLASS_ACTIVE = 't199__is__active'; function updateHeader() { isScrolling = true; if ($(window).scrollTop() > 0) $header.addClass(CLASS_ACTIVE); else $header.removeClass(CLASS_ACTIVE); } setInterval(function() { if(isScrolling) { isScrolling = false; } }, 100); $(window).on('scroll', updateHeader) updateHeader(); } function t199_setPath(pageid){ } function t199_highlight(recid){ 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 = "/"; } $(".t199__menu a[href='"+url+"']").addClass("t-active"); $(".t199__menu a[href='"+url+"/']").addClass("t-active"); $(".t199__menu a[href='"+pathname+"']").addClass("t-active"); $(".t199__menu a[href='/"+pathname+"']").addClass("t-active"); $(".t199__menu a[href='"+pathname+"/']").addClass("t-active"); $(".t199__menu a[href='/"+pathname+"/']").addClass("t-active"); } function t199_checkAnchorLinks(recid) { if ($(window).width() >= 960) { var t199_navLinks = $("#rec"+recid+" .t-menu__link-item:not(.tooltipstered)[href*='#']"); if (t199_navLinks.length > 0) { t199_catchScroll(t199_navLinks); } } } function t199_catchScroll(t199_navLinks) { var t199_clickedSectionId = null, t199_sections = new Array(), t199_sectionIdTonavigationLink = [], t199_interval = 100, t199_lastCall, t199_timeoutId; t199_navLinks = $(t199_navLinks.get().reverse()); t199_navLinks.each(function() { var t199_cursection = t199_getSectionByHref($(this)); if (typeof t199_cursection.attr("id") != "undefined") { t199_sections.push(t199_cursection); } t199_sectionIdTonavigationLink[t199_cursection.attr("id")] = $(this); }); t199_updateSectionsOffsets(t199_sections); $(window).bind('resize', t_throttle(function(){t199_updateSectionsOffsets(t199_sections);}, 200)); $('.t199').bind('displayChanged',function(){t199_updateSectionsOffsets(t199_sections);}); setInterval(function(){t199_updateSectionsOffsets(t199_sections);},5000); t199_highlightNavLinks(t199_navLinks, t199_sections, t199_sectionIdTonavigationLink, t199_clickedSectionId); t199_navLinks.click(function() { if (!$(this).hasClass("tooltipstered")) { t199_navLinks.removeClass('t-active'); t199_sectionIdTonavigationLink[t199_getSectionByHref($(this)).attr("id")].addClass('t-active'); t199_clickedSectionId = t199_getSectionByHref($(this)).attr("id"); } }); $(window).scroll(function() { var t199_now = new Date().getTime(); if (t199_lastCall && t199_now < (t199_lastCall + t199_interval)) { clearTimeout(t199_timeoutId); t199_timeoutId = setTimeout(function() { t199_lastCall = t199_now; t199_clickedSectionId = t199_highlightNavLinks(t199_navLinks, t199_sections, t199_sectionIdTonavigationLink, t199_clickedSectionId); }, t199_interval - (t199_now - t199_lastCall)); } else { t199_lastCall = t199_now; t199_clickedSectionId = t199_highlightNavLinks(t199_navLinks, t199_sections, t199_sectionIdTonavigationLink, t199_clickedSectionId); } }); } function t199_updateSectionsOffsets(sections){ $(sections).each(function(){ var t199_curSection = $(this); t199_curSection.attr("data-offset-top",t199_curSection.offset().top); }); } function t199_getSectionByHref(curlink) { var t199_curLinkValue = curlink.attr("href").replace(/\s+/g, ''); if (curlink.is('[href*="#rec"]')) { return $(".r[id='" + t199_curLinkValue.substring(1) + "']"); } else { return $(".r[data-record-type='215']").has("a[name='" + t199_curLinkValue.substring(1) + "']"); } } function t199_highlightNavLinks(t199_navLinks, t199_sections, t199_sectionIdTonavigationLink, t199_clickedSectionId) { var t199_scrollPosition = $(window).scrollTop(), t199_valueToReturn = t199_clickedSectionId; /*if first section is not at the page top (under first blocks)*/ if (t199_sections.length != 0 && t199_clickedSectionId == null && t199_sections[t199_sections.length-1].attr("data-offset-top") > (t199_scrollPosition + 300)){ t199_navLinks.removeClass('t-active'); return null; } $(t199_sections).each(function(e) { var t199_curSection = $(this), t199_sectionTop = t199_curSection.attr("data-offset-top"), t199_id = t199_curSection.attr('id'), t199_navLink = t199_sectionIdTonavigationLink[t199_id]; if (((t199_scrollPosition + 300) >= t199_sectionTop) || (t199_sections[0].attr("id") == t199_id && t199_scrollPosition >= $(document).height() - $(window).height())) { if (t199_clickedSectionId == null && !t199_navLink.hasClass('t-active')) { t199_navLinks.removeClass('t-active'); t199_navLink.addClass('t-active'); t199_valueToReturn = null; } else { if (t199_clickedSectionId != null && t199_id == t199_clickedSectionId) { t199_valueToReturn = null; } } return false; } }); return t199_valueToReturn; } function t204_clickBurger(recid){ var el=$("#rec"+recid); el.find('#t204__burger').click(function(e){ t204_showMenu(recid); if(window.lazy=='y'){t_lazyload_update();} }); el.find('#t204__closelayer').click(function(e){ t204_hideMenu(recid); }); } function t204_showMenu(recid) { var el=$("#rec"+recid); el.find("#t204__menu").finish(); el.find('#t204__menu').css("visibility","visible"); el.find('#t204__menu').css("opacity","0"); el.find('#t204__menu').css("right","-300px"); el.find('#t204__menu').animate({"opacity": "1","right": "0px"}, 300); el.find('#t204__closelayer').css("visibility","visible"); } function t204_hideMenu(recid) { var el=$("#rec"+recid); el.find("#t204__menu").finish(); el.find('#t204__menu').css("visibility","hidden"); el.find('#t204__closelayer').css("visibility","hidden"); el.find(".t204__item a").each(function() { $(this).on('click', function(e) { t204_hideMenu(recid); }); }); } 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 t219_showcomments(recid){ $("#rec"+recid+" .t-btn").css("display","none"); $("#rec"+recid+" .t219__blocktitle").css("display","block"); var disqus_shortname = $("#rec"+recid+" .t219__disqusthread").attr('data-disqus-shortname'); console.log(disqus_shortname); if(disqus_shortname!==""){ var disqus_identifier = disqus_shortname; }else{ var disqus_identifier = "t_page_" + $("#rec"+recid+" .t219__disqusthread").attr("data-page-id"); } var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); } function t226_floating_init(el){ console.log('floating_init'); var wnd=$(window); var col=el.parent(); el.css('max-width',el.width()); el.css('width','100%'); col.css('min-height',el.height()); var timer; var timer_count=0; var timer_react=5; wnd.scroll(function() { if(timer) { window.clearTimeout(timer); if(timer_count>=timer_react){ t226_floating_scroll(el,wnd,col); timer_count=0; } timer_count++; } timer = window.setTimeout(function() { t226_floating_scroll(el,wnd,col); timer_count=0; }, 50); }); wnd.resize(function() { wnd.scroll(); }); wnd.scroll(); } function t226_floating_scroll(el,wnd,col){ var wnd_height = wnd.height(); var wnd_width = wnd.width(); if(wnd_width<=1024){ el.removeClass('t226__fixedTop'); el.removeClass('t226__fixedBottom'); el.removeClass('t226__floating'); return(''); } el.css('max-width',col.width()); if(col.height()0){ col.height(el.height()); } var el_height = el.height(); var col_top = col.offset().top; var col_width = col.width(); var col_height = col.height(); var col_bottom = col_top + col_height; var wnd_top = wnd.scrollTop(); var wnd_bottom = wnd_top + wnd_height; if(wnd_top+el_height+50 >= col_bottom){ //console.log('fixedbottom'); el.addClass('t226__fixedBottom'); el.removeClass('t226__fixedTop'); el.removeClass('t226__floating'); }else if(wnd_top+50 > col_top){ //console.log('floating'); el.addClass('t226__floating'); el.removeClass('t226__fixedBottom'); el.removeClass('t226__fixedTop'); }else{ //console.log('fixedtop'); el.addClass('t226__fixedTop'); el.removeClass('t226__fixedBottom'); el.removeClass('t226__floating'); } } 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) { if ($(window).width() >= 960) { var t228_navLinks = $("#rec" + recid + " .t228__list_item a:not(.tooltipstered)[href*='#']"); if (t228_navLinks.length > 0) { t228_catchScroll(t228_navLinks); } } } function t228_catchScroll(t228_navLinks) { var t228_clickedSectionId = null, t228_sections = new Array(), 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_updateSectionsOffsets(t228_sections); t228_sections.sort(function(a, b) { return b.attr("data-offset-top") - a.attr("data-offset-top"); }); $(window).bind('resize', t_throttle(function(){t228_updateSectionsOffsets(t228_sections);}, 200)); $('.t228').bind('displayChanged',function(){t228_updateSectionsOffsets(t228_sections);}); setInterval(function(){t228_updateSectionsOffsets(t228_sections);},5000); t228_highlightNavLinks(t228_navLinks, t228_sections, t228_sectionIdTonavigationLink, t228_clickedSectionId); t228_navLinks.click(function() { var t228_clickedSection = t228_getSectionByHref($(this)); if (!$(this).hasClass("tooltipstered") && typeof t228_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_updateSectionsOffsets(sections){ $(sections).each(function(){ var t228_curSection = $(this); t228_curSection.attr("data-offset-top",t228_curSection.offset().top); }); } function t228_getSectionByHref(curlink) { var t228_curLinkValue = curlink.attr("href").replace(/\s+/g, ''); if (t228_curLinkValue[0]=='/') { t228_curLinkValue = t228_curLinkValue.substring(1); } if (curlink.is('[href*="#rec"]')) { return $(".r[id='" + t228_curLinkValue.substring(1) + "']"); } else { return $(".r[data-record-type='215']").has("a[name='" + t228_curLinkValue.substring(1) + "']"); } } function t228_highlightNavLinks(t228_navLinks, t228_sections, t228_sectionIdTonavigationLink, t228_clickedSectionId) { var t228_scrollPosition = $(window).scrollTop(), t228_valueToReturn = t228_clickedSectionId; /*if first section is not at the page top (under first blocks)*/ if (t228_sections.length != 0 && t228_clickedSectionId == null && t228_sections[t228_sections.length-1].attr("data-offset-top") > (t228_scrollPosition + 300)){ t228_navLinks.removeClass('t-active'); return null; } $(t228_sections).each(function(e) { var t228_curSection = $(this), t228_sectionTop = t228_curSection.attr("data-offset-top"), t228_id = t228_curSection.attr('id'), 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 false; } }); return t228_valueToReturn; } function t228_setPath(){ } function t228_setWidth(recid){ var window_width=$(window).width(); if(window_width>980){ $(".t228").each(function() { var el=$(this); var left_exist=el.find('.t228__leftcontainer').length; var left_w=el.find('.t228__leftcontainer').outerWidth(true); var max_w=left_w; var right_exist=el.find('.t228__rightcontainer').length; var right_w=el.find('.t228__rightcontainer').outerWidth(true); var items_align=el.attr('data-menu-items-align'); if(left_wcenter_w+20){ //if(left_exist>0 && right_exist>0){ 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",""); } }); } } function t228_setBg(recid){ var window_width=$(window).width(); if(window_width>980){ $(".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{ $(".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 window_width=$(window).width(); if(window_width>980){ $(".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 window_width=$(window).width(); if(window_width>980){ $(".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 == false)){ 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 == false)){ el.css("box-shadow","none"); }else{ el.css("box-shadow","0px 1px 3px rgba(0,0,0,"+ menushadowvalue +")"); } } }); } } function t228_createMobileMenu(recid){ var window_width=$(window).width(), el=$("#rec"+recid), menu=el.find(".t228"), burger=el.find(".t228__mobile"); burger.click(function(e){ menu.fadeToggle(300); $(this).toggleClass("t228_opened") }) $(window).bind('resize', t_throttle(function(){ window_width=$(window).width(); if(window_width>980){ menu.fadeIn(0); } }, 200)); } function t229_highlight(recid){ 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 = "/"; } $(".t229__list_item a[href='"+url+"']").addClass("t-active"); $(".t229__list_item a[href='"+url+"/']").addClass("t-active"); $(".t229__list_item a[href='"+pathname+"']").addClass("t-active"); $(".t229__list_item a[href='/"+pathname+"']").addClass("t-active"); $(".t229__list_item a[href='"+pathname+"/']").addClass("t-active"); $(".t229__list_item a[href='/"+pathname+"/']").addClass("t-active"); } function t229_checkAnchorLinks(recid) { if ($(window).width() >= 960) { var t229_navLinks = $("#rec" + recid + " .t229__list_item a:not(.tooltipstered)[href*='#']"); if (t229_navLinks.length > 0) { t229_catchScroll(t229_navLinks); } } } function t229_catchScroll(t229_navLinks) { var t229_clickedSectionId = null, t229_sections = new Array(), t229_sectionIdTonavigationLink = [], t229_interval = 100, t229_lastCall, t229_timeoutId; t229_navLinks = $(t229_navLinks.get().reverse()); t229_navLinks.each(function() { var t229_cursection = t229_getSectionByHref($(this)); if (typeof t229_cursection.attr("id") != "undefined") { t229_sections.push(t229_cursection); } t229_sectionIdTonavigationLink[t229_cursection.attr("id")] = $(this); }); t229_updateSectionsOffsets(t229_sections); t229_sections.sort(function(a, b) { return b.attr("data-offset-top") - a.attr("data-offset-top"); }); $(window).bind('resize', t_throttle(function(){t229_updateSectionsOffsets(t229_sections);}, 200)); $('.t229').bind('displayChanged',function(){t229_updateSectionsOffsets(t229_sections);}); setInterval(function(){t229_updateSectionsOffsets(t229_sections);},5000); t229_highlightNavLinks(t229_navLinks, t229_sections, t229_sectionIdTonavigationLink, t229_clickedSectionId); t229_navLinks.click(function() { var t229_clickedSection = t229_getSectionByHref($(this)); if (!$(this).hasClass("tooltipstered") && typeof t229_clickedSection.attr("id") != "undefined") { t229_navLinks.removeClass('t-active'); $(this).addClass('t-active'); t229_clickedSectionId = t229_getSectionByHref($(this)).attr("id"); } }); $(window).scroll(function() { var t229_now = new Date().getTime(); if (t229_lastCall && t229_now < (t229_lastCall + t229_interval)) { clearTimeout(t229_timeoutId); t229_timeoutId = setTimeout(function() { t229_lastCall = t229_now; t229_clickedSectionId = t229_highlightNavLinks(t229_navLinks, t229_sections, t229_sectionIdTonavigationLink, t229_clickedSectionId); }, t229_interval - (t229_now - t229_lastCall)); } else { t229_lastCall = t229_now; t229_clickedSectionId = t229_highlightNavLinks(t229_navLinks, t229_sections, t229_sectionIdTonavigationLink, t229_clickedSectionId); } }); } function t229_updateSectionsOffsets(sections){ $(sections).each(function(){ var t229_curSection = $(this); t229_curSection.attr("data-offset-top",t229_curSection.offset().top); }); } function t229_getSectionByHref(curlink) { var t229_curLinkValue = curlink.attr("href").replace(/\s+/g, ''); if (t229_curLinkValue[0]=='/') { t229_curLinkValue = t229_curLinkValue.substring(1); } if (curlink.is('[href*="#rec"]')) { return $(".r[id='" + t229_curLinkValue.substring(1) + "']"); } else { return $(".r[data-record-type='215']").has("a[name='" + t229_curLinkValue.substring(1) + "']"); } } function t229_highlightNavLinks(t229_navLinks, t229_sections, t229_sectionIdTonavigationLink, t229_clickedSectionId) { var t229_scrollPosition = $(window).scrollTop(), t229_valueToReturn = t229_clickedSectionId; /*if first section is not at the page top (under first blocks)*/ if (t229_sections.length != 0 && t229_clickedSectionId == null && t229_sections[t229_sections.length-1].attr("data-offset-top") > (t229_scrollPosition + 300)){ t229_navLinks.removeClass('t-active'); return null; } $(t229_sections).each(function(e) { var t229_curSection = $(this), t229_sectionTop = t229_curSection.attr("data-offset-top"), t229_id = t229_curSection.attr('id'), t229_navLink = t229_sectionIdTonavigationLink[t229_id]; if (((t229_scrollPosition + 300) >= t229_sectionTop) || (t229_sections[0].attr("id") == t229_id && t229_scrollPosition >= $(document).height() - $(window).height())) { if (t229_clickedSectionId == null && !t229_navLink.hasClass('t-active')) { t229_navLinks.removeClass('t-active'); t229_navLink.addClass('t-active'); t229_valueToReturn = null; } else { if (t229_clickedSectionId != null && t229_id == t229_clickedSectionId) { t229_valueToReturn = null; } } return false; } }); return t229_valueToReturn; } function t229_setPath(pageid){ } function t229_setBg(recid){ var window_width=$(window).width(); if(window_width>980){ $(".t229").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{ $(".t229").each(function() { var el=$(this); var bgcolor=el.attr("data-bgcolor-hex"); el.css("background-color",bgcolor); el.attr("data-bgcolor-setbyscript","yes"); }); } } function t229_appearMenu(recid) { var window_width=$(window).width(); if(window_width>980){ $(".t229").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"); el.animate({"opacity": "1","top": "0px"}, 200,function() { }); } }else{ el.stop(); el.css("visibility","hidden"); } } }); } } function t229_changeBgOpacityMenu(recid) { var window_width=$(window).width(); if(window_width>980){ $(".t229").each(function() { var el=$(this); var bgcolor=el.attr("data-bgcolor-rgba"); var bgcolor_afterscroll=el.attr("data-bgcolor-rgba-afterscroll"); if ($(window).scrollTop() > 20) { el.css("background-color",bgcolor_afterscroll); }else{ el.css("background-color",bgcolor); } }); } } function t235__next(){ if((cur+1)>=$(".r").not('[data-t263-block-notslide=yes]').size())return; cur++; $(".r").not('[data-t263-block-notslide=yes]').each(function(i) { if((cur-1)==i){ var el=$(this); var trans_out_y='-100px'; if(el.height()+100>$(window).height())trans_out_y='0px'; el.transition({ y: trans_out_y,opacity: 0},250,'out',function() { el.css('display','none'); }); } if(cur==i){ var el=$(this); var speed='slow'; if(cur==0){ speed=0; } el.css('display','none'); var trans_in_y='50px'; if(el.height()+100>$(window).height())trans_in_y='0px'; el.transition({y:trans_in_y},1,'ease',function() {}); el.animate({opacity:"0"}, 300, function() { el.css('display','block'); el.css('opacity','0'); el.transition({y:'0px',opacity: 1},500,'ease',function() {}); $('.r').removeClass('t235__active'); el.addClass('t235__active'); if(typeof lazyload_cover=='object')lazyload_cover.update(); if(typeof lazyload_img=='object')lazyload_img.update(); if(typeof lazyload_bgimg=='object')lazyload_bgimg.update(); }); if(el.height()>$(window).height()){ $('#t235__scrldonwicon').fadeIn('slow',function(){ $('#t235__scrldonwicon').delay(1000).fadeOut('slow'); }); } var bg=el.attr('data-bg-color'); if(bg!==undefined && bg!=='none'){ $('#allrecordstable').css('background-color',bg); }else{ $('#allrecordstable').css('background-color',''); } } }); t235__update(); setTimeout(function(){ $(window).trigger('resize'); $("#allrecords").css('width', $(window).width()+'px'); },400); } function t235__prev(){ if((cur-1)==-1)return; cur--; $(".r").not('[data-t263-block-notslide=yes]').each(function(i) { if((cur+1)==i){ var el=$(this); el.css('display','none'); } if(cur==i){ var el=$(this); el.css('display','block'); el.css('opacity','0'); el.transition({ y: '0px'},1,'easeOutSine'); el.animate({opacity:"1"}, 50, function() {}); $('.r').removeClass('t235__active'); el.addClass('t235__active'); var bg=el.attr('data-bg-color'); if(bg!==undefined && bg!=='none'){ $('#allrecordstable').css('background-color',bg); }else{ $('#allrecordstable').css('background-color',''); } } }); t235__update(); setTimeout(function(){ $(window).trigger('resize'); $("#allrecords").css('width', $(window).width()+'px'); },400); } function t235__galnext(){ var elactive=$('.t235__active'); var tplid=elactive.attr('data-record-type'); if(tplid=='5')elactive.find('[data-slide=next]').trigger('click'); } function t235__update(){ var c=cur+1; var t=$(".r").not('[data-t263-block-notslide=yes]').size(); $('.t235__count').html(c+'/'+t); if(typeof lazyload_cover=='object')lazyload_cover.update(); if(typeof lazyload_img=='object')lazyload_img.update(); if(typeof lazyload_bgimg=='object')lazyload_bgimg.update(); } function t235__init(){ $("#allrecords").wrap("
"); $("#allrecords").css('width', $(window).width()+'px'); var wnd = $(window); $(".r").not('[data-t263-block-notslide=yes]').each(function(i) { var el=$(this); el.css('padding','0px'); if(el.height()>wnd.height()){ el.css('padding-top','150px'); el.css('padding-bottom','150px'); } el.css('display','none'); el.css('opacity',''); el.css('background-color',''); }); t235__next(); $('#tildacopy').css('display','none'); $('.t235').css('right','-=100'); setTimeout(function() { $('.t235').addClass('t235_anim'); $('.t235').css('right','+=100'); }, 800); $(document).keydown(function(e) { switch(e.which) { case 38: t235__prev(); break; case 40: t235__next(); break; case 33: t235__prev(); break; case 34: t235__next(); break; case 32: t235__next(); break; case 190: t235__galnext(); break; default: return; } if(e.which!=190){ e.preventDefault(); } }); $('#allrecordstable').css('transition','background-color 500ms linear'); $('.t-cover__carrier').css('background-attachment','scroll'); } function t232_expandtext(recid){ $("#rec"+recid).find(".t232__text").toggle(); } window.t256showvideo = function(recid){ $(document).ready(function(){ var el = $('#coverCarry'+recid); var videourl = ''; var youtubeid=$("#rec"+recid+" .t256__video-container").attr('data-content-popup-video-url-youtube'); if(youtubeid > '') { videourl = 'https://www.youtube.com/embed/' + youtubeid; } $("body").addClass("t256__overflow"); $("#rec"+recid+" .t256__cover").addClass( "t256__hidden"); $("#rec"+recid+" .t256__video-container").removeClass( "t256__hidden"); $("#rec"+recid+" .t256__video-carier").html("
"); }); } window.t256hidevideo = function(recid){ $(document).ready(function(){ $("body").removeClass("t256__overflow"); $("#rec"+recid+" .t256__cover").removeClass( "t256__hidden"); $("#rec"+recid+" .t256__video-container").addClass( "t256__hidden"); $("#rec"+recid+" .t256__video-carier").html("
"); }); } function t260_init(){ $(".t260").each(function() { var el=$(this); if(el.attr('data-block-init')=='yes'){ }else{ el.attr('data-block-init','yes'); var toggler = el.find(".t260__header"); var content = el.find(".t260__content"); toggler.click(function() { $(this).toggleClass("t260__opened"); if($(this).hasClass("t260__opened")==true){ content.slideDown(); }else{ content.slideUp(); } }) } }); } function t262_appendGoogleMap(recid, key) { var grecid = recid; if (typeof google === 'object' && typeof google.maps === 'object') { t262_handleGoogleApiReady(grecid); } else { if(window.googleapiiscalled!==true){ var runfunc = 'window.t262_handleGoogleApiReady_'+grecid+' = function () { t262_handleGoogleApiReady("'+grecid+'") }'; eval(runfunc); var script = document.createElement("script"); script.type = "text/javascript"; script.src = "//maps.google.com/maps/api/js?key="+jQuery.trim(key)+"&callback=t262_handleGoogleApiReady_"+grecid; document.body.appendChild(script); window.googleapiiscalled=true; } else { setTimeout(function(){ t262_appendGoogleMap(grecid, key); },200); } } } function t262_setMapHeight(recid) { var el=$('#rec'+recid); var map = el.find('.t262__map'); var textwrapper = el.find('.t262__col_text').height(); map.css('height', textwrapper); } function t262_handleGoogleApiReady(recid){ $('#rec'+recid).find('.t262__map').each(function(index,Element) { var el=$(Element); var arMarkers = window['arMapMarkers'+recid]; window.isDragMap = $isMobile ? false : true; var myLatLng = arMarkers.length > 0 ? new google.maps.LatLng(parseFloat(arMarkers[0].lat), parseFloat(arMarkers[0].lng)) : false; var myOptions = { zoom: parseInt(el.attr('data-map-zoom')), center:myLatLng, scrollwheel: false, draggable: window.isDragMap, zoomControl: true }; var map = new google.maps.Map(Element, myOptions); var i, mrk, marker, markers=[], infowindow; var bounds = new google.maps.LatLngBounds(); for(i in arMarkers) { mrk = arMarkers[i]; myLatLng = new google.maps.LatLng(parseFloat(mrk.lat), parseFloat(mrk.lng)); marker = new google.maps.Marker({ position: myLatLng, map: map, title: mrk.title }); bounds.extend(myLatLng); if (mrk.descr > '') { attachInfoMessage(marker, mrk.descr); } else { attachInfoMessage(marker, mrk.title); } markers[markers.length] = marker; infowindow=''; marker=''; } function attachInfoMessage(marker, descr) { var infowindow = new google.maps.InfoWindow({ content: $("