PageSourceSearch

https://lienz.gv.at/templates/yootheme_lienz/js/custom.js?4.5.36

js lienz.gv.at collected 2026-10-02 19:10:20 UTC 31,516 bytes, 712 lines download raw bytes

1$(document).ready(function () {
2
3  registerIcon();
4  hideElements($(".stadtmarkt-anbieter .kontaktbox-container"), 4);
5  hideElements($(".adventmarkt-anbieter .kontaktbox-container"), 4);
6  responsiveAdventImageMap();
7
8  var $style = $('style.uk-margin-remove-adjacent');
9  if ($style.length) {
10    $style.remove();
11  }
12
13  const urlParamsAnkern = new URLSearchParams(window.location.search);
14  const anker = urlParamsAnkern.get("anker");
15  if (anker === "smarteslienz") {
16      setTimeout(function () {
17          const $link = $('a[title="Smartes Lienz App"]');
18          if ($link.length) {
19              $link[0].click();
20          } else {
21              console.warn('Link mit dem title "Smartes Lienz App" wurde nicht gefunden.');
22          }
23      }, 500); 
24  }
25
26  document.querySelectorAll('.beitragsboxen .uk-grid.tm-grid-expand.uk-child-width-1-1.uk-grid-margin').forEach(function(element) {
27    if (!element.querySelector('.linkbox-container')) {
28        element.style.display = 'none';
29    }
30  });
31
32
33 	$(".djacc__openbtn--custom > img, #barrierefrei-trigger > img").attr("alt", "Barrierefreiheitssymbol mit stilisierter Person");
34 
35	$("#lienz-mobile-menu > li").each(function() {
36        let subtitleText = $(this).find(".uk-nav-subtitle").text().trim();
37        let imgElement = $(this).find("img");
38
39        if (subtitleText && imgElement.length) {
40            imgElement.attr("alt", subtitleText);
41        }
42    });
43
44	$("#tm-dialog-mobile .main-menu-row .main-menu-column-1 .menu-grid-links > div .el-item").each(function() {
45		if ($(this).find(".uk-icon[uk-icon='1']").length) {
46			$(this).addClass("menu-item-active");
47		}
48	});
49
50  $('.open-search-popup a').on('click', function(e) {
51      setTimeout(function() {
52          $('#search-form-popup .uk-search-input').focus();
53      }, 500); // Wartezeit anpassen, falls nötig
54  });
55 
56 
57  $('#skiplink-menu').on('click', function() {
58    UIkit.toggle('#tm-dialog-mobile').toggle();
59    $('#tm-dialog-mobil input').focus();
60  });
61
62  $('.infobox-grid-menu a:last').on('blur', function() {
63    UIkit.toggle('#tm-dialog-mobile').toggle();
64  });
65
66
67  var form = document.querySelector("#cf_4");
68    if (form) {
69      form.addEventListener("beforeSubmit", function(event) {
70        // Get the dropdown values
71        var normalValue = document.querySelector("#form4_ticketsnormal").value;
72        var reducedValue = document.querySelector("#form4_ticketsreduced").value;
73
74        // Check if both values are "-"
75        if (normalValue === "-" && reducedValue === "-") {
76            // Prevent form submission
77            event.preventDefault();
78            alert("Bitte wählen Sie die Anzahl der gewünschten Karten aus!");
79            return false;
80        } 
81    });
82  }
83 
84  
85
86
87  $('a[href="#uc-corner-modal-show"]').on('click', function(event) {
88    event.preventDefault(); // Verhindert den Standard-Link-Scroll
89    if (window.__ucCmp && typeof window.__ucCmp.showSecondLayer === 'function') {
90        window.__ucCmp.showSecondLayer();
91    } else {
92        console.error('window.__ucCmp.showSecondLayer ist nicht verfügbar');
93    }
94  });
95
96  //can't use var or let here for the querySelector
97  const adElement = document.querySelector('a.langChoose');
98
99  // Add event listeners for mouse and focus events
100  if (adElement) {
101    adElement.addEventListener("mouseover", mOver, false);
102    adElement.addEventListener("focus", mOver, false);
103  }
104  
105
106  // Function to handle "over" actions
107  function mOver() {
108    document.querySelector('.lang-block').classList.add("displayed");
109  }
110
111   //can't use var or let here for the querySelector
112   const djaccElement = document.querySelector('button.djacc__openbtn');
113
114   // Add event listeners for mouse and focus events
115   if (djaccElement) {
116   djaccElement.addEventListener("mouseover", mOut, false);
117   djaccElement.addEventListener("focus", mOut, false);
118   }
119  function mOut() {
120    document.querySelector('.lang-block').classList.remove("displayed");
121  }
122
123
124  window.addEventListener('UC_CONSENT', function (event) {
125    const mapsServiceId = 'Nn4Xy8TOiDF54P';
126    const mapsService = event.detail.services[mapsServiceId];
127    const iframe = document.getElementById('maps-iframe');
128    const cookieNotice = document.getElementById('cookie-notice');
129
130    if (mapsService?.consent?.given) {
131        if (iframe) {
132            iframe.src = iframe.getAttribute('data-src');
133            iframe.style.display = 'block';
134        }
135        if (cookieNotice) {
136            cookieNotice.style.display = 'none';
137        }
138    } else {
139        if (iframe) {
140            iframe.style.display = 'none';
141            iframe.removeAttribute('src');
142        }
143        if (cookieNotice) {
144            cookieNotice.style.display = 'block';
145        }
146    }
147});
148    
149
150
151  $("#galerie-section ul").attr("uk-lightbox", "animation: fade");
152  
153  // Custom UIkit icons
154  function registerIcon() {
155    // UIkit.icon.add('name-icon', 'svg');
156    UIkit.icon.add(
157      "arrow-right-icon",
158      '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17" fill="none"><path d="M1 8.27273H19.1818M19.1818 8.27273L12.0795 1M19.1818 8.27273L12.0795 15.5455" stroke="#0B0B0B" stroke-linecap="round"/></svg>'
159    );
160
161	UIkit.icon.add(
162		"arrow-right-small-icon",
163		'<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 18 14" fill="none"><path d="M1 7H16M16 7L10.1406 1M16 7L10.1406 13" stroke="currentcolor" stroke-width="2" stroke-linecap="round"/></svg>'
164	);
165
166    UIkit.icon.add(
167      "arrow-down-icon",
168      '<svg width="17" height="11" viewBox="0 0 17 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1.5L8.5 9.5L16 1.5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
169    );
170
171	UIkit.icon.add(
172		"ticket-icon",
173		'<svg xmlns="http://www.w3.org/2000/svg" width="72" height="50" viewBox="0 0 72 50" fill="none"><path d="M25 1V49" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 38.0633C1.00064 37.4492 1.21327 36.854 1.60196 36.3785C1.99064 35.903 2.53157 35.5762 3.13333 35.4533C5.54462 34.9637 7.71248 33.6555 9.26961 31.7504C10.8267 29.8453 11.6774 27.4605 11.6774 25C11.6774 22.5395 10.8267 20.1547 9.26961 18.2496C7.71248 16.3445 5.54462 15.0363 3.13333 14.5467C2.53157 14.4238 1.99064 14.097 1.60196 13.6215C1.21327 13.146 1.00064 12.5508 1 11.9367V3.66667C1 2.95942 1.28095 2.28115 1.78105 1.78105C2.28115 1.28095 2.95942 1 3.66667 1H67.6667C68.3739 1 69.0522 1.28095 69.5523 1.78105C70.0524 2.28115 70.3333 2.95942 70.3333 3.66667V11.9367C70.3327 12.5508 70.1201 13.146 69.7314 13.6215C69.3427 14.097 68.8018 14.4238 68.2 14.5467C65.7887 15.0363 63.6208 16.3445 62.0637 18.2496C60.5066 20.1547 59.656 22.5395 59.656 25C59.656 27.4605 60.5066 29.8453 62.0637 31.7504C63.6208 33.6555 65.7887 34.9637 68.2 35.4533C68.8018 35.5762 69.3427 35.903 69.7314 36.3785C70.1201 36.854 70.3327 37.4492 70.3333 38.0633V46.3333C70.3333 47.0406 70.0524 47.7189 69.5523 48.219C69.0522 48.7191 68.3739 49 67.6667 49H3.66667C2.95942 49 2.28115 48.7191 1.78105 48.219C1.28095 47.7189 1 47.0406 1 46.3333V38.0633Z" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
174	);
175
176    UIkit.icon.add(
177      "search-icon",
178      '<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 19 19" fill="none"><path d="M8.08333 15.1667C11.9953 15.1667 15.1667 11.9953 15.1667 8.08333C15.1667 4.17132 11.9953 1 8.08333 1C4.17132 1 1 4.17132 1 8.08333C1 11.9953 4.17132 15.1667 8.08333 15.1667Z" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13.0938 13.0922L18.0016 18" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
179    );
180
181    UIkit.icon.add(
182      "facebook-icon",
183      '<svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 34 34" fill="none"><path d="M17 33C25.8366 33 33 25.8366 33 17C33 8.16344 25.8366 1 17 1C8.16344 1 1 8.16344 1 17C1 25.8366 8.16344 33 17 33Z" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M23.6667 10.3335H21C19.9391 10.3335 18.9217 10.7549 18.1716 11.5051C17.4214 12.2552 17 13.2726 17 14.3335V33.0002" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M11.6641 19.6665H22.3307" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
184    );
185
186    UIkit.icon.add(
187      "instagram-icon",
188      '<svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 34 34" fill="none"><path d="M17.0026 23.6668C20.6845 23.6668 23.6693 20.6821 23.6693 17.0002C23.6693 13.3183 20.6845 10.3335 17.0026 10.3335C13.3207 10.3335 10.3359 13.3183 10.3359 17.0002C10.3359 20.6821 13.3207 23.6668 17.0026 23.6668Z" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
188<path d="M25 1H9C4.58172 1 1 4.58172 1 9V25C1 29.4183 4.58172 33 9 33H25C29.4183 33 33 29.4183 33 25V9C33 4.58172 29.4183 1 25 1Z" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M26.0026 8.33333C26.0026 8.51743 25.8534 8.66667 25.6693 8.66667C25.4852 8.66667 25.3359 8.51743 25.3359 8.33333C25.3359 8.14924 25.4852 8 25.6693 8C25.8534 8 26.0026 8.14924 26.0026 8.33333Z" stroke="#0B0B0B" stroke-width="2"/></svg>'
189    );
190
191    UIkit.icon.add(
192      "close-icon",
193      '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="19" viewBox="0 0 20 19" fill="none"><line x1="0.646447" y1="18.6464" x2="18.5812" y2="0.711648" stroke="#0B0B0B"/><line x1="1.35355" y1="0.646447" x2="19.2884" y2="18.5812" stroke="#0B0B0B"/></svg>'
194    );
195
196    UIkit.icon.add(
197      "warenkorb-icon",
198      '<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_811_737)"><path d="M17.6875 38.8125C17.6875 39.848 16.848 40.6875 15.8125 40.6875C14.777 40.6875 13.9375 39.848 13.9375 38.8125C13.9375 37.777 14.777 36.9375 15.8125 36.9375C16.848 36.9375 17.6875 37.777 17.6875 38.8125Z" stroke="#C41111" stroke-width="2"/><path d="M36.375 38.8125C36.375 39.848 35.5355 40.6875 34.5 40.6875C33.4645 40.6875 32.625 39.848 32.625 38.8125C32.625 37.777 33.4645 36.9375 34.5 36.9375C35.5355 36.9375 36.375 37.777 36.375 38.8125Z" stroke="#C41111" stroke-width="2"/><path d="M2.875 5.75H7.1875L13.791 29.5191C13.9591 30.1244 14.3208 30.6581 14.8208 31.0384C15.3209 31.4187 15.9318 31.6247 16.56 31.625H34.3203C34.9489 31.6251 35.5601 31.4193 36.0606 31.0389C36.561 30.6586 36.923 30.1247 37.0911 29.5191L41.6875 12.9375H9.18383" stroke="#C41111" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_811_737"><rect width="46" height="46" fill="white"/></clipPath></defs></svg>'
199    );
200
201    UIkit.icon.add(
202      "link-icon",
203      '<svg width="57" height="58" viewBox="0 0 57 58" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M29.7163 49.0632L26.6003 52.1793C23.7706 54.9632 19.9555 56.5162 15.986 56.5001C12.0165 56.4839 8.21414 54.8999 5.40724 52.093C2.60034 49.2861 1.01629 45.4837 1.00012 41.5142C0.983961 37.5447 2.537 33.7296 5.32094 30.8999L12.8791 23.3575C15.5901 20.6409 19.2368 19.0629 23.0729 18.9464C26.9091 18.8299 30.6448 20.1835 33.5157 22.7305" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M27.2838 8.93698L30.3998 5.82094C33.2295 3.037 37.0446 1.48396 41.0141 1.50012C44.9836 1.51629 48.786 3.10034 51.5929 5.90724C54.3998 8.71414 55.9838 12.5165 56 16.486C56.0161 20.4555 54.4631 24.2706 51.6792 27.1003L44.1211 34.6584C41.408 37.3728 37.7602 38.9479 33.9241 39.0615C30.088 39.1751 26.3534 37.8187 23.4844 35.2697" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
204    );
205
206    UIkit.icon.add(
207      "pdf-icon",
208      '<svg width="55" height="58" viewBox="0 0 55 58" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M53.5 39H43.5V56.5" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M51 49H43.5" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 51.5H6C7.6576 51.5 9.24731 50.8415 10.4194 49.6694C11.5915 48.4973 12.25 46.9076 12.25 45.25C12.25 43.5924 11.5915 42.0027 10.4194 40.8306C9.24731 39.6585 7.6576 39 6 39H1V56.5" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 39V56.5H26C28.3206 56.5 30.5462 55.5781 32.1872 53.9372C33.8281 52.2962 34.75 50.0706 34.75 47.75C34.75 45.4294 33.8281 43.2038 32.1872 41.5628C30.5462 39.9219 28.3206 39 26 39H21Z" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M1 26.5V4C1 3.33696 1.26339 2.70107 1.73223 2.23223C2.20107 1.76339 2.83696 1.5 3.5 1.5H33.5L51 19V26.5" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M33.5 1.5V19H51" stroke="#0B0B0B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>'
209    );
210
211    UIkit.icon.add(
212      "check-icon",
213      '<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.949951 5.2749L4.52495 9.3999L13.325 1.1499" stroke="white" stroke-linecap="round"/></svg>'
214    );
215
216    UIkit.icon.add(
217      "article-icon",
218      '<svg xmlns="http://www.w3.org/2000/svg" width="56" height="56" fill="#000000" viewBox="0 0 256 256"><path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,156a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4ZM180,96a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h96A4,4,0,0,1,180,96Zm0,32a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h96A4,4,0,0,1,180,128Zm0,32a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h96A4,4,0,0,1,180,160Z"></path></svg>'
219    );
220
221    UIkit.icon.add(
222      "user-icon",
223      '<svg xmlns="http://www.w3.org/2000/svg" width="56" height="56" fill="#000000" viewBox="0 0 256 256"><path d="M227.46,214c-16.52-28.56-43-48.06-73.68-55.09a68,68,0,1,0-51.56,0c-30.64,7-57.16,26.53-73.68,55.09a4,4,0,0,0,6.92,4C55,184.19,89.62,164,128,164s73,20.19,92.54,54a4,4,0,0,0,3.46,2,3.93,3.93,0,0,0,2-.54A4,4,0,0,0,227.46,214ZM68,96a60,60,0,1,1,60,60A60.07,60.07,0,0,1,68,96Z"></path></svg>'
224    );
225
226    UIkit.icon.add(
227      "file-text-icon",
228      '<svg xmlns="http://www.w3.org/2000/svg" width="56" height="56" fill="#000000" viewBox="0 0 256 256"><path d="M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"></path></svg>'
229    );
230
231    UIkit.icon.add(
232      "presentation-icon",
233      '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><rect x="32" y="48" width="192" height="136" rx="8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line x1="160" y1="184" x2="192" y2="224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line x1="96" y1="184" x2="64" y2="224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line x1="128" y1="48" x2="128" y2="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>'
234    );
235
236    UIkit.icon.add(
237      "shopping-icon",
238      '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><rect x="32" y="48" width="192" height="160" rx="8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M168,88a40,40,0,0,1-80,0" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>'
239    );
240
241    UIkit.icon.add(
242      "info-icon", '<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 3C13.4288 3 10.9154 3.76244 8.77759 5.1909C6.63975 6.61935 4.97351 8.64968 3.98957 11.0251C3.00563 13.4006 2.74819 16.0144 3.2498 18.5362C3.75141 21.0579 4.98953 23.3743 6.80762 25.1924C8.6257 27.0105 10.9421 28.2486 13.4638 28.7502C15.9856 29.2518 18.5995 28.9944 20.9749 28.0104C23.3503 27.0265 25.3807 25.3603 26.8091 23.2224C28.2376 21.0846 29 18.5712 29 16C28.9964 12.5533 27.6256 9.24882 25.1884 6.81163C22.7512 4.37445 19.4467 3.00364 16 3ZM16 27C13.8244 27 11.6977 26.3549 9.88873 25.1462C8.07979 23.9375 6.66989 22.2195 5.83733 20.2095C5.00477 18.1995 4.78693 15.9878 5.21137 13.854C5.63581 11.7202 6.68345 9.7602 8.22183 8.22183C9.76021 6.68345 11.7202 5.6358 13.854 5.21136C15.9878 4.78692 18.1995 5.00476 20.2095 5.83733C22.2195 6.66989 23.9375 8.07979 25.1462 9.88873C26.3549 11.6977 27 13.8244 27 16C26.9967 18.9164 25.8367 21.7123 23.7745 23.7745C21.7123 25.8367 18.9164 26.9967 16 27ZM18 22C18 22.2652 17.8946 22.5196 17.7071 22.7071C17.5196 22.8946 17.2652 23 17 23C16.4696 23 15.9609 22.7893 15.5858 22.4142C15.2107 22.0391 15 21.5304 15 21V16C14.7348 16 14.4804 15.8946 14.2929 15.7071C14.1054 15.5196 14 15.2652 14 15C14 14.7348 14.1054 14.4804 14.2929 14.2929C14.4804 14.1054 14.7348 14 15 14C15.5304 14 16.0391 14.2107 16.4142 14.5858C16.7893 14.9609 17 15.4696 17 16V21C17.2652 21 17.5196 21.1054 17.7071 21.2929C17.8946 21.4804 18 21.7348 18 22ZM14 10.5C14 10.2033 14.088 9.91332 14.2528 9.66665C14.4176 9.41997 14.6519 9.22771 14.926 9.11418C15.2001 9.00065 15.5017 8.97094 15.7926 9.02882C16.0836 9.0867 16.3509 9.22956 16.5607 9.43934C16.7704 9.64912 16.9133 9.91639 16.9712 10.2074C17.0291 10.4983 16.9994 10.7999 16.8858 11.074C16.7723 11.3481 16.58 11.5824 16.3334 11.7472C16.0867 11.912 15.7967 12 15.5 12C15.1022 12 14.7206 11.842 14.4393 11.5607C14.158 11.2794 14 10.8978 14 10.5Z" fill="currentColor"/></svg>'
243    );
244  }
245
246
247  $(".open-search-popup > a").removeAttr("uk-scroll");
248  $(".open-search-popup > a").attr("uk-toggle", "");
249
250  $("#search-form-submit-startseite a").click(function(event) {
251    $("#search-form-startseite form").submit();
252  });
253
254  let placeholder =  $('#search-form-startseite input').attr('placeholder');
255  $('#search-form-startseite input').on('focus', function() {
256        $(this).attr('placeholder', '');
257    }).on('blur', function() {
258        if ($(this).val() === '') {
259            $(this).attr('placeholder', placeholder);
260        }
261    });
262
263  $("#search-form-startseite input").attr('autocomplete', 'off');
264
265  $("#search-form-submit-popup a").click(function(event) {
266    $("#search-form-popup form").submit();
267  });
268
269
270  $('#search-form-popup input').on('focus', function() {
271        $(this).attr('placeholder', '');
272    }).on('blur', function() {
273        if ($(this).val() === '') {
274            $(this).attr('placeholder', placeholder);
275        }
276    });
277
278  $("#search-form-popup input").attr('autocomplete', 'off');
279
280
281  $('#fachbereich-suche input').on('input', function() {
282        var searchText = $(this).val().toLowerCase(); // Suchbegriff in Kleinbuchstaben
283        $('#fachbereiche-filter-grid a').removeClass('uk-button-primary');
284
285        //if (searchText.length >= 3) {
286          // Jeden Button durchlaufen und überprüfen
287          $('#fachbereiche-filter-grid a').each(function() {
288              var buttonText = $(this).text().toLowerCase(); // Button-Text in Kleinbuchstaben
289              if (buttonText.includes(searchText) && searchText !== "") {
290                  // Hover-Zustand hinzufügen, falls der Text übereinstimmt
291                  $(this).addClass('uk-button-primary');
292              }
293          });
294        //}
295  });
296
297  $("#quickmenu-trigger").click(function(event) {  
298    $(".quickmenu-small").toggleClass("show");
299  });
300
301  $("#barrierefrei-trigger").click(function(event) {
302    event.preventDefault();
303    $(".djacc__openbtn.djacc__openbtn--custom").toggleClass("djacc__openbtn--active");
304    $(".djacc__panel").toggleClass("djacc__panel--active");
305  });
306
307  $('.menu-suche input').on('input', function() {
308        var searchText = $(this).val().toLowerCase(); // Suchbegriff in Kleinbuchstaben
309      
310        if ( searchText.length  > 0 ) {
311          $('.menu-filter-grid').show();
312        } else {
313          $('.menu-filter-grid').hide();
314        }
315      
316        $('.menu-filter-grid a').removeClass('uk-button-primary');
317    
318        //if (searchText.length >= 3) {
319          // Jeden Button durchlaufen und überprüfen
320          $('.menu-filter-grid a').each(function() {
321              var buttonText = $(this).text().toLowerCase(); // Button-Text in Kleinbuchstaben
322              if (buttonText.includes(searchText) && searchText !== "") {
323                  // Hover-Zustand hinzufügen, falls der Text übereinstimmt
324                  $(this).addClass('uk-button-primary');
325              }
326          });
327        //}
328  });
329
330
331    // Alle <a>-Tags mit href="tel:" auswählen
332    const telLinks = document.querySelectorAll('a[href^="tel:"]');
333  
334    telLinks.forEach(link => {
335      // Ursprüngliches href-Attribut
336      let originalHref = link.getAttribute("href");
337      
338      // (0) und Leerzeichen entfernen
339      let cleanedHref = originalHref
340        .replace(/\s+/g, '')   // Leerzeichen entfernen
341        .replace(/\(0\)/g, ''); // (0) entfernen
342      
343      // Bereinigtes href zurücksetzen
344      link.setAttribute("href", cleanedHref);
345    });
346  
347
348
349	setTimeout(function(){
350		if ($(".kontaktbox-fade-in").length) {
351			$(".kontaktbox-fade-in .kontaktbox-container").css("opacity", "1");
352		}
353	}, 150);
354  
355
356  const totalArticles = $('.article-item').length;
357  let visibleArticles = 6;
358
359  // Zeige den Button nur an, wenn es mehr als 6 Artikel gibt
360  if (totalArticles > visibleArticles) {
361      $('.load-more-articles').show();
362  }
363
364  $(".load-more-articles a").click(function(event) {
365
366    event.preventDefault();
367    // Alle versteckten Artikel auswählen
368    const hiddenArticles = document.querySelectorAll('.article-item.hide');
369
370    // Die nächsten 6 Artikel einblenden
371    for (let i = 0; i < 6 && i < hiddenArticles.length; i++) {
372        hiddenArticles[i].classList.remove('hide');
373    }
374
375    // Aktualisiere die Anzahl der sichtbaren Artikel
376    visibleArticles += 6;
377
378    // Wenn alle Artikel sichtbar sind, den Button ausblenden
379    if (visibleArticles >= document.querySelectorAll('.article-item').length) {
380        document.querySelector('.load-more-articles').style.display = 'none';
381    }
382
383    // Wenn alle Artikel sichtbar sind, den Button ausblenden
384    if (visibleArticles >= totalArticles) {
385      $('.load-more-articles').hide();
386    }
387  });
388
389
390  // Event Listener für Klick auf Links mit der Klasse 'teaserbox-anker-link'
391  $(".teaserbox-anker-link, .teaserbox-container .uk-button").on("click", function (e) {
392
393    if ($(this).attr("href") == "#") {
394      e.preventDefault(); // Standardverhalten des Links verhindern
395  }
396
397    // Den Inhalt des geklickten Links holen
398    var linkText = $(this).text().trim();
399
400    // Finde die nächste h2 mit dem gleichen Inhalt
401    var target = $("h2")
402      .filter(function () {
403        return $(this).text().trim() === linkText;
404      })
405      .first();
406
407    // Wenn eine passende Überschrift gefunden wurde, dahin scrollen
408    if (target.length) {
409      // Scrollen unter Berücksichtigung der Header-Höhe
410      $("html, body").animate(
411        {
412          scrollTop: target.offset().top - 120, // Anpassung für den fixierten Header
413        },
414        800, // Dauer des Scrollens in Millisekunden
415        function () {
416          // Ziel hervorheben, wenn das Scrollen beendet ist
417          target.addClass("highlight");
418
419          // Highlight nach einer kurzen Zeit wieder entfernen
420          setTimeout(function () {
421            target.removeClass("highlight");
422          }, 2000); // 2000 ms = 2 Sekunden
423        }
424      );
425    }
426  });
427
428  /*$(".anbieter-trigger").click(function(event) { 
429    event.preventDefault();
430    if($(".stadtmarkt-anbieter").hasClass("hide")) {
431      $(".stadtmarkt-anbieter").removeClass("hide")
432    } else {
433      $(".stadtmarkt-anbieter").addClass("hide")
434    }
435  });*/
436
437  $("#mehr-anzeigen-anbieter-stadtmarkt a, #mehr-anzeigen-anbieter-adventmarkt a" ).click(function(event) { 
438    event.preventDefault();
439    var i = 0;
440    var hiddenElements = $('.kontaktbox-container.hide').length;
441
442    if(hiddenElements > 0 ) {
443		  $('.kontaktbox-container.hide').slice(i, i + 4).removeClass('hide');
444
445      if(hiddenElements <= 4) {
446        $(this).css("display", "none");
447      }
448    }
449  });
450
451  /*sozioTHEK*/
452  $("#soziothek .search input").keypress(function (event) {
453    var keycode = event.keyCode || event.which;
454    if (keycode == "13") {
455      event.preventDefault();
456      doTextSearch();
457    }
458  });
459
460  $("#soziothek .search svg").click(function (event) {
461    event.preventDefault();
462    doTextSearch();
463  });
464
465  $(".search-and-filter-box .search-option-item").click(function () {
466    searchByOption($(this));
467  });
468
469  $(".see-more").click(function (event) {
470    event.preventDefault();
471    var parentDiv = $(this).closest(".sozialer-dienst-item");
472
473    if (parentDiv.hasClass("showDetails")) {
474      parentDiv.removeClass("showDetails");
475      this.querySelector(".btn-text").innerHTML = "Details anzeigen";
476    } else {
477      parentDiv.addClass("showDetails");
478      this.querySelector(".btn-text").innerHTML = "Details verstecken";
479    }
480  });
481
482	$("#soziothek .reset-filter-button").click(function (event) {
483    	event.preventDefault();
484    	resetAllFilter();
485	});
486
487	$("#soziothek .show-filter-button").click(function (event) {
488    	event.preventDefault();
489    	if ($(".search-and-filter-box").css("display") === "block") {
490    		$(".search-and-filter-box").css("display", "none");
491    		$(".show-filter-button a").text("Filter anzeigen");
492    	} else {
493    		$(".search-and-filter-box").css("display", "block");
494    		$(".show-filter-button a").text("Filter verbergen");
495    	}
496	});
497
498
499
500	/* schloss bruck */
501	// add data-captions for lightbox elements
502	$(".custom-img-lightbox a").each(function() {
503		$(this).attr("data-caption", $(this).attr("aria-label"));
504	});
505
506	/* stadtkultur */
507
508	// remove empty btns
509	const programmCat = ["Kinder", "Musik", "Bühne", "Lesung", "Kunst", "Kabarett"];
510	programmCat.forEach(category => {
511		if ($(`.check-programm[programm="${category}"]`).length < 1) {
512			$(`.el-content[data-filter="${category.toLowerCase()}"]`).closest(".el-item").hide();
513		}
514	});
515	
516
517	var filterBtns = ".programm-filter-buttons:not(.filter-menu-btns) .search-option-item";
518	
519	if ($(filterBtns).length) {
520		var urlParams = new URLSearchParams(window.location.search);
521
522		if(urlParams.has("c") && urlParams.get("c") !== null && urlParams.get("c") !== "") {
523			var cValue = urlParams.get("c");
524
525			if ($(filterBtns).eq(cValue).length) {
526				filterProgramm($(filterBtns).eq(cValue), filterBtns);
527			} else {
528				$(filterBtns).eq(0).addClass("active");
529			}
530		} else {
531			$(filterBtns).eq(0).addClass("active");
532		}
533	}
534
535	$("body.active-menu-270 .programm-filter-buttons.filter-menu-btns .search-option-item").
535click(function (e) { 
536		e.preventDefault();
537
538		var url = $(this).attr("href");
539		var queryString = url.split("?")[1].split("#")[0]; 
540		var urlParams = new URLSearchParams(queryString);
541
542		if ($("#programm").length) {
543			if(urlParams.has("c") && urlParams.get("c") !== null && urlParams.get("c") !== "") {
544				var cValue = urlParams.get("c");
545   
546			   if ($(filterBtns).eq(cValue).length) {
547				   filterProgramm($(filterBtns).eq(cValue), filterBtns);
548   
549				   var navbarToggle = $(".tm-header-mobile .uk-navbar-toggle")[0];
550				   UIkit.toggle(navbarToggle).toggle();
551   
552				   var dropbar = $(".tm-header-mobile #tm-dialog-mobile")[0];
553				   UIkit.drop(dropbar).hide();
554   
555				   $("html, body").animate({
556					   scrollTop: $("#programm").offset().top
557				   }, 400);
558			   }
559		   }
560		} else {
561			window.location.href = url;
562		}
563	});
564
565	$(filterBtns).click(function (e) { 
566		e.preventDefault();
567		filterProgramm($(this), filterBtns);
568	});
569});
570
571function filterProgramm(current, btns) {
572	var cat = current.attr("data-filter");
573
574	if (!current.hasClass("active")) {
575		$(btns).removeClass("active");
576		current.addClass("active");
577		const emptyText = $(".category-grid-no-items");
578
579		if (cat != "alle events") {
580			var activeItems = $(".category-grid .category-grid-item[category-item="+cat+"]");
581			activeItems.show();
582
583			$(".category-grid .category-grid-item:not([category-item="+cat+"])").hide();
584
585			if (activeItems.length == 0) {
586				emptyText.show();
587			} else {
588				emptyText.hide();
589			}
590		} else {
591			$(".category-grid .category-grid-item").show();
592			emptyText.hide();
593		}	
594	}
595}
596
597function searchByOption(element) {
598  var filter = element.attr("data-filter");
599  if (element.hasClass("active")) {
600    filter = "allItems";
601    element.removeClass("active");
602  } else {
603    $(".search-option-item.active").removeClass("active");
604    element.addClass("active");
605  }
606  doOptionSearch(filter);
607}
608
609function doTextSearch() {
610  highlightText("");
611  $(".search-option-item").each(function () {
612    $(this).show();
613    $(this).removeClass("active");
614  });
615
616  var searchFilter = $("#soziothek .search input").val();
617  $("#soziothek-main .sozialer-dienst-item").each(function (index, el) {
618    if (typeof $(this).attr("data-filter-open-search") == "undefined") {
619      $(this).hide();
620    } else {
621      if (
622        $(this)
623          .attr("data-filter-open-search")
624          .toLowerCase()
625          .search(searchFilter.toLowerCase()) == -1
626      ) {
627        $(this).hide();
628      } else {
629        $(this).show();
630        searchFilter;
631      }
632    }
633  });
634  highlightText(searchFilter);
635}
636
637function doOptionSearch(filter) {
638  highlightText("");
639  $("#soziothek .search input").val("");
640  $("#soziothek-main .sozialer-dienst-item").each(function () {
641    $(this).show();
642  });
643
644  $("#soziothek-main .sozialer-dienst-item").each(function () {
645    var filterList = $(this).attr("data-filter-list");
646
647    if (filter != "allItems") {
648      if (filterList.indexOf(filter) == -1) {
649        $(this).hide();
650
651      } else {
652        $(this).show();
653
654      }
655    } else {
656      $(this).show();
657
658    }
659  });
660}
661function highlightText(word) {
662  // Alte Markierungen entfernen
663  $(".highlight").each(function () {
664    $(this).replaceWith($(this).text());
665  });
666
667  if (!word) return;
668
669  var regex = new RegExp(`(${word})`, "gi");
670
671  $(".content").each(function () {
672    // Alle Textknoten im Element finden (inkl. in <a>-Tags),
673    // aber Attribute wie href bleiben unangetastet
674    $(this)
675      .find("*")
676      .addBack()
677      .contents()
678      .filter(function () {
679        return this.nodeType === Node.TEXT_NODE; // Nur Textknoten
680      })
681      .each(function () {
682        var newHtml = this.nodeValue.replace(
683          regex,
684          "<span class='highlight'>$1</span>"
685        );
686        if (newHtml !== this.nodeValue) {
687          $(this).replaceWith(newHtml);
688        }
689      });
690  });
691}
692
693
694function resetAllFilter() {
695  highlightText("");
696  $("#soziothek .search input").val("");
697  $("#soziothek-main .sozialer-dienst-item").each(function () {
698    $(this).show();
699  });
700  $(".search-option-item").each(function () {
701    $(this).removeClass("active");
702  });
703}
704
705function hideElements(element, amount) {
706  $(element).slice(amount).addClass('hide');
707}
708
709function responsiveAdventImageMap() {
710  $('img[usemap]').rwdImageMaps();
711
712}

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.