PageSourceSearch

https://a2z-accessibility.com/wp-content/themes/a2z-accessibility-child/js/functions.js?ver=1.0.4

js a2z-accessibility.com collected 2026-10-03 21:07:39 UTC 26,624 bytes, 835 lines download raw bytes

1jQuery(document).ready(function () {
2
3    jQuery('.make_blank').attr('target', '_blank')
4    document.addEventListener('keydown', (e) => {
5        if (e.keyCode === 9) {
6            if (jQuery('body').hasClass('accessibility_mode')) {
7
8            } else {
9                const elem = document.querySelector("body");
10                elem.classList.add("accessibility_mode");
11            }
12        }
13    })
14
15    setTimeout(function () {
16        jQuery(".a11y-toggle .aticon-adjust").before('<img src="/wp-content/uploads/2025/09/icon-negishut.svg" alt="" />');
17
18    }, 500);
19
20    jQuery('h1').attr('id', 'skiplinks-content')
21    jQuery('#breadcrumbs').attr('aria-label', 'Your location on the site')
22	jQuery('#breadcrumbs').attr('role', 'navigation')
23
24
25    jQuery('#skiplinks a').click(function () {
26        jQuery('h1').attr('tabindex', '0')
27        setTimeout(function () {
28            jQuery('h1').focus()
29            jQuery('h1').removeAttr('tabindex')
30
31        }, 500);
32
33    });
34
35	jQuery(".e-n-accordion-item-title").attr('role','button')
36    jQuery(".e-n-accordion-item-title").on("click keydown", function (e) {
37        if (e.type === "click" || e.key === "Enter") {
38
39            jQuery(".e-n-accordion-item").removeClass('accordionON')
40            var $el = jQuery(this);
41
42            setTimeout(function () {
43
44                if ($el.attr('aria-expanded') == 'true') {
45                    $el.parent().addClass('accordionON')
46                    //alert(0)
47                } else {
48                    //alert(1)
49                    $el.parent().removeClass('accordionON')
50                }
51            }, 150);
52        }
53    });
54	jQuery(".e-n-accordion-item-title").on("focus", function () {
55		jQuery('.e-n-accordion-item-title').removeAttr('tabindex')
56	});
57	
58	
59
60    jQuery('.logo_img a').attr('aria-label', 'A2z accessibility to home page')
61    jQuery('.es_site .logo_img a').attr('aria-label', 'Accesibilidad A2Z a la página de inicio')
62    jQuery('.de_site .logo_img a').attr('aria-label', 'A2z-Zugänglichkeit zur Startseite')
63
64
65    function initLanguageDropdownKeyboardNavigation() {
66        const holderSel = '.language_holder';
67        const buttonSel = '.language_bt';
68        const listSel = '.menu-dropdown-list';
69        const itemSel = '.menu-dropdown-item';
70
71        function getItems($holder) {
72            // IMPORTANT: do NOT filter :visible, because focused items might not match :visible in some setups
73            return $holder.find(listSel).find(itemSel);
74        }
75
76        function focusItemLoop($items, index) {
77            if (!$items.length) return;
78
79            const lastIndex = $items.length - 1;
80            let i = index;
81
82            // Loop (wrap-around)
83            if (i > lastIndex) i = 0;
84            if (i < 0) i = lastIndex;
85
86            $items.eq(i).trigger('focus');
87			
88			
89        }
90
91        // Keyboard navigation inside menu items (looping)
92        jQuery(document).on('keydown', holderSel + ' ' + listSel + ' ' + itemSel, function (e) {
93            const key = e.key;
94            if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(key)) return;
95
96            const $holder = jQuery(this).closest(holderSel);
97            const $items = getItems($holder);
98            if (!$items.length) return;
99
100            // Prevent dropdown closing from document handlers
101            e.preventDefault();
102            e.stopPropagation();
103            e.stopImmediatePropagation();
104
105            const currentIndex = $items.index(this);
106
107            if (key === 'ArrowDown') focusItemLoop($items, currentIndex + 1);
108            if (key === 'ArrowUp') focusItemLoop($items, currentIndex - 1);
109            if (key === 'Home') focusItemLoop($items, 0);
110            if (key === 'End') focusItemLoop($items, $items.length - 1);
111        });
112
113        // ArrowDown on the toggle button → focus first item (then arrows loop)
114        jQuery(document).on('keydown', holderSel + ' ' + buttonSel, function (e) {
115            if (e.key !== 'ArrowDown') return;
116
117            const $holder = jQuery(this).closest(holderSel);
118            const $items = getItems($holder);
119            if (!$items.length) return;
120
121            e.preventDefault();
122            e.stopPropagation();
123            e.stopImmediatePropagation();
124
125            focusItemLoop($items, 0);
126        });
127    }
128
129    initLanguageDropdownKeyboardNavigation();
130
131    setTimeout(function () {
132
133        
134		
135		jQuery('.e-n-accordion-item-title').removeAttr('tabindex')
136		
137		jQuery('.sub-menu a').removeAttr('tabindex')
138
139        jQuery('.elementor-nav-menu--dropdown .menu-item:last-child').after('<li class="last_link menu-item sr-only"><a href="javascript:void(0)"></a></li>');
140
141        jQuery(".last_link a").focus(function () {
142
143            jQuery(".elementor-menu-toggle").focus()
144
145        });
146		
147		
148		jQuery(".owl-item.active").attr('tabindex', '0')
149		jQuery(".make_hidden").attr('aria-hidden', 'true')
150
151        jQuery(".make_ul .e-con-inner").attr('role', 'list')
152        jQuery(".make_ul .e-con-inner > div").attr('role', 'listitem')
153
154        jQuery(".make_ul_noinner").attr('role', 'list')
155        jQuery(".make_ul_noinner > div").attr('role', 'listitem')
156
157        jQuery(".label_mail a").attr('aria-label', 'email ' + jQuery(".label_mail a").text())
158        jQuery(".label_phone a").attr('aria-label', 'phone ' + jQuery(".label_phone a").text())
159
160
161        jQuery(".label_phone_de a").attr('aria-label', 'Telefon ' + jQuery(".label_phone_de a").text())
162
163        jQuery(".label_mail_es a").attr('aria-label', 'correo electrónico ' + jQuery(".label_mail_es a").text())
164       
165		
166		
167		jQuery(".icons_contact_us li:nth-child(1) a").attr('aria-label', 'email ' + jQuery(".icons_contact_us li:nth-child(1) .elementor-icon-list-text").text())
168		jQuery(".icons_contact_us li:nth-child(2) a").attr('aria-label', 'phone ' + jQuery(".icons_contact_us li:nth-child(2) .elementor-icon-list-text").text())
169		
170		jQuery(".es_site .icons_contact_us li:nth-child(1) a").attr('aria-label', 'correo electrónico ' + jQuery(".icons_contact_us li:nth-child(1) .elementor-icon-list-text").text())
171		jQuery(".de_site .icons_contact_us li:nth-child(2) a").attr('aria-label', 'Telefon ' + jQuery(".icons_contact_us li:nth-child(2) .elementor-icon-list-text").text())
172		
173		
174
175
176        jQuery('.make_lists').attr('role', 'list')
177        jQuery('.make_list ').attr('role', 'listitem')
178		
179		jQuery('.sec_4').attr('role', 'list')
180        jQuery('.sec_4 > div').attr('role', 'listitem')
181		 
182
183        jQuery('.aria_hidden .elementor-heading-title, .aria_hidden').attr({'aria-hidden':'true','tabindex':'-1'});
184
185
186       
187		
188		jQuery('.make_h2 .elementor-heading-title').attr({'role':'heading','aria-level':'2'});
189		
190		jQuery('.make_h2_holder').attr({'role':'heading','aria-level':'2'});
191		
192		
193		
194		
195
196		jQuery('.form_a form').attr('aria-label', jQuery('.form_a_title').text())
197
198
199        jQuery('.share_button li:nth-child(1) a').attr('aria-label', 'facebook')
200        jQuery('.share_button li:nth-child(2) a').attr('aria-label', 'instagram')
201        jQuery('.share_button li:nth-child(3) a').attr('aria-label', 'linkedin')
202
203
204        jQuery('.e-n-menu-dropdown-icon').removeAttr('aria-controls')
205        jQuery('.e-n-menu-dropdown-icon').removeAttr('aria-haspopup')
206
207
208        jQuery('.e-n-menu-dropdown-icon').each(function () {
209            t = jQuery(this).parent().find('.e-n-menu-title-text').text()
210            jQuery(this).attr('aria-label', t)
211        });
212		
213		
214		jQuery('.text_image_bt').each(function () {
215            t = jQuery(this).parent().find('.text_image_title .elementor-heading-title').text()
216            a=jQuery(this).find('.elementor-button-text').text()
217			jQuery(this).find('a').attr('aria-label', a+" "+t)
218        });
219		 
220
221        /*
222		jQuery('.e-n-menu-dropdown-icon').attr('aria-label', 'לפתוח תפריט')
223
224		
225        jQuery('.e-n-menu-dropdown-icon').focus(function () {
226            if (jQuery(this).attr('aria-expanded') == 'true') {
227                jQuery(this).attr('aria-label', 'לסגור תפריט')
228
229            }
230            else {
231                jQuery(this).attr('aria-label', 'לפתוח תפריט')
232
233            }
234        });
235		
236
237        jQuery('.e-n-menu-dropdown-icon').on('keydown', function (e) {
238            if (e.key === 'Enter') 
239			{
240               
241			  
242				if (jQuery(this).attr('aria-expanded') == 'true') 
243				{
244                    jQuery(this).attr('aria-label', 'לסגור תפריט')
245                    jQuery('.header_drop_2_col').focus();
246                }
247                else {
248                    jQuery(this).attr('aria-label', 'לפתוח תפריט')
249
250                }
251				
252            }
253        });
254		*/
255
256    }, 500);
257
258
259    var targetNode = document.body;
260    var config = {
261        childList: true,
262        subtree: true
263    };
264    var callback = function (mutationsList, observer) {
265        for (var mutation of mutationsList) {
266            if (mutation.type === 'childList') {
267
268                mutation.addedNodes.forEach(function (node) {
269                    var target = jQuery(node);
270
271                    if (target.hasClass('wpcf7-not-valid-tip')) {
272
273
274                        if (target.parent().find('input').attr('class') != undefined) {
275
276                            var inputElement = target.parent().find('input');
277
278                            setTimeout(function () {
279                                var aria_describedby = inputElement.attr('aria-describedby')
280                                var placeholder = inputElement.attr('placeholder')
281                                var id = inputElement.attr('id')
282                                var error_text = target.html()
283
284
285                                placeholder = placeholder.replace('*', '')
286
287                                var aa = jQuery('#' + aria_describedby).html()
288
289                                target.html('<span>' + placeholder + ', ' + aa + '</span>')
290
291                                jQuery('.wpcf7-not-valid-tip span').each(function () {
292                                    // Remove the anchor tag but keep its text content
293                                    var text = jQuery(this).html().replace(/<a[^>]*>(.*?)<\/a>/g, '$1');
294                                    jQuery(this).html(text);
295                                });
296                                if (first != -1) {
297                                    if (first == 0) {
298                                        first = 1;
299
300                                        inputElement.focus();
301
302                                    }
303                                }
304
305
306                            }, 100);
307                        }
308
309                        setTimeout(function () {
310                            jQuery('.wpcf7 input, .wpcf7 textarea,.wpcf7 select').removeClass('wpcf7-form-control');
311                        }, 100);
312
313                    }
314                });
315            }
316        }
317    };
318
319
320    var observer = new MutationObserver(callback);
321    observer.observe(targetNode, config);
322
323
324    var observer_cky = new MutationObserver(function () {
325        if (jQuery('.cky-consent-bar:visible').length) {
326
327
328            jQuery(".cky-title").attr('aria-level', '2')
329
330
331            observer_cky.disconnect(); // run once
332        }
333    });
334
335    observer_cky.observe(document.body, {
336        childList: true,
337        subtree: true
338    });
339
340
341    first = -1;
342    jQuery('.wpcf7-form').on('submit', function (event) {
343        first = 0;
344        jQuery("input").focusout(function () {
345
346            jQuery('.wpcf7-not-valid-tip').show();
347
348        });
349        jQuery('.wpcf7 input, .wpcf7 textarea,.wpcf7 select').addClass('wpcf7-form-control');
350    });
351
352    jQuery('input').each(function (index) {
353        placeholder = "";
354        placeholder = jQuery(this).attr('placeholder')
355        if (placeholder != "") {
356            if (placeholder != undefined) {
357
358                placeholder = placeholder.replace(/\*\s/g, "");
359
360                jQuery(this).attr('aria-label', placeholder)
361            }
362        }
363    });
364
365
366    jQuery('textarea').each(function (index) {
367        placeholder = "";
368        placeholder = jQuery(this).attr('placeholder')
369        if (placeholder != "") {
370            if (placeholder != undefined) {
371
372                placeholder = placeholder.replace(/\*\s/g, "");
373                jQuery(this).attr('aria-label', placeholder)
374            }
375        }
376    });
377    setTimeout(function () {
378        form_utm()
379    }, 500);
380
381    var getUrlParameter = function getUrlParameter(sParam) {
382        var sPageURL = decodeURIComponent(window.location.search.substring(1)),
383            sURLVariables = sPageURL.split('&'),
384            sParameterName,
385            i;
386        for (i = 0; i < sURLVariables.length; i++) {
387            sParameterName = sURLVariables[i].split('=');
388            if (sParameterName[0] === sParam) {
389                return sParameterName[1] === undefined ? true : sParameterName[1];
390            }
391        }
392    };
393
394    var utm_source = getUrlParameter('utm_source');
395    var utm_medium = getUrlParameter('utm_medium');
396    var utm_campaign = getUrlParameter('utm_campaign');
397    var utm_content = getUrlParameter('utm_content');
398    var sales_CampaignId = getUrlParameter('sales_CampaignId');
399
400    var utm_url = window.location.href;
401
402    function form_utm() {
403        if (utm_url != null) {
404
405            jQuery('.utm_url').val(utm_url);
406            localStorage.setItem("utm_url", utm_url);
407        } else {
408            if (localStorage.getItem("utm_url") != null) {
409                jQuery('.utm_url').val(localStorage.getItem("utm_url"));
410            }
411        }
412
413        if (utm_lan != null) {
414
415            jQuery('.utm_lan').val(utm_lan);
416            localStorage.setItem("utm_lan", utm_lan);
417        } else {
418            if (localStorage.getItem("utm_lan") != null) {
419                jQuery('.utm_lan').val(localStorage.getItem("utm_lan"));
420            }
421        }
422
423        if (sales_CampaignId != null) {
424
425            jQuery('.sales_CampaignId').val(sales_CampaignId);
426            localStorage.setItem("sales_CampaignId", sales_CampaignId);
427        } else {
428            if (localStorage.getItem("sales_CampaignId") != null) {
429                jQuery('.sales_CampaignId').val(localStorage.getItem("sales_CampaignId"));
430            }
431        }
432
433
434        if (utm_source != null) {
435
436            jQuery('.utm_source').val(utm_source);
437            localStorage.setItem("utm_source", utm_source);
438        } else {
439            if (localStorage.getItem("utm_source") != null) {
440                jQuery('.utm_source').val(localStorage.getItem("utm_source"));
441            }
442        }
443
444        if (utm_medium != null) {
445
446            jQuery('.utm_medium').val(utm_medium);
447            localStorage.setItem("utm_medium", utm_medium);
448        } else {
449            if (localStorage.getItem("utm_medium") != null) {
450                jQuery('.utm_medium').val(localStorage.getItem("utm_medium"));
451            }
452        }
453
454        if (utm_campaign != null) {
455
456            jQuery('.utm_campaign').val(utm_campaign);
457            localStorage.setItem("utm_campaign", utm_campaign);
458        } else {
459            if (localStorage.getItem("utm_campaign") != null) {
460                jQuery('.utm_campaign').val(localStorage.getItem("utm_campaign"));
461            }
462        }
463
464        if (utm_content != null) {
465            jQuery('.utm_content').val(utm_content);
466            localStorage.setItem("utm_content", utm_content);
467        } else {
468            if (localStorage.getItem("utm_content") != null) {
469                jQuery('.utm_content').val(localStorage.getItem("utm_content"));
470            }
471        }
472
473    }
474
475
476});
477
478
479// language holder
480
481jQuery(document).ready(function () {
482    'use strict';
483
484    const holder = jQuery('#' + switcherId);
485
486
487    const button = holder.find('.language_bt');
488    const popup = holder.find('.language_pop');
489
490    if (holder.length === 0) {
491        return;
492    }
493
494    let isOpen = false;
495
496    function showPopup() {
497        popup.stop(true, true).fadeIn(200, function () {
498            popup.addClass('show');
499        });
500        button.addClass('active').attr('aria-expanded', 'true');
501        isOpen = true;
502    }
503
504    function hidePopup() {
505        popup.removeClass('show').stop(true, true).fadeOut(200);
506        button.removeClass('active').attr('aria-expanded', 'false');
507        isOpen = false;
508    }
509
510    function togglePopup() {
511        if (isOpen) {
512            hidePopup();
513
514        } else {
515            showPopup();
516        }
517    }
518
519    button.on('click', function (e) {
520        e.preventDefault();
521        togglePopup();
522    });
523
524    button.on('keydown', function (e) {
525        if (e.key === 'Enter') {
526            e.preventDefault();
527            togglePopup();
528
529        }
530    });
531
532    // סגירה בלחיצה מחוץ לאלמנט
533    jQuery(document).on('click', function (e) {
534        if (!holder.is(e.target) && holder.has(e.target).length === 0 && isOpen) {
535            hidePopup();
536
537        }
538    });
539
540    // סגירה בלחיצה על ESC
541    jQuery(document).on('keydown', function (e) {
542        if (e.key === 'Escape' && isOpen) {
543            hidePopup();
544            button.focus();
545        }
546    });
547
548    // טיפול בפריטי תפריט
549    const menuItems = popup.find('.menu-dropdown-item');
550
551    menuItems.attr('tabindex', '0');
552
553    menuItems.on('mouseenter', function () {
554        jQuery(this).addClass('hover');
555    }).on('mouseleave', function () {
556        jQuery(this).removeClass('hover');
557    });
558
559    menuItems.on('click', function (e) {
560        const thisItem = jQuery(this);
561        const href = thisItem.attr('href');
562
563        if (href && href !== '#') {
564            // ניווט לשפה חדשה
565            window.location.href = href;
566        } else {
567            e.preventDefault();
568        }
569    });
570
571    // ניווט עם מקלדת
572    popup.on('keydown', function (e) {
573        if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
574            e.preventDefault();
575            const focused = menuItems.filter(':focus');
576            let index = menuItems.index(focused);
577
578            if (e.key === 'ArrowDown') {
579                index = index < menuItems.length - 1 ? index + 1 : 0;
580            } else {
581                index = index > 0 ? index - 1 : menuItems.length - 1;
582            }
583
584            menuItems.eq(index).focus();
585        }
586    });
587
588    jQuery(".home_sec_1_bt a,#breadcrumbs a").focus(function () {
589         hidePopup();
590    });
591	jQuery(".make_language_holder a").removeAttr('role')
592 
593 
594 
595    // carousels
596    var owl1p = jQuery('.owl-carousel.service_satge_carousel');
597    owl1p.owlCarousel({
598        loop: false,
599        margin: 25,
600        nav: true,
601        rtl: false,
602
603        autoplay: false,
604
605        autoplayHoverPause: true,
606        dots: false,
607
608        responsive: {
609            0: {
610                items: 1,
611
612                autoplayTimeout: 5000
613            },
614            768: {
615                items: 1,
616                autoplayTimeout: 5000
617            }
618        }
619    });
620
621    jQuery('.owl-carousel.service_satge_carousel .owl-nav .owl-prev').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows2.png">')
622    jQuery('.owl-carousel.service_satge_carousel .owl-nav .owl-next').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows.png">')
623
624    var isPlaying1p = true;
625    jQuery('.service_satge_holder_mobile .toggle-btn').on('click', function () {
626        if (isPlaying1) {
627            owl1p.trigger('stop.owl.autoplay');
628            jQuery(this).html('<img src="/wp-content/uploads/sites/3/2025/06/play-1.png">');
629            jQuery(this).attr('aria-label', 'play')
630
631        } else {
632            owl1p.trigger('play.owl.autoplay', [5000]);
633            jQuery(this).attr('aria-label', 'pause')
634        }
635        isPlaying1p = !isPlaying1p;
636    });
637
638
639    var owl1p = jQuery('.owl-carousel.inner_gallery');
640    owl1p.owlCarousel({
641        loop: true,
642        margin: 80,
643        nav: true,
644        rtl: false,
645
646        autoplay: false,
647
648        autoplayHoverPause: true,
649        dots: false,
650
651        responsive: {
652            0: { // for screens under 768px
653                items: 1,
654                // autoplayTimeout: 5000
655            },
656            1200: { // for screens between 1200px and 1399px
657                items: 3,
658                autoplayTimeout: 5000
659            },
660            1400: { // for screens 1400px and above
661                items: 4,
662                autoplayTimeout: 5000
663            }
664        }
665    });
666
667    jQuery('.inner_gallery .owl-nav .owl-prev').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows.png">')
668    jQuery('.inner_gallery .owl-nav .owl-next').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows2.png">')
669
670
671    jQuery('.owl-item.cloned').addClass('opacity')
672
673    jQuery('.inner_gallery .owl-nav .owl-next').on('click', function () {
674        jQuery('.owl-item.cloned').removeClass('opacity')
675    });
676
677
678    // Slider 1
679    var owl1p = jQuery('.owl-carousel.service_carousel');
680    owl1p.owlCarousel({
681        loop: true,
682        margin: 25,
683        nav: true,
684        rtl: false,
685
686        autoplay: false,
687
688        autoplayHoverPause: true,
689        dots: false,
690        dotsContainer: '.service_holder_mobile .slider-controls .owl-dots',
691        responsive: {
692            0: {
693                items: 1,
694
695                autoplayTimeout: 5000
696            },
697            768: {
698                items: 1,
699                autoplayTimeout: 5000
700            }
701        }
702    });
703
704    jQuery('.owl-carousel.service_carousel .owl-nav .owl-prev').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows2.png">')
705    jQuery('.owl-carousel.service_carousel .owl-nav .owl-next').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows.png">')
706
707    var isPlaying1p = true;
708    jQuery('.service_holder_mobile .toggle-btn').on('click', function () {
709        if (isPlaying1) {
710            owl1p.trigger('stop.owl.autoplay');
711            jQuery(this).html('<img src="/wp-content/uploads/sites/3/2025/06/play-1.png">');
712            jQuery(this).attr('aria-label', 'נגן')
713
714        } else {
715            owl1p.trigger('play.owl.autoplay', [5000]);
716
717            jQuery(this).attr('aria-label', 'עצור')
718        }
719        isPlaying1p = !isPlaying1p;
720    });
721
722
723    var owl1p = jQuery('.owl-carousel.products_carousel');
724    owl1p.owlCarousel({
725        loop: true,
726        margin: 25,
727        nav: true,
728        rtl: false,
729
730        autoplay: false,
731
732        autoplayHoverPause: true,
733        dots: false,
734        dotsContainer: '.products_holder_mobile .slider-controls .owl-dots',
735        responsive: {
736            0: {
737                items: 1,
738
739                autoplayTimeout: 5000
740            },
741            768: {
742                items: 1,
743                autoplayTimeout: 5000
744            }
745        }
746    });
747
748    jQuery('.owl-carousel.products_carousel .owl-nav .owl-prev').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows2.png">')
749    jQuery('.owl-carousel.products_carousel .owl-nav .owl-next').html('<img src="/wp-content/uploads/sites/4/2025/06/arrows.png">')
750
751    var isPlaying1p = true;
752    jQuery('.products_holder_mobile .toggle-btn').on('click', function () {
753        if (isPlaying1) {
754            owl1p.trigger('stop.owl.autoplay');
755            jQuery(this).html('<img src="/wp-content/uploads/sites/3/2025/06/play-1.png">');
756            jQuery(this).attr('aria-label', 'play')
757
758        } else {
759            owl1p.trigger('play.owl.autoplay', [5000]);
760
761            jQuery(this).attr('aria-label', 'pause')
762        }
763        isPlaying1p = !isPlaying1p;
764    });
765
766});
767
768function detectZoom() {
769    const zoomLevel = Math.round(window.devicePixelRatio * 100);
770    if (zoomLevel >= 110 && zoomLevel <= 200) {
771        document.body.classList.add('zoom-range');
772    } else {
773        document.body.classList.remove('zoom-range');
774    }
775	
776	 if (zoomLevel >= 125 && zoomLevel <= 170) {
777        document.body.classList.add('zoom-range-150');
778    } 
779
780    if (zoomLevel == 200) {
781        document.body.classList.add('zoom-range-200');
782    } else {
783        document.body.classList.remove('zoom-range-200');
784    }
785
786}
787
788detectZoom();
789window.addEventListener('resize', detectZoom);
790
791function extractCleanMenu() {
792    const newMenu = jQuery('<ul class="elementor-nav-menu">');
793
794    jQuery('.e-n-menu-heading > .e-n-menu-item').each(function () {
795        const menuItem = jQuery(this);
796        const mainLi = jQuery('<li>');
797
798        // Get the main menu text
799        const mainText = menuItem.find('.e-n-menu-title-text').first().text().trim();
800
801        // Check for dropdown content (submenu) first
802        const dropdownContent = menuItem.find('.elementor-icon-list-items');
803
804        if (dropdownContent.length > 0) {
805            // This is a parent menu item with submenu
806            mainLi.text(mainText);
807            const subMenu = jQuery('<ul>');
808
809            dropdownContent.find('li').each(function () {
810                const subText = jQuery(this).find('.elementor-icon-list-text').text().trim();
811                if (subText) {
812                    subMenu.append('aaaaa');
813                    subMenu.append(jQuery('<li>').append(jQuery('<a>').attr('href', '#').text(subText)));
814                }
815            });
816
817            if (subMenu.children().length > 0) {
818                mainLi.append(subMenu);
819            }
820        } else {
821            // This is a regular menu item
822            const link = menuItem.find('a.e-n-menu-title-container').first();
823            if (link.length > 0) {
824                const href = link.attr('href');
825                mainLi.append(jQuery('<a>').attr('href', href).text(mainText));
826            } else {
827                mainLi.append(jQuery('<a>').attr('href', '#').text(mainText) + "sssss");
828            }
829        }
830
831        newMenu.append(mainLi);
832    });
833
834    return newMenu;
835}

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.