1jQuery( document ).ready(function() { 2 3 initHersteller(); 4 5 6 7 jQuery( "h1,h2,h3" ).each(function( index ) { 8 var h2content = jQuery(this).html(); 9 jQuery(this).html('<span>'+h2content+'</span>'); 10 }); 11 12 jQuery(".karriere_link").click(function() { 13 window.location.replace('/karriere/'); 14 }); 15 16 17 document.querySelectorAll('.skip-links a').forEach(link => { 18 link.addEventListener('click', function (e) { 19 e.preventDefault(); 20 21 const targetTag = this.getAttribute('data-target'); 22 const targetElement = document.querySelector(targetTag); 23 24 if (targetElement) { 25 targetElement.setAttribute('tabindex', '-1'); // Sicherstellen, dass das Element fokussierbar ist 26 targetElement.focus(); 27 28 // Optional: Scrollen 29 targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' }); 30 } 31 }); 32 }); 33 34 document.querySelectorAll('nav[data-nav] li.has-child > a').forEach(link => { 35 link.addEventListener('click', function (e) { 36 const parentLi = this.parentElement; 37 const submenuWrapper = parentLi.querySelector('.wrapper'); 38 const subnav = submenuWrapper.querySelector('.subnav'); 39 const background = submenuWrapper.querySelector('.background'); 40 41 const isOpen = parentLi.classList.contains('submenu-open'); 42 43 if (!isOpen) { 44 e.preventDefault(); 45 46 // Alle anderen Untermenüs schlieÃen und Hintergrund zurücksetzen 47 document.querySelectorAll('nav[data-nav] li.has-child').forEach(item => { 48 item.classList.remove('submenu-open'); 49 const wrapper = item.querySelector('.wrapper'); 50 if (wrapper) wrapper.style.display = 'none'; 51 52 const bg = item.querySelector('.background'); 53 if (bg) bg.style.height = '0'; 54 }); 55 56 // Dieses Untermenü öffnen 57 parentLi.classList.add('submenu-open'); 58 submenuWrapper.style.display = 'block'; 59 60 // Hintergrund auf Höhe der Subnavigation setzen 61 if (background && subnav) { 62 background.style.height = `${subnav.offsetHeight}px`; 63 } 64 65 // Fokus für Barrierefreiheit 66 const firstSubLink = subnav.querySelector('a'); 67 if (firstSubLink) { 68 firstSubLink.focus(); 69 } 70 71 } else { 72 // Bereits offen â Seitenwechsel zulassen 73 return true; 74 } 75 }); 76 }); 77 78 79 80}); 81 82 83 84 85function smoothScrollTo(targetY, duration = 800) { 86 const startY = window.pageYOffset; 87 const distance = targetY - startY; 88 const startTime = performance.now(); 89 90 function step(currentTime) { 91 const elapsed = currentTime - startTime; 92 const progress = Math.min(elapsed / duration, 1); 93 94 // easeInOut 95 const ease = 96 progress < 0.5 97 ? 2 * progress * progress 98 : 1 - Math.pow(-2 * progress + 2, 2) / 2; 99 100 window.scrollTo(0, startY + distance * ease); 101 102 if (progress < 1) { 103 requestAnimationFrame(step); 104 } 105 } 106 107 requestAnimationFrame(step); 108} 109function initHersteller() { 110 111 const nav = document.querySelector('.hersteller-abc-wrap'); 112 if (!nav) return; 113 114 nav.addEventListener('click', function (e) { 115 116 const link = e.target.closest('a.active'); 117 if (!link) return; 118 119 e.preventDefault(); 120 e.stopPropagation(); 121 122 const letter = link.dataset.letter; 123 if (!letter) return; 124 125 const target = document.querySelector('.wak-anchor-buchstabe-' + letter); 126 if (!target) return; 127 128 const OFFSET = window.innerWidth <= 1024 ? 67 : 134; 129 130 const targetY = 131 target.getBoundingClientRect().top + 132 window.pageYOffset - 133 OFFSET; 134 135 smoothScrollTo(targetY, 700); 136 }); 137}
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.