1$(function() { 2 // NejÄastÄji vyhledávané dotazy 3 var $odkazy = $('.nejcastejsi_dotazy .odkazy'); 4 var $btnPrev = $('.nejcastejsi_dotazy .sipka_zpet'); 5 var $btnNext = $('.nejcastejsi_dotazy .sipka_vpred'); 6 var $link = $odkazy.length ? $odkazy.find('a').first() : $(); 7 var linkWidth = $link.length ? $link.outerWidth(true) : 220; 8 9 if ($odkazy.length && $btnPrev.length && $btnNext.length) { 10 $btnPrev.on('click', function() { 11 $odkazy.animate({ scrollLeft: $odkazy.scrollLeft() - linkWidth }, 300); 12 }); 13 14 $btnNext.on('click', function() { 15 $odkazy.animate({ scrollLeft: $odkazy.scrollLeft() + linkWidth }, 300); 16 }); 17 } 18 19 // Fotogalerie 20 var $galerie = $('.fotogalerie'); 21 var $obsah = $galerie.length ? $galerie.find('.fotogalerie_obsah') : $(); 22 23 function centerFoto($container, $foto, duration) { 24 if (!$container.length || !$foto.length) return; 25 var container = $container.get(0); 26 var foto = $foto.get(0); 27 if (!container || !foto) return; 28 var containerRect = container.getBoundingClientRect(); 29 var fotoRect = foto.getBoundingClientRect(); 30 var scrollLeft = $container.scrollLeft(); 31 var offset = fotoRect.left - containerRect.left + scrollLeft; 32 var center = offset - containerRect.width / 2 + fotoRect.width / 2; 33 $container.animate({ scrollLeft: center }, duration); 34 } 35 36 if ($obsah.length) { 37 var $allFotos = $obsah.find('a'); 38 if ($allFotos.length) { 39 var currentIdx = Math.floor($allFotos.length / 2); 40 41 function setAkcent(idx, duration) { 42 $allFotos.removeClass('akcentovane_foto'); 43 $allFotos.eq(idx).addClass('akcentovane_foto'); 44 centerFoto($galerie, $allFotos.eq(idx), duration); 45 } 46 setAkcent(currentIdx, 0); 47 48 $obsah.on('click', 'a', function(e) { 49 e.preventDefault(); 50 currentIdx = $allFotos.index(this); 51 setAkcent(currentIdx, 300); 52 }); 53 54 setInterval(function() { 55 currentIdx = (currentIdx + 1) % $allFotos.length; 56 setAkcent(currentIdx, 300); 57 }, 5000); 58 } 59 } 60 61 // 62 //vyhledavani open 63 $(".search_open").click(function() { 64 $('.search_win').toggleClass('active'); 65 $('.search_open').toggleClass('close'); 66 $("#find_in_redakce").focus(); 67 }); 68 69 $(".search_close_clona ").click(function() { 70 $('.search_win').toggleClass('active'); 71 $('.search_open').toggleClass('close'); 72 }); 73 74 // Navigace scroll efekt až za .uvodni_sekce 75 var $navigaceObal = $('.navigace_obal'); 76 var $uvodniSekce = $('.uvodni_sekce'); 77 if ($navigaceObal.length) { 78 $(window).on('scroll', function() { 79 var limit; 80 if ($uvodniSekce.length) { 81 limit = $uvodniSekce.outerHeight() * 0.7; 82 } else { 83 limit = $(window).height() * 0.5; 84 } 85 if ($(window).scrollTop() > limit) { 86 $navigaceObal.addClass('scroll'); 87 } else { 88 $navigaceObal.removeClass('scroll'); 89 } 90 }); 91 } 92 93 // Zobrazit karty v navigaci 94 var $navigace = $('.navigace'); 95 var $kartyObal = $('.karty_obal'); 96 if ($navigace.length && $kartyObal.length) { 97 var observer = new window.IntersectionObserver(function(entries) { 98 if (entries[0].intersectionRatio === 0) { 99 $navigace.css('display', 'flex'); 100 var $odkazy = $navigace.find('a'); 101 $odkazy.each(function(i, a) { 102 $(a).css({ 103 opacity: 0, 104 transform: 'translateX(-40px)' 105 }); 106 setTimeout(function() { 107 $(a).css({ 108 transition: 'opacity 0.4s, transform 0.4s', 109 opacity: 1, 110 transform: 'translateX(0)' 111 }); 112 }, 150 * i); 113 }); 114 } else { 115 $navigace.css('display', 'none');
116 var $odkazy = $navigace.find('a'); 117 $odkazy.each(function(i, a) { 118 $(a).css({ 119 transition: '', 120 opacity: 0, 121 transform: 'translateX(-40px)' 122 }); 123 }); 124 } 125 }, { threshold: 0 }); 126 observer.observe($kartyObal.get(0)); 127 } 128}); 129 130$(document).ready(function() { 131 if ($(".titulka").length) { 132 $.getScript("/js/as4u_buble.js", function() { 133 initBubletit(); 134 }); 135 } 136}); 137 138function initBubletit() { 139 // inicializace bublin as4u 140 var elmArr = jQuery('td[id ^= event_]'); 141 for (i = 0; i < elmArr.length; i++) { 142 var classinfo = jQuery(elmArr[i]).attr("id"); 143 var elmIDarr = classinfo.split('_'); 144 145 if (jQuery('#eventtext_' + elmIDarr[1]).html() != null) { 146 jQuery(elmArr[i])[0].setAttribute('alt', jQuery('#eventtext_' + elmIDarr[1]).html()); 147 } else { 148 jQuery(elmArr[i]).removeClass('as4uT2B_g'); 149 } 150 } 151 152 as4uBubble.setOptions({ 153 defaultIsTop: true, 154 bubleWidth: 300, 155 selector: '.as4uT2B_g', //jQuery selector pro bubliny bez ajaxu (z title nebo altu) 156 selectorAjax: 'a[id ^= as4utt_]', //selector pro bubliny s ajaxovym obsahem 157 ajaxUrlFce: function(element) { //generator url pro ajaxovy obsah 158 var arr = element.id.split('_'); 159 return '/redakce/ajax.php?akce=bubledata&htmlAjax=yes&dr=' + arr[2] + '&subakce=' + arr[1] + '&lanG=' + jQuery('#lanG').val(); 160 } 161 }); 162 as4uBubble.init(); 163} 164 165// Aktuality - rozbaleni textu pri hoveru 166document.addEventListener('DOMContentLoaded', function() { 167 document.querySelectorAll('.aktualita').forEach(function(aktualita) { 168 const p = aktualita.querySelector('.aktualita_obsah p'); 169 if (!p) return; 170 171 // Skryjeme text na zaÄátku 172 p.style.overflow = 'hidden'; 173 p.style.maxHeight = '0'; 174 p.style.opacity = '0'; 175 p.style.transition = 'max-height 0.4s, opacity 0.3s'; 176 177 // Desktop: hover 178 aktualita.addEventListener('mouseenter', function() { 179 p.style.maxHeight = p.scrollHeight + 'px'; 180 p.style.opacity = '1'; 181 }); 182 aktualita.addEventListener('mouseleave', function() { 183 p.style.maxHeight = '0'; 184 p.style.opacity = '0'; 185 }); 186 187 // Mobile: tap/click 188 aktualita.addEventListener('touchend', function(e) { 189 // ZabránÃme kliknutà na odkaz pÅi rozbalenà 190 if (p.style.opacity === '0' || p.style.maxHeight === '0px') { 191 e.preventDefault(); 192 p.style.maxHeight = p.scrollHeight + 'px'; 193 p.style.opacity = '1'; 194 } else { 195 p.style.maxHeight = '0'; 196 p.style.opacity = '0'; 197 } 198 }, { passive: false }); 199 }); 200}); 201 202 203$(window).scroll(function() { 204 var winScroll = $(this).scrollTop(); 205 if ($('.titulka').length) { 206 if (winScroll > 0) { 207 $('header').addClass('scroll'); 208 if ($(".goog-te-banner-frame").length) { 209 $('header').addClass('google_tr_init'); 210 } 211 } else { 212 $('header').removeClass('scroll'); 213 if (!$(".goog-te-banner-frame").length) { 214 $('header').removeClass('google_tr_init'); 215 } 216 } 217 } 218 219 // translator 220 if ($('body').css('top') == '40px' && $('.translator_on').length != true) { 221 $('header').addClass('translator_on'); 222 } else if ($('body').css('top') != '40px' && $('.translator_on').length) { 223 $('header').removeClass('translator_on'); 224 } 225 226});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.