1$(document).ready(function () { 2 const sendEvent = (typeof AnalyticsHelpers !== 'undefined') ? AnalyticsHelpers.sendEvent : function () {}; 3 const isMobileOrTablet = (typeof UiHelpers !== 'undefined') 4 ? UiHelpers.isMobileOrTablet 5 : /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 6 7 // Mobile submenu open 8 if (isMobileOrTablet) { 9 $('.navigation_item.has_sub_menu').on('click', function () { 10 $(this).children('.sub_menu_wrapper').addClass('open'); 11 }); 12 } 13 14 // Staggered animation for sub items 15 const STEP = 0.1; 16 $('.navigation_item.has_sub_menu').each(function () { 17 const $navItem = $(this); 18 const isHovered = $navItem.is(':hover'); 19 $navItem.find('.sub_item_wrapper').each(function (index) { 20 const delay = STEP * index; 21 $(this).css({ 22 transform: isHovered ? 'translateY(0)' : 'translateY(10px)', 23 opacity: isHovered ? 1 : 0, 24 transition: `transform 0.3s ease ${delay}s, opacity 0.3s ease ${delay}s`, 25 }); 26 }); 27 }); 28 29 $('.navigation_item.has_sub_menu') 30 .on('mouseenter', function () { 31 $(this).find('.sub_item_wrapper').css({ transform: 'translateY(0)', opacity: 1 }); 32 }) 33 .on('mouseleave', function () { 34 $(this).find('.sub_item_wrapper').css({ transform: 'translateY(10px)', opacity: 0 }); 35 }); 36 37 // Overlay blur 38 const $overlay = $('.overlay_blur'); 39 const $nav = $('.nav_holder'); 40 const $items = $nav.find('.navigation_item'); 41 42 $items.on('mouseenter', function () { 43 $(this).hasClass('has_sub_menu') ? $overlay.addClass('show') : $overlay.removeClass('show'); 44 }); 45 $nav.on('mouseleave', function () { $overlay.removeClass('show'); }); 46 47 // Burger / mobile menu 48 $('.burger').on('click', function () { 49 $(this).toggleClass('open'); 50 $('#mob_menu').toggleClass('open'); 51 $('html, body').toggleClass('freeze', $(this).hasClass('open')); 52 }); 53 54 $('.back').on('click', function (e) { 55 e.stopPropagation(); 56 $(this).parent('.sub_menu_wrapper').removeClass('open'); 57 }); 58 59 // Nav click tracking 60 $('.nav_holder > ul li a').on('click', function (e) { 61 e.preventDefault(); 62 const $link = $(this); 63 const href = $link.attr('href'); 64 let label = $link.text().trim(); 65 if ($link.children().find('.sub_item_title').length > 0) { 66 label = $link.children().find('.sub_item_title strong').text().trim(); 67 } 68 sendEvent('fn_navigation_click', { label }); 69 window.open(href, '_self'); 70 }); 71});
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.