1const client_lang = navigator.language || navigator.userLanguage; 2 3// if (!client_lang.includes("de") && !window.location.pathname.includes("en")) { 4// window.location.pathname = "/en/" 5// } 6 7 8if (!client_lang.includes("de") && 9 !window.location.pathname.includes("en") && 10 !window.location.pathname.includes("anniversary-form") && 11 !window.location.pathname.includes("advanced-online-form")) { 12 window.location.pathname = "/en/" 13} 14 15function textSlider(sliderClass){ 16 $(sliderClass).slick({ 17 autoplay: true, 18 autoplaySpeed: 6000, 19 arrows: true, 20 dots: false, 21 prevArrow: '', 22 nextArrow: '<div class="next-arrow"><button type="button" class="text-slider-button">Next</button></button></div>' 23 }); 24} 25 26function textImageSlider(textSlider, imageSlider) { 27 $(textSlider).slick({ 28 autoplay: true, 29 autoplaySpeed: 8000, 30 arrows: true, 31 dots: false, 32 prevArrow: '', 33 nextArrow: '<div class="next-arrow"><button type="button" class="text-slider-button">Next</button></button></div>', 34 asNavFor: imageSlider, 35 responsive: [ 36 { 37 breakpoint: 767, 38 settings: { 39 nextArrow: '' 40 } 41 } 42 ] 43 }); 44 $(imageSlider).slick({ 45 // autoplay: true, 46 // autoplaySpeed: 6000, 47 arrows: false, 48 dots: false, 49 asNavFor: textSlider 50 }) 51} 52 53function mobileMenu(triggerClass, mobileMenu, headClass){ 54 $(triggerClass).on('click', function(e){ 55 e.preventDefault(); 56 $(triggerClass).stop(); 57 $(mobileMenu).stop(); 58 $(triggerClass).toggleClass('is-active'); 59 $(mobileMenu).slideToggle(); 60 }) 61 62 $(".dropnav-toggle").click(function(e){ 63 e.preventDefault(); 64 if ($(this).parent().parent().hasClass("open")) { 65 $(this).parent().parent().removeClass("open"); 66 }else { 67 $(".dropdown.open").removeClass("open"); 68 $(this).parent().parent().addClass("open"); 69 } 70 }) 71} 72 73function standaloneMap() { 74 console.log("INIT MAP...") 75 let service; 76 let infowindow; 77 78 if ($(".standalone-map .gmap").length > 0) { 79 // let position = $(".standalone-map #map").attr("data-location"); 80 //console.log(position); 81 82 function initSAMap(element) { 83 let sydney = new google.maps.LatLng(-33.867, 151.195); 84 85 infowindow = new google.maps.InfoWindow(); 86 87 let map = new google.maps.Map(element, {center: sydney, zoom: 15}); 88 89 let position = element.dataset.location; 90 //console.log(position); 91 92 let request = { 93 query: position, 94 fields: ['name', 'geometry'], 95 }; 96 97 service = new google.maps.places.PlacesService(map); 98 99 service.findPlaceFromQuery(request, function(results, status) { 100 if (status === google.maps.places.PlacesServiceStatus.OK) { 101 for (var i = 0; i < results.length; i++) { 102 createSAMarker(map, results[i]); 103 } 104 105 map.setCenter(results[0].geometry.location); 106 } 107 }); 108 } 109 let divs = document.querySelectorAll('.standalone-map .gmap'); 110 let divsArr = Array.prototype.slice.call(divs); 111 divsArr.forEach(function(element) { 112 initSAMap(element); 113 }); 114 115 function createSAMarker(map, place) { 116 let marker = new google.maps.Marker({ 117 map: map, 118 position: place.geometry.location 119 }); 120 121 google.maps.event.addListener(marker, 'click', function() { 122 infowindow.setContent(place.name); 123 infowindow.open(map, this); 124 }); 125 } 126 } 127} 128 129function partnerMaps() { 130 if ($(".partner-locations-map #map").length > 0) { 131 //console.log("INIT MAP...") 132 let map; 133 let service; 134 let infowindow; 135 136 function initMap() { 137 let sydney = new google.maps.LatLng(-33.867, 151.195); 138 139 infowindow = new google.maps.InfoWindow(); 140 141 map = new google.maps.Map( 142 document.getElementById('map'), {center: sydney, zoom: 15}); 143 144 let position = $(".partner-locations-map .map-entry[data-first='1']").attr("data-location"); 145 146 let request = { 147 query: position, 148 fields: ['name', 'geometry'], 149 }; 150 151 service = new google.maps.places.PlacesService(map); 152 153 service.findPlaceFromQuery(request, function(results, status) { 154 if (status === google.maps.places.PlacesServiceStatus.OK) { 155 for (var i = 0; i < results.length; i++) { 156 createMarker(results[i]); 157 } 158 159 map.setCenter(results[0].geometry.location); 160 } 161 }); 162 } 163 initMap(); 164 165 function remap(location) { 166 let request = { 167 query: location, 168 fields: ['name', 'geometry'], 169 }; 170 171 service = new google.maps.places.PlacesService(map); 172 173 service.findPlaceFromQuery(request, function(results, status) { 174 if (status === google.maps.places.PlacesServiceStatus.OK) { 175 for (var i = 0; i < results.length; i++) { 176 createMarker(results[i]); 177 } 178 179 map.setCenter(results[0].geometry.location); 180 } 181 }); 182 } 183 184 function createMarker(place) { 185 let marker = new google.maps.Marker({ 186 map: map, 187 position: place.geometry.location 188 }); 189 190 google.maps.event.addListener(marker, 'click', function() { 191 infowindow.setContent(place.name); 192 infowindow.open(map, this); 193 }); 194 } 195 196 $(".partner-locations-map .map-entry").click(function() { 197 let location = $(this).attr("data-location"); 198 //console.log(location) 199 remap(location); 200 }) 201 } 202} 203 204$.fn.randomize = function(selector){ 205 var $elems = selector ? $(this).find(selector) : $(this).children(), 206 $parents = $elems.parent(); 207 208 $parents.each(function(){ 209 $(this).children(selector).sort(function(){ 210 return Math.round(Math.random()) - 0.5; 211 }).detach().appendTo(this); 212 }); 213 214 return this; 215}; 216 217(function () { 218 // replace given ID with relevant ID of field container 219 const labelSelector = '#km_row_mail input#mail'; 220 const labels = [ 221 'Tragen Sie hier Ihre E-Mail Adresse ein', 222 'Please enter your e-mail address' 223 ] 224 var langId = languageId || 0; 225 // replace string with name to replace in label 226 const labelDecoration = labels[langId]; 227 228 const decorationIntervalTime = 200; 229 const maxIntervals = 10; 230 let intervals = 0; 231 const intervalID = window.setInterval(function () { 232 if (intervals >= maxIntervals) { 233 window.clearInterval(intervalID); 234 235 return; 236 } 237 238 const label = document.querySelector(labelSelector); 239 240 if (label) { 241 label.placeholder = labelDecoration; 242 243 window.clearInterval(intervalID); 244 245 return; 246 } 247 248 intervals++; 249 }, decorationIntervalTime); 250})(); 251 252 253$(document).ready(function () { 254 255 textSlider('.text-slider'); 256 textImageSlider('.text-image-slider.text', '.text-image-slider.image'); 257 mobileMenu('.hamburger', '.mobile-navigation', '.head'); 258 $(".head .header-navigation .search-item a").on('click', function(e){ 259 e.preventDefault(); 260 $(this).parent().addClass("active"); 261 }); 262 263 $("img.slider-animation").addClass("active"); 264 265 $(".scrollToContent").click(function(e) { 266 e.preventDefault(); 267 $([document.documentElement, document.body]).animate({ 268 scrollTop: window.innerHeight - 118 - 44 269 }, 1000); 270 271 }); 272}); 273 274$(window).on("load", function(){ 275 partnerMaps(); 276 standaloneMap(); 277 initializeMagnificPopup(); 278}) 279 280// document.addEventListener('DOMContentLoaded', (event) => { 281// partnerMaps(); 282// standaloneMap(); 283// initializeMagnificPopup(); 284// }); 285 286function initializeMagnificPopup() { 287 $('.lightbox-mp').magnificPopup({ 288 type:'image', 289 gallery: { 290 // options for gallery 291 enabled: true 292 }, 293 image: { 294 // options for image content type 295 titleSrc: 'title' 296 } 297 }); 298} 299 300function initializeYTPlayer() { 301 addEventListenerByClass('video-overlay', 'click', activateVideo); 302} 303 304function onYouTubeIframeAPIReady() { 305 if (typeof YTPlayerConfig !== 'undefined') { 306 for (var key in YTPlayerConfig) { 307 var config = YTPlayerConfig[key]; 308 initYTPlayer(config); 309 } 310 initializeYTPlayer(); 311 } 312} 313 314function initYTPlayer(config) { 315 window[player+config.cid] = new YT.Player(config.playerDiv, { 316 videoId: config.youtubeId, 317 events: { 318 // 'onReady': onPlayerReady, 319 'onStateChange': onPlayerStateChange 320 } 321 }); 322} 323 324function onPlayerStateChange(event) { 325 if (event.data == YT.PlayerState.ENDED) { 326 event.target.a.closest('.video-overlay').classList.remove('playing'); 327 } 328} 329 330function stopVideo() { 331 // window[player+cid].stopVideo(); 332} 333function playVieo() { 334 // window[player+cid].playVideo(); 335} 336 337function activateVideo(event) { 338 let elem = event.currentTarget; 339 elem.classList.add('playing'); 340 let dataId = elem.dataset.playerid; 341 window[player+dataId].playVideo(); 342} 343 344function addEventListenerByClass(className, event, fn) { 345 var list = document.getElementsByClassName(className); 346 for (var i = 0, len = list.length; i < len; i++) { 347 list[i].addEventListener(event, fn, false); 348 } 349} 350 351document.addEventListener("scroll", checkMainNavigation); 352 353function checkMainNavigation() { 354 var mainNavigation = document.querySelector('div.main-navigation'); 355 var header = document.querySelector('header.head'); 356 var headerHeight = header.offsetHeight; 357 var headerImage = document.querySelector('div.header-image') 358 var headerImageBottom = headerImage.getBoundingClientRect().top + headerImage.offsetHeight; 359 360 if (headerImageBottom <= headerHeight) { 361 mainNavigation.classList.add('static'); 362 mainNavigation.style.cssText = 'top:'+headerHeight+'px;'; 363 } else { 364 mainNavigation.classList.remove('static'); 365 mainNavigation.style.cssText = "initial"; 366 } 367} 368 369 370// This code loads the IFrame Player API code asynchronously. 371var tag = document.createElement('script'); 372 373tag.src = "https://www.youtube.com/iframe_api"; 374var firstScriptTag = document.getElementsByTagName('script')[0]; 375firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
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.