1const privacyLinkURL = "/datenschutzerklaerung_de_88.html"; 2 3const getPrivacyLink = () => { 4 $('form a[data-src="privacyplaceholder"]').each(function() { 5 $(this).attr("data-src", privacyLinkURL); 6 }); 7} 8 9const reload_formcheck = () => 10{ 11 var head= document.getElementsByTagName('head')[0]; 12 var script= document.createElement('script'); 13 script.src= '/js/formcheck.js?=v22091601'; 14 head.appendChild(script); 15} 16 17const lasikformFunctions = () => { 18 $('#ChkbxCallback, #ChkbxInfopack, #ChkbxMessage').click(function () { 19 $(this).parent().siblings('div').slideToggle(); 20 }); 21 $('.fancybox__backdrop').css('background', 'rgb(0 0 0 / 78%)'); 22} 23 24const loadClass = (target) => { 25 var path = "/data/forms.html" 26 27 $.get( path, function( data ) { 28 console.log($(data).find(target)) 29 console.log($(data)) 30 31 var fbform = $('.fancybox__container form').attr('id') 32 var array = [] 33 $(data).children('form').map(function(){ 34 array.push($(this).attr('id')); 35 }) 36 37 if($.inArray(fbform, array) != -1) { 38 console.log("is in array"); 39 var formidclasses = $(data).find('#' + fbform).parent().attr('class') 40 console.log(formidclasses) 41 } 42 43 }); 44 45} 46 47const updateSelect = (target) => 48{ 49 50 var text = undefined; 51 52 if ($(target).data('location-id') !== undefined) { 53 var text = $(target).data('location-id'); 54 } 55 56 const select = document.querySelector('#form_locationid'); 57 const options = Array.from(select.options); 58 const optionToSelect = options.find(item => item.value === text); 59 60 if (text != undefined) { 61 62 optionToSelect.selected = true; 63 64 // uncomment to lock select of locationid 65 // select.setAttribute("disabled", "disabled"); 66 67 } 68 69} 70 71const buildForm = (selector, target) => { 72 fetch('/data/forms.html') 73 .then(function (response) { 74 return response.text() 75 }) 76 .then(function (html) { 77 var parser = new DOMParser(); 78 79 var doc = parser.parseFromString(html, "text/html"); 80 81 var form = doc.querySelector('#' + selector).innerHTML; 82 83 const container = document.getElementById(target); 84 container.insertAdjacentHTML("beforeend", form); 85 reload_formcheck(); 86 getPrivacyLink(); 87 88 }) 89 .catch(function (err) { 90 console.log('Failed to fetch form: ', err); 91 }); 92} 93 94const getCookie = (name) => { 95 let value = `; ${document.cookie}`; 96 let parts = value.split(`; ${name}=`); 97 if (parts.length === 2) return parts.pop().split(';').shift(); 98} 99 100const stopVideos = () => { 101 document.querySelectorAll('iframe').forEach(v => { v.src = v.src }); 102 document.querySelectorAll('video').forEach(v => { v.pause() }); 103}; 104 105$(".tabnav").click(function() { 106 stopVideos(); 107}); 108 109 110document.addEventListener("DOMContentLoaded", function () { 111 112 var nVer = navigator.appVersion; 113 var nAgt = navigator.userAgent; 114 var nameOffset,verOffset,ix; 115 116 117 118 119 if(navigator.platform == 'iPhone' || navigator.platform == 'iPod'){ 120 if ((verOffset=nAgt.indexOf('Safari'))!=-1) { 121 var mobileSafari = 'Safari'; 122 } 123 } 124 125 if (mobileSafari == 'Safari') { 126 127 const calciOSmenu = () => { 128 if ($('#alert').length) { 129 if (!$('#alert').hasClass('alertshown')) { 130 var alertheight = $('#alert').height() 131 } else { var alertheight = 0; } 132 } else { var alertheight = 0; } 133 console.log(alertheight) 134 updateiOSmenuHeight(alertheight) 135 }; 136 const updateiOSmenuHeight = (alertheight) => { 137 var topbarheight = $('#navbar_main').height() 138 var alertbarheight = alertheight 139 140 var iosmobilemenuheight = window.innerHeight - topbarheight - alertbarheight; 141 console.warn(alertbarheight); 142 143 $('#mobilemenu').css('height',''); 144 $('#mobilemenu').css('max-height',''); 145 $('#mobilemenu').css('height', iosmobilemenuheight); 146 $('#mobilemenu').css('max-height', iosmobilemenuheight); 147 console.log(iosmobilemenuheight) 148 }; 149 $('.hamburger').click(function(){calciOSmenu();}); 150 } 151 152 153 // bypass caching logo for nonstop svg animation after each refresh 154 $('#logomain, #logomobile').attr('src', $('#logomain, #logomobile').attr('src') + '?=v' + Date.now()); 155 156/* Fancybox.bind("[data-fancybox]", { 157 autoFocus : false 158 }); */ 159 160 161 162 if($('#image-slider').length){ 163 164 var splide = new Splide("#image-slider", { 165 type: "fade", 166 rewind: true, 167 lazyLoad: "nearby", 168 waitForTransition: true, 169 pauseOnHover: true, 170 pauseOnFocus: false, 171 autoplay: true, 172 pagination: false, 173 arrows: true, 174 interval: 5000, 175 speed: 1400, 176 autoHeight: true, 177 }); 178/* 179// either rewrite in vanilla or let it be 180// splide__text transition after each slide toggle 181 182splide.on('inactive', function () { 183 $('#slideshow .splide__text').fadeOut(100); 184}); 185splide.on('moved', function () { 186 $('#slideshow .splide__text').fadeIn(800); 187}); 188*/ 189 splide.mount(); 190 } 191 192 193}) 194 195 196 197 198 if ( jQuery().hoverdir ) { 199 jQuery( '.hoverdir-container .hoverdir-item' ).each( function() { 200 jQuery( this ).hoverdir(); 201 } ); 202 } // /hoverdir 203 204 if ( jQuery().hoverdir ) { 205 206 jQuery( '.cubic .posts-item' ).each( function() { jQuery( this ).hoverdir(); } ); 207 208 } // /hoverdir 209 210 211 // megamenu 212 if (window.innerWidth > 992) { 213 214 document.querySelectorAll('.navbar .nav-item.has-megamenu').forEach(function (everyitem) { 215 216 everyitem.addEventListener('mouseover', function (e) { 217
218 let el_link = this.querySelector('a.nav-link.mb-2'); 219 220 if (el_link != null) { 221 let nextEl = el_link.nextElementSibling; 222 el_link.classList.add('show'); 223 nextEl.classList.add('show'); 224 } 225 226 }); 227 everyitem.addEventListener('mouseleave', function (e) { 228 let el_link = this.querySelector('a.nav-link.mb-2'); 229 230 if (el_link != null) { 231 let nextEl = el_link.nextElementSibling; 232 el_link.classList.remove('show'); 233 nextEl.classList.remove('show'); 234 } 235 236 237 }); 238 239 240 }); 241 242 } 243 244$(function() { 245 if ($('#teaser-cubic').length) { 246 var cube = new Cube({ 247 cubeWrapperSelector: '.CubeWrapper', 248 transitionTime: 400 249 }); 250 } 251}); 252 253// Look for .hamburger 254var hamburger = document.querySelector(".hamburger"); 255// On click 256hamburger.addEventListener("click", function () { 257 // Toggle class "is-active" 258 hamburger.classList.toggle("is-active"); 259 // Do something else, like open/close menu 260 document.getElementById('navbar_main').classList.remove('contactmenued'); 261 document.getElementById('navbar_main').classList.toggle('hamburgered'); 262 263}); 264 265$(function () { 266 267 // .locationcard hovering 268 $(".locationcard > .row > div:nth-of-type(2)") 269 .hover(function () { 270 $(this).parent().find("img").css("transform", "scale(1.15)"); 271 }) 272 .mouseout(function () { 273 $(this).parent().find("img").css("transform", "scale(1)"); 274 }); 275 276 // ul with .checkmarklist prepeding fontawesome checkmark 277 if ($('ul.checkmarklist').length) { 278 $('ul.checkmarklist').each(function(){ 279 $(this).find('li').each(function(){ 280 $(this).addClass('icon check'); 281 }); 282 }); 283 } 284 285 // mobilemenu childtoggling 286 (function () { 287 var block, i, j, len, len1, ref, ref1, slideToggler, trigger, 288 bind = function (fn, me) { 289 return function () { 290 return fn.apply(me, arguments); 291 }; 292 }, 293 indexOf = [].indexOf || function (item) { 294 for (var i = 0, l = this.length; i < l; i++) { 295 if (i in this && this[i] === item) return i; 296 } 297 return -1; 298 }; 299 300 slideToggler = (function () { 301 function slideToggler(el1) { 302 this.el = el1; 303 this.toggle = bind(this.toggle, this); 304 if (!this.el) { 305 return; 306 } 307 this.height = this.getHeight(); 308 } 309 310 slideToggler.prototype.getHeight = function () { 311 var clone; 312 if (this.el.clientHeight > 10) { 313 return this.el.clientHeight; 314 } 315 clone = this.el.cloneNode(true); 316 clone.style.cssText = 'position: absolute; visibility: hidden; display: block;'; 317 this.el.parentNode.appendChild(clone); 318 this.height = clone.clientHeight; 319 this.el.parentNode.removeChild(clone); 320 return this.height; 321 }; 322 323 slideToggler.prototype.toggle = function (time) { 324 var currHeight, disp, el, end, init, ref, repeat, start; 325 if (!(this.height > 0)) { 326 this.height = this.getHeight(); 327 } 328 if (time == null) { 329 time = this.height; 330 } 331 currHeight = this.el.clientHeight * (getComputedStyle(this.el).display !== 'none'); 332 ref = currHeight > this.height / 2 ? [this.height, 0] : [0, this.height], start = ref[0], end = ref[1]; 333 disp = end - start; 334 el = this.el; 335 this.el.classList[end === 0 ? 'remove' : 'add']('open'); 336 this.el.style.cssText = "overflow: hidden; display: block; padding-top: 0; padding-bottom: 0"; 337 init = (new Date).getTime(); 338 repeat = function () { 339 var i, instance, ref1, repeatLoop, results, step; 340 instance = (new Date).getTime() - init; 341 step = start + disp * instance / time; 342 if (instance <= time) { 343 el.style.height = step + 'px'; 344 } else { 345 el.style.cssText = "display: " + (end === 0 ? 'none' : 'block'); 346 } 347 repeatLoop = requestAnimationFrame(repeat); 348 if (ref1 = Math.floor(step), indexOf.call((function () { 349 results = []; 350 for (var i = start; start <= end ? i <= end : i >= end; start <= end ? i++ : i--) { 351 results.push(i); 352 } 353 return results; 354 }).apply(this), ref1) < 0) { 355 return cancelAnimationFrame(repeatLoop); 356 } 357 }; 358 return repeat(); 359 }; 360 361 return slideToggler; 362 363 })(); 364 365 ref = document.querySelectorAll('.mobile-lvl2'); 366 for (i = 0, len = ref.length; i < len; i++) { 367 block = ref[i]; 368 block.toggler = new slideToggler(block); 369 } 370 371 ref1 = document.querySelectorAll('.mobilemenu-level-2-toggler'); 372 for (j = 0, len1 = ref1.length; j < len1; j++) { 373 trigger = ref1[j]; 374 trigger.addEventListener('click', function () { 375 for (let i = 0; i < trigger.children.length; i++) { 376 this.children[i].classList.toggle('d-none'); 377 } 378 var ref2; 379 return (ref2 = this.parentNode.nextElementSibling.toggler) != null ? ref2.toggle(
379) : void 0; 380 }); 381 } 382 383 }).call(this); 384}); 385 386 387$(function () { 388 389 /** 390 * * Actionmodal 391 */ 392 393 if ($("#actionmodal").length) { 394 var modalCookie = "modalopened"; 395 396 var readValue = sessionStorage["modalcookie"]; 397 398 if (readValue == "modalopened") { 399 } else { 400 Fancybox.show( 401 [ 402 { 403 src: "#actionmodal", 404 }, 405 ], 406 { 407 infinite: false, 408 } 409 ); 410 sessionStorage["modalcookie"] = modalCookie; 411 } 412 } 413 414 415 /** 416 * * AJAX btn forms 417 */ 418 419 var formbtnsstd = $('.btn.formbtn.formstd') 420 var formbtnscallback = $('.btn.formbtn.formcallback') 421 var formbtnsinfopack = $('.btn.formbtn.forminfo') 422 var formbtnslasik = $('.btn.formbtn.formlasik') 423 424 formbtnsstd.click(function(){ 425 new Fancybox( 426 [ 427 { 428 src: "/data/forms.html", 429 type: "ajax", 430 filter: "#form_contact", 431 }, 432 ], 433 { 434 on: { 435 reveal: (fancybox, slide) => { 436 updateSelect(this); 437 }, 438 done: (fancybox, slide) => { 439 reload_formcheck(); 440 getPrivacyLink(); 441 }, 442 }, 443 } 444 ); 445 }) 446 formbtnscallback.click(function(){ 447 new Fancybox( 448 [ 449 { 450 src: "/data/forms.html", 451 type: "ajax", 452 filter: "#form_callback", 453 }, 454 ], 455 { 456 on: { 457 reveal: (fancybox, slide) => { 458 updateSelect(this); 459 }, 460 done: (fancybox, slide) => { 461 reload_formcheck(); 462 getPrivacyLink(); 463 }, 464 }, 465 } 466 ); 467 }) 468 formbtnsinfopack.click(function(){ 469 new Fancybox( 470 [ 471 { 472 src: "/data/forms.html", 473 type: "ajax", 474 filter: "#inquiry_infopack", 475 }, 476 ], 477 { 478 on: { 479 done: (fancybox, slide) => { 480 reload_formcheck(); 481 getPrivacyLink(); 482 }, 483 }, 484 } 485 ); 486 }) 487 formbtnslasik.click(function(){ 488 Fancybox.defaults.click ='none'; 489 Fancybox.defaults.dragToClose = false; 490 Fancybox.defaults.autoFocus = false; 491 new Fancybox( 492 [ 493 { 494 src: "/data/forms.html", 495 type: "ajax", 496 filter: "#form_lasik", 497 }, 498 ], 499 { 500 on: { 501 reveal: (fancybox, slide) => { 502 loadClass(this); 503 lasikformFunctions(); 504 }, 505 done: (fancybox, slide) => { 506 reload_formcheck(); 507 getPrivacyLink(); 508 }, 509 }, 510 } 511 ); 512 }) 513 514 515 /* ------------------------------------------------------ */ 516 517 // add random class to tile cards for random hovers 518 var classes = [ 'bg-primary-hover', 'bg-secondary-hover' ]; 519 $('#tiles-card-category .card, #tiles-card-row .card').each(function(i) {
520 $(this).addClass(classes[ Math.floor( Math.random()*classes.length ) ] ); 521 }); 522 523 // find iframe (youtube-videos especially) and put it in video-container for responsive-view 524 $('iframe[src*="youtube-nocookie.com"], iframe[src*="youtube.com"], iframe[src*="service.video.taxi"], iframe[src*="media.video.taxi"]').wrap("<div class='video-container'></div>"); 525 526 // get tables and make responsive scrollable 527 $('#main table').wrap("<div class='table-responsive'></div>"); 528 $('#main #doctors .table-responsive').addClass('table-doctors') 529 530 // alerthandling via sessionstoragecookie 531 532 var alertExists = document.getElementById("alert"); 533 534 if (alertExists != null) { 535 536 if (sessionStorage.getItem('Alert') === null) { 537 document.getElementById("alert").style.display = 'block'; 538 sessionStorage.setItem('Alert', 'shown'); 539 } else { 540 document.getElementById("alert").style.display = 'none'; 541 document.getElementById("alert").classList.add('alertshown'); 542 } 543 544 } 545 546 // set padding for main or slideshow of header_height 547 const header = document.getElementById("header"); 548 const alert = document.getElementById("alert"); 549 header_height = header.offsetHeight; 550 if (document.getElementById("alert")) { 551 alert_height = alert.offsetHeight 552 } else { 553 alert_height = 0 554 }; 555 half_header_height = header.offsetHeight / 2; 556 calchheight = header.offsetHeight + 180; 557 console.log(header_height); 558 559 $(document).scroll(function () { 560 561 if ($('#slideshow').length) { 562 if ($('#alert').length && !$('#alert').hasClass('alertshown')) { 563 if (window.scrollY > alert_height) { 564 $('#slideshow').css('padding-top', header_height); 565 } 566 } else { 567 if (window.scrollY > 1) { 568 $('#slideshow').css('padding-top', header_height); 569 } 570 } 571 } else { 572 573 if ($('#alert').length && !$('#alert').hasClass('alertshown')) { 574 if (window.scrollY > alert_height) { 575 $('#main').css('padding-top', header_height) 576 } 577 } else { 578 if (window.scrollY > 1) { 579 $('#main').css('padding-top', header_height) 580 } 581 } 582 583 }; 584 585 if ($('#mfb-menu').length) { 586 if ($(window).width() < 576) { 587 if (window.scrollY > 200) { 588 $('#mfb-menu').fadeIn(); 589 } 590 if (window.scrollY < 200) { 591 $('#mfb-menu').fadeOut(); 592 } 593 } 594 } 595 596 }); 597 598 599 // do navigation transition on scrolling 600 601 window.addEventListener('scroll', function () { 602 const alert = document.getElementById("alert"); 603 if (document.getElementById("alert")) { 604 alert_height = alert.offsetHeight; 605 } else { 606 alert_height = 0 607 }; 608 const navbar_info = document.getElementById("navbar_info"); 609 610 let viewportWidth = window.innerWidth; 611 612 if (viewportWidth > 991) { 613 if (typeof (alert) != 'undefined' && alert != null && !alert.classList.contains("alertshown")) { 614 if (window.scrollY > alert_height) { 615 616 $('#alert').slideUp(); // hide alert 617 $('#alert').addClass('alertshown'); // handle alert 618 619 $('#header').addClass('fixed-top'); // fix navbar 620 $('#navbar_info').slideUp(1000); 621 $('#mainmenu > div').css('transition','all .3s ease-in'); 622 $('#mainmenu > div').css('margin-top', '-24px'); 623 $('#mainmenu > div img').css('height','56px'); 624 $('#mainmenu > div img').css('transition','all .3s ease-in'); 625 626 } else { 627 628 $('#navbar_info').slideDown(); 629 $('#mainmenu > div').css('margin-top','-70px'); 630 $('#mainmenu > div img').css('height','79px'); 631 632 } 633 } 634 // if alert was shown before or is gone empty 635 else { 636 if (window.scrollY > 1) { 637 638 $('#header').addClass('fixed-top'); // fix navbar 639 $('#navbar_info').slideUp(1000); 640 $('#mainmenu > div').css('transition','all .3s ease-in'); 641 $('#mainmenu > div').css('margin-top', '-24px'); 642 $('#mainmenu > div img').css('height','56px'); 643 $('#mainmenu > div img').css('transition','all .3s ease-in'); 644 645 646 } else { 647 648 $('#navbar_info').slideDown(); 649 $('#mainmenu > div').css('margin-top','-70px'); 650 $('#mainmenu > div img').css('height','79px'); 651 652 } 653 } 654 655 } 656 // if window small 657 else { 658 659 if (typeof (alert) != 'undefined' && alert != null && !alert.classList.contains("alertshown")) { 660 if (window.scrollY > alert_height) { 661 $('#alert').slideUp(); // hide alert 662 $('#alert').addClass('alertshown'); // handle alert 663 664 $('#header').addClass('fixed-top'); // fix navbar 665 } 666 } else { 667 if (window.scrollY > 1) { 668 $('#header').addClass('fixed-top'); // fix navbar 669 $('#logomobile').css({'height':'48px','transition':'all .3s linear'}); 670 $('#navbar_main > div.d-flex.d-lg-none.p-3.pb-4').attr('style', 'padding: 0.65rem !important'); 671 $('#navbar_main > div.d-flex.d-lg-none.p-3.pb-4').attr('transition', 'all .3s linear'); 672 } 673 if (window.scrollY < 1) { 674 $('#logomobile').css('height', ''); 675 $('#navbar_main > div.d-flex.d-lg-none.p-3.pb-4').css('padding',''); 676 } 677 } 678 } 679 680 }); 681 682 683$("#tocontent").click(function() { 684 $('html, body').animate({ 685 scrollTop: $("#main").offset().top + (-header_height) 686 }, 100); 687}); 688 689 690var fontsizer = $('#font-sizer-btn'); 691 692 693fontsizer.click(function(e) { 694 695 var fcookie = getCookie("fontsizer"); 696 var desktoplogo = $('#logomain'); 697 698 e.preventDefault(); 699 700 701 702 if (fcookie == null) { 703 704 $(fontsizer).removeClass('text-body').addClass('fw-bold text-secondary') 705 706 document.documentElement.style.setProperty('--bs-body-font-size', '1.2rem'); 707 document.cookie = `fontsizer=1; path=/; max-age=${60 * 60 * 24 * 14};`; 708 709 // $(desktoplogo).css('width','200px'); 710 711 console.log('fonts bigger now') 712 713 } else { 714 715 $(fontsizer).removeClass('fw-bold text-secondary').addClass('text-body') 716 717 document.documentElement.style.setProperty('--bs-body-font-size', '1rem'); 718 document.cookie = `fontsizer=1; path=/; max-age=0;`; 719/* navLinkPseudos.forEach(function (navlinkitem) { 720 navlinkitem.style.position = 'relative'; 721 }); */ 722 723 $(desktoplogo).css("width", ""); 724 725 console.log('fonts smaller now'); 726 727 } 728 729 730}); 731 732var fcookie = getCookie("fontsizer"); 733 734if (fcookie == null) { 735$(fontsizer).addClass('text-body').removeClass('fw-bold text-secondary') 736} else { 737 $(fontsizer).removeClass('text-body').addClass('fw-bold text-secondary') 738 739 document.documentElement.style.setProperty('--bs-body-font-size', '1.2rem'); 740 741 console.log('big ol fonts were selected in the past') 742 743} 744 745var darkmode = $("#darkmode-btn"); 746 747darkmode.click(function(e) { 748 749 e.preventDefault(); 750 751 var dmcookie = getCookie("darkmode"); 752 753 if (dmcookie== null) { 754 document.querySelector('body').classList.add('dark'); 755 document.cookie = `darkmode=1; path=/; max-age=${60 * 60 * 24 * 14};`; 756 console.log('darkmode on'); 757 } else { 758 document.querySelector('body').classList.remove('dark'); 759 document.cookie = `darkmode=1; path=/; max-age=0;`; 760 console.log('darkmode off'); 761 } 762 763}); 764 765var dmcookie = getCookie("darkmode"); 766 767if (dmcookie != null) { 768 document.querySelector('body').classList.add('dark'); 769 console.log('fancy contrast was selected in the past') 770} 771 772}); 773 774
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.