1$(function() { 2 3 var $window = $(window); 4 var $body = $('body'); 5 6 //Toggle main navigation 7 function MagnetecNavToggle() { 8 var $activator = $('header .activator'); 9 var $nav = $('header nav'); 10 $activator.on('click', function (e) { 11 e.preventDefault(); 12 $(this).find('.icon').toggleClass('active'); 13 $body.toggleClass('nav-open'); 14 $nav.slideToggle(500, 'swing'); 15 $('.menu-item').removeClass('active'); 16 }) 17 } 18 MagnetecNavToggle(); 19 20 //Main navigation active state 21 function MagnetecNavActive() { 22 var $activator = $('#header-menue > li'); 23 $activator.on('mouseenter', function () { 24 $activator.removeClass('active'); 25 $(this).addClass('active'); 26 }) 27 .mouseleave(function () { 28 //$(this).removeClass('active'); 29 }); 30 } 31 MagnetecNavActive(); 32 33 //Main navigation active state 34 function MagnetecSubNavActive() { 35 var $activator = $('#header-menue .sub-menu-wrap-0 > .sub-menu > li'); 36 $activator.on('mouseenter', function () { 37 $activator.removeClass('active'); 38 $(this).addClass('active'); 39 }) 40 .mouseleave(function () { 41 $(this).removeClass('active'); 42 }); 43 } 44 MagnetecSubNavActive(); 45 46 //Toggle language navigation 47 function MagnetecLangNavToggle() { 48 var $activator = $('header .actual-lang'); 49 $activator.on('click', function (e) { 50 e.preventDefault(); 51 $body.toggleClass('langnav-open'); 52 }) 53 } 54 MagnetecLangNavToggle(); 55 56 // Sticky Navigation 57 function MagnetecStickyNav() { 58 59 var sticky = false, 60 $breakpoint = 1 61 62 63 $window.on("scroll", stickyNav); 64 65 function stickyNav() { 66 var scrollPos = $window.scrollTop(); 67 if (scrollPos > 150 && $window.width() > $breakpoint) { 68 if (!sticky) { 69 $body.addClass("nav-sticky"); 70 sticky = true; 71 } 72 } else if (scrollPos <= 150 && $window.width() > $breakpoint) { 73 if (sticky) { 74 $body.removeClass("nav-sticky"); 75 sticky = false; 76 } 77 } 78 } 79 stickyNav(); 80 81 } 82 MagnetecStickyNav(); 83 84 function scoutsScrollTop() { 85 var $totop = $('footer .totop'); 86 var $body = $('html, body'); 87 $totop.on('click', function(e){ 88 e.preventDefault(); 89 $body.animate({scrollTop:0}, 500, 'swing') 90 }) 91 } 92 scoutsScrollTop(); 93 94 function scoutsPerson() { 95 var $activator = $('.block-contact .person .name'); 96 $activator.on('click', function (e) { 97 e.preventDefault(); 98 $(this).parents('.person').toggleClass('active'); 99 $(this).siblings('.image, .contact').slideToggle(300); 100 }) 101 } 102 scoutsPerson(); 103 104 function scoutsPersonActive() { 105 if (window.location.hash && $('.block-contact').length !== 0) { 106 var hash = window.location.hash.substring(1); 107 $("#"+hash).addClass('active'); 108 $("#" + hash).find('.image, .contact').slideDown(300); 109 $('html, body').animate({ 110 scrollTop: $("#" + hash).offset().top-200 111 }, 300); 112 } else if (window.location.hash && (".dataTables_wrapper").length === 0) { 113 var hash = window.location.hash.substring(1); 114 $("html, body").animate( 115 { 116 scrollTop: $("#" + hash).offset().top - 200, 117 }, 118 300 119 ); 120 } 121 } 122 scoutsPersonActive(); 123 124 function scoutsAos() { 125 AOS.init(); 126 } 127 scoutsAos(); 128 129 // Mobile Dropdown Navigation 130 function scoutsLangDropdownNav() { 131 132 const $body = $('body'), 133 $trigger = $("header .dropdown-toggle"), 134 $dropdownMenu = $("header .dropdown-menu"); 135 136 $trigger.on("click", function (e) { 137 //e.preventDefault(); 138 e.stopPropagation(); 139 $dropdownMenu.slideToggle(); 140 $body.toggleClass('lang-open'); 141 }); 142 143 $('body').on("click", function (e) { 144 $dropdownMenu.fadeOut(200); 145 $body.removeClass('lang-open'); 146 }); 147 148 } 149 scoutsLangDropdownNav(); 150 151 $('.fact .number').countUp({ 152 delay: 10, 153 time: 1000 154 }); 155 156 157}); 158 159$(window).on('load', function() { 160if (window.location.hash && ('.dataTables_wrapper').length !== 0) { 161 var hash = window.location.hash.substring(1); 162 $("html, body").animate( 163 { 164 scrollTop: $("#" + hash).offset().top - 200, 165 }, 166 300 167 ); 168}
vendor: 3 bytes, line 169
169});
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.