PageSourceSearch

https://medical42.ru/simai/asset/simai.framework/sf4.master/plugin/navigation/js/sf-nav.js?164845880431859

js medical42.ru collected 2026-10-02 17:52:34 UTC 31,859 bytes, 709 lines download raw bytes

1;(function($, window, document, undefined) {
2
3    //alert('Основной SCRIPT');
4    //alert('Основной SCRIPT');
5    //test
6// ========= DEFAULTS PARAMS ========= //
7
8    $.sfNavMulti = function(element, options) {
9// ========= DEFAULTS PARAMS ========= //
10        var defaults = {
11            mobileWidth: 768,
12            overlay: true,
13            overlayColor: "rgba(0, 0, 0, 0.7)",
14            hideScrollBar: true,
15            offCanvasSide: 'left',
16            onInit: function() {},
17            onShowOffCanvas: function() {},
18            onHideOffCanvas: function() {},
19    // ================ horisonatal navigation transformMenu ================ //
20            transformInit: false,
21            transformThreshold: 1,
22            transformCutoff: 0,
23            iconMenu: '<i class="far fa-ellipsis-h fa-lg" aria-hidden="true"></i>',
24    // ================ end flexMenu ================ //
25            fixedInit: false,
26            fixedId: '#sf-nav-id',
27            topSpace: 0,
28    // ================ end flexMenu ================ //            
29            leftFlag: false,
30//============== TOP ==============//
31            transformFlag: true,
32            transformPaddingOne: 'p-3',
33            transformPaddingLower: 'p-2',
34            transformTheme: 'theme-dark',
35            transformEffectHover: 'underline',
36            fullScreenFlag: true,
37            fullScreenTheme: 'theme-dark',
38            fixedFlag:true,
39            fixedClass: 'nav-fixed',
40            mobileFlag:true,
41            transferHeadingItem: false,
42            searchContainer: false,
43            horizontalSubmenu: false,
44			positionY:false,
45        };
46// ========= PLUGIN EVENTS ========= //
47        var plugin = this,
48            widthW = 0,
49            heightW = 0;           
50        plugin.settings = {};
51        var $element = $(element), element = element;
52        // PLUGIN INIT
53        plugin.init = function() {
54            //window.addEventListener('DOMContentLoaded', function() {
55                plugin.settings = $.extend({}, defaults, options);
56            if(plugin.settings.leftFlag)
57                leftCatalog();
58            else {
59                var section = $(element).find('.center-section');
60                if(!section.find('> ul.nav-items').hasClass('flex-wrap'))
61                    section.find('> ul.nav-items').addClass('flex-wrap');
62                if(section.hasClass('overflow-hidden'))
63                    section.removeClass('overflow-hidden');
64                section.attr('style', '');
65
66                $(element).find('.btn-mobile').on('click touchend', function(e) {
67                    e.stopPropagation();
68                    e.preventDefault();
69                    plugin.showOffcanvas();
70                    mobileMode();
71                    document.body.style.overflow = 'hidden';
72                });
73
74                $(element).find('.sf-close').on('click touchend', function() {
75                    plugin.hideOffcanvas();
76                    document.body.style.overflow = 'auto';
77                });
78
79                if(plugin.settings.fullScreenFlag) {
80                    $(element).find(".btn-full-screen").on('click touchend', function() {
81                        fullScreenMode();
82                        plugin.showNav();
83                    });
84                }
85
86                $(element).find(".btn-search, .sf-close").on("click touchend keyup", function(e) {
87                    e.stopPropagation(); 
88                    e.preventDefault();
89                    var code = e.keyCode || e.which;
90                    if(e.type === "click" || e.type === "touchend" || (e.type === "keyup" && code == 13))
91                        plugin.toggleSearch();
92                    else if(code == 9) $(e.target).blur();
93                    
94                });
95                
96                if(plugin.settings.transformFlag) {
97                    widthW = windowWidth();
98                    heightW = windowHeight();
99                    
100                    function resizeInit() {
101
102                        if(windowWidth() < widthW || windowHeight() < heightW) {
103                            transformMode(true);                                
104                            transformMode(false);                        
105                        } else if(windowWidth() > widthW || windowHeight() > heightW) {
106                            transformMode(true);
107                            transformMode(false);
108                        }  
109                        else {                           
110                            transformMode(false); 
111                        }                  
112                        widthW = windowWidth();
113                        heightW = windowHeight();
114
115                        if(plugin.settings.horizontalSubmenu) {
116                            //horizontalMode();
117                        }
118                    }
119                    setTimeout(resizeInit, 3000); //resizeInit();
120                    
121                    $(window).resize(resizeInit);
122                }
123                if(plugin.settings.fixedFlag) fixedMode();
124                if(plugin.settings.overlay) $(element).append('<div class="nav-overlay"></div>');
125                if(plugin.settings.transferHeadingItem) transferItem();
126
127                if(plugin.settings.horizontalSubmenu) {
128                    //horizontalMode();
129                }
130                
131            }
132            //});
133            
134
135        };
136
137        var transferItem = function() {
138            $(element).find('.transfer-item').css('white-space', 'normal');
139        }
140
141        // show the overlay panel
142        var showOverlay = function(){
143            if(plugin.settings.hideScrollBar) $("body").addClass("no-scroll");
144            
145            if(plugin.settings.overlay){
146                $(element).find(".nav-overlay")
147                    .css("background-color", plugin.settings.overlayColor)
148                    .fadeIn(300)
149                    .on("click touchend", function(){
150                        plugin.hideOffcanvas();
151                         document.body.style.overflow = 'auto';                   
152                    });
153            }
154        };
155        
156        // hide the overlay panel
157        var hideOverlay = function(){
158            if(plugin.settings.hideScrollBar){
159                $("body").removeClass("no-scroll");
160            }
161            if(plugin.settings.overlay){
162                $(element).find(".nav-overlay").fadeOut(400);
163            }
164        };
165 
166        // show offcanvas
167        plugin.showOffcanvas = function(){
168            showOverlay();
169            if(plugin.settings.offCanvasSide == "left"){
170                $(element).find(".center-section").css("transition-property", "left").addClass("open-mobile");
171                
172                var mobileWidth = windowWidth();
173
174                var textMenu = $('ul.transform-submenu').html();
175                var navMenu = $('ul.transform-submenu > li');
176                var textMenu2 = $('ul.nav-menu').slice(0, (navMenu.length - 1)).html();
177                if(textMenu) {
178                    $('ul.transform-submenu').html('');
179                    $('ul.transform-submenu').html(textMenu2 + textMenu);
180                    $('.transform-submenu').detach() 
181                } 
182                else textMenu = $('ul.transform-submenu').html();
183            }
184            else $(element).find(".center-section").css("transition-property", "right").addClass("open-mobile");
185        };
186        
187        // hide offcanvas 
188        plugin.hideOffcanvas = function() {          
189            $(element).find(".center-section").removeClass("open-mobile")
190                .on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
191                    $(element).find(".center-section")
192                        .css("transition-property", "none")
193                        .off();
194            });
195
196            $(element).find(".mobile-level").removeClass("open-mobile")
197                .on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
198                    $(element).find(".mobile-level")
199                        .css("transition-property", "none")
200                        .off();
201            });
202            hideOverlay();
203        };
204        
205        // toggle offcanvas
206        plugin.toggleOffcanvas = function(){
207            if(windowWidth() <= plugin.settings.mobileBreakpoint){
208                if($(element).find(".center-section").hasClass("open-mobile")) plugin.hideOffcanvas();
209                else plugin.showOffcanvas();
210            }
211        };
212        
213        // show/hide the search form
214        plugin.toggleSearch = function(){
215            if($(element).find(".nav-search").find("form").css("display") == "none"){
216                $(element).find(".nav-search").find("form").css('display', 'flex');
217                $(element).find(".nav-search").find("input").focus();
218                if(plugin.settings.searchContainer) $(element).css('position', 'relative');
219            }
220            else{
221                $(element).find(".nav-search").find("form").css('display', 'none');
222                $(element).find(".nav-search").find("input").blur();
223                if(plugin.settings.searchContainer) $(element).css('position', 'static');
224            }
225        };
226// ========= FULL.SCREEN.MENU ========= //
227        var fullScreenMode = function() {
228            plugin.showNav = function() {
229                $('.sf-nav-full-screen').addClass(plugin.settings.animation).fadeIn(300, function(){
230                    $('html,body').css('overflow', 'hidden');
231                });
232                adjustMenuPadding();
233            }
234
235            var subElement = function(el) {
236                var strSubLevel = '';
237                $subElem = $(el).children('div.mobile-level').children('ul.submenu-items');
238
239                if($subElem.length > 0) {
240                    //console.log($subElem.children('li')[0]);
241                    var index = 0;
242                    $subElem.children('li').each(function() {
243                        if(index != 0) {
244                            $subLevelUp = $(this);
245                            if($(this).find('ul.submenu-items').length > 0) {
246
247                            }
248                            strSubLevel += '<li>' + $(this).html().substr(0, ($(this).html().indexOf('</span>', 0) + 7)) + '</span>';
249                            if($subLevelUp.children('div.mobile-level').children('ul.submenu-items').length > 0) {
250                                strSubLevel += '<span class="submenu-indicator item-icon"><i class="fal fa-angle-down" aria-hidden="true"></i></span></a>'
251                                            + '<ul class="sf-full-screen-sub-level">' + subElement($subLevelUp) + '</ul></li>'
252                            } else strSubLevel += '</a></li>';
253                        }
254                         index++;
255                    });
256
257                    strSubLevel += '</li>';
258
259                    return strSubLevel;
260                }
261                return strSubLevel;
262            }
263
264            plugin.initFullScreen = function() {
265                var fullScreenWindow = '<div class="sf-nav-full-screen ' + plugin.settings.fullScreenTheme + '">'
266                                    + '<div class="sf-nav-full-screen-header">';
267
268                $strE = $(element).find('.left-section').find('.nav-brand');
269                if($strE.length > 0) {
270                    fullScreenWindow += '<div class="sf-nav-full-screen-brand">' + $strE[0].outerHTML + '</div>';
271                }
272                fullScreenWindow += '<button class="sf-close t-1 sf-close-center"></button>';
273                fullScreenWindow += '</div><div class="sf-nav-full-screen-content">'
274                                + '<div class="sf-nav-full-screen-lists sf-scroll">';
275
276                $(element).children('section.center-section')
277                            .children('ul.nav-items')
278                            .find('> li').each(function() {
279                                var  trans = this.querySelector('a.btn-transform');
280                                if(trans != null) {
281                                    $(this).children('ul.transform-submenu').find('> li').each(function() {
282                                        var tagLi = '<ul class="sf-nav-full-screen-list">'
283                                            + '<li class="sf-nav-full-screen-list-header">'
284                                            + $(this).html().substr(0, ($(this).html().indexOf('</span>', 0) + 7))
285                                            + '</span></a></li>';
286                                        $flagSubL = $(this);
287                                        tagLi += subElement($flagSubL);
288                                        tagLi += '</ul>';
289                                        fullScreenWindow += tagLi;
290                                    });
291                                } else {
292                                    var tagLi = '<ul class="sf-nav-full-screen-list">'
293                                        + '<li class="sf-nav-full-screen-list-header">'
294                                        + $(this).html().substr(0, ($(this).html().indexOf('</span>', 0) + 7))
295                                        + '</span></a></li>';
296                                    $flagSubL = $(this);
297                                    tagLi += subElement($flagSubL);
298                                    tagLi += '</ul>';
299                                    fullScreenWindow += tagLi;
300                                }
301                            });
302                      fullScreenWindow += '</div></div></div>';
303                      $('body').append(fullScreenWindow); 
304            };
305
306            plugin.initEvents = function() {
307                var opts = this.settings;
308                $elem = $('.sf-nav-full-screen-lists');
309                $elem.children("ul").find("span.item-icon").bind("click touchend", function(e){
310                    
311                    e.stopPropagation(); 
312                    e.preventDefault();
313    
314                    if($(this).parent().siblings('.sf-full-screen-sub-level').length > 0) {
315                        if($(this).parent().siblings('.sf-full-screen-sub-level').css("display") == "none") {
316                            $(this).parent().siblings('.sf-full-screen-sub-level').css("display", 'flex');
317                            $(this).addClass("submenu-indicator-minus");
318                            return false;
319                        }
320                        else $(this).parent().siblings('.sf-full-screen-sub-level').css("display", 'none');
321                        if($(this).hasClass("submenu-indicator-minus")) $(this).removeClass("submenu-indicator-minus");
322                    }
323                });
324            };
325            
326            plugin.hideNav = function() {
327                $('.sf-nav-full-screen').removeClass('zoom').fadeOut('300');
328                $('html,body').css('overflow', 'auto');  
329            }
330            
331            var buttonHideNav = function() {
332                $('.sf-nav-full-screen').children('.sf-nav-full-screen-header').children(".sf-close").on("click touchend", function() {
333                    plugin.hideNav();
334                });
335            }
336    
337            var adjustMenuPadding = function() {
338                var contentHeight = $(element).find(".sf-nav-full-screen-content").innerHeight();
339                var innerElementsHeight = $(element).find(".full-screen-nav-menu, .sf-nav-full-screen-lists, .full-screen-nav-boxes, .full-screen-nav-circles, .full-screen-nav-general").innerHeight();
340                if(innerElementsHeight > contentHeight){
341                    $(element).find(".sf-nav-full-screen-content").css("padding-top", contentDefaultPaddingTop);
342                }
343                else{
344                    $(element).find(".sf-nav-full-screen-content").css("padding-top", (contentHeight - innerElementsHeight) / 2);
345                }
346            }
347
348            plugin.initFullScreen();
349            plugin.initEvents();
350            buttonHideNav();
351
352            $(window).resize(function(){
353                adjustMenuPadding();
354            });
355            
356        }
357// ========= END FULL.SCREEN.MENU ========= //
358// ========= FLEX.MENU ========= //
359        var transformMode = function(undo) {
360            var $this = $(element).children('.center-section').children('ul'),
361            $items = $this.find('> li'),
362            $firstItem = $items.first(),
363            $lastItem = $items.last(),
364            numItems = $this.find('li').length,
365            firstItemTop = Math.floor($firstItem.offset().top),
366            firstItemHeight = Math.floor($firstItem.outerHeight(true)),
367            $lastChild,
368            keepLooking,
369            $moreItem,
370            $moreLink,
371            numToRemove,
372            allInPopup = false,
373            $menu,
374            i;
375
376            function needsMenu($itemOfInterest) {
377                if($itemOfInterest !== undefined) {
378                    if((Math.ceil($itemOfInterest.offset().top)) >= (firstItemTop + firstItemHeight))
379                        return true;
380                    else return false;
381                } else return false;
382                
383            }
384            if(needsMenu($lastItem) && numItems > plugin.settings.transformThreshold && !undo && $this.is(':visible')) {
385                if(windowWidth() > plugin.settings.mobileWidth) {
386                    var $popup = $('<ul class="transform-submenu nav-dropdown nav-submenu m-0 p-0 flex-column mobile-level ' + plugin.settings.transformTheme + '"></ul>');
387                    $popup.addClass('');
388                    for(i = numItems; i > 1; i--) {
389                        $lastChild = $this.find('> li:last-child');
390                        keepLooking = (needsMenu($lastChild));
391                        if((i - 1) <= plugin.settings.transformCutoff) {
392                            $(this.children().get().reverse()).appendTo($popup);
393                            allInPopup = true;
394                            break;
395                        }
396                        if(!keepLooking) {
397                            break;
398                        } else {
399                            $lastChild.appendTo($popup);
400                        }
401                    }
402                    if(allInPopup) {
403                        $this.append('<li class="menu-item nav-item transform-allInPopup"><a href="#" class="btn-transform ' +
404                            plugin.settings.transformEffectHover + ' ' + plugin.settings.transformPaddingOne + '">' + 
405                            plugin.settings.iconMenu + '</a></li>');
406                    } else {
407                        $this.append('<li class="menu-item nav-item"><a href="#" class="btn-transform item-link ' +
408                                    plugin.settings.transformEffectHover + ' ' + plugin.settings.transformPaddingOne + '"><span class="item-icon">' + 
409                                    plugin.settings.iconMenu + '</span></a></li>');
410                    }
411                    $moreItem = $this.find('> li.menu-item');//.find('.mobile-level');
412
413                    if(needsMenu($moreItem)) {
414                        $this.find('> li:nth-last-child(2)').appendTo($popup);
415                    }
416
417                    $popup.children().each(function(i, li) {
418                        $popup.prepend(li);
419                    });
420                    $moreItem.append($popup);
421                    $moreLink = $this.find('> li.menu-item > a');
422                    $moreLink.click(function(e) {
423                        var $activeMenus,
424                            $menusToCollapse;
425                        $activeMenus = $('li.menu-item.active');
426                        $menusToCollapse = $activeMenus.not($moreItem);
427                        $menusToCollapse.removeClass('active').find('> ul').css('display', 'none');
428                        $popup.toggle();
429                        $moreItem.toggleClass('active');
430                        e.preventDefault();
431                    });
432                }
433                else if(windowWidth() <= (plugin.settings.mobileWidth)) {
434                    $menu = $this.find('ul.transform-submenu');
435                    numToRemove = $menu.find('li').length;
436                    for(i = 1; i <= numToRemove; i++) {
437                        $menu.find('> li:first-child').appendTo($this);
438                    }
439                    $menu.remove();
440                    $this.find('> li.menu-item').remove();
441                }
442            }
443            else if (undo && $this.find('ul.transform-submenu')) {
444                if(windowWidth() > (plugin.settings.mobileWidth)) {
445                    $menu = $this.find('ul.transform-submenu');
446                    numToRemove = $menu.find('li').length;
447                    for(i = 1; i <= numToRemove; i++) {
448                        $menu.find('> li:first-child').appendTo($this);
449                    }
450                    $menu.remove();
451                    $this.find('> li.menu-item').remove();
452                }
453            }
454        };
455        // ========= FIXED.MENU ========= //
456        var fixedMode = function() {
457
458            var navF = document.querySelector(plugin.settings.fixedId),
459                location = navF.getBoundingClientRect(),
460                locationStart = plugin.settings.topSpace ? plugin.settings.topSpace : 0,
461                classF = plugin.settings.fixedClass ? new String(plugin.settings.fixedClass) : "fixed-top";
462                classF += " transition";
463                var arrClassF = classF.split(" "),
464                lastScroll = 0;
465            
466
467            if(location.y < locationStart) {
468                for(var k = 0; k < arrClassF.length; k++) navF.classList.add(arrClassF[k]);
469                navF.style.top = 0;
470            } else for(var k = 0; k < arrClassF.length; k++) navF.classList.remove(arrClassF[k]);
471
472            document.addEventListener("scroll", function(e) {
473                var location = navF.getBoundingClientRect(),
474                    locationContainer = navF.parentNode.getBoundingClientRect();
475                if(location.y < locationStart) {
476                    for(var k = 0; k < arrClassF.length; k++) navF.classList.add(arrClassF[k]);
477                    navF.style.top = '0';
478                } else if(location.y <= locationContainer.y) for(var k = 0; k < arrClassF.length; k++) navF.classList.remove(arrClassF[k]);
479
480            
481            });
482        };
483
484        var leftCatalog = function() {
485            $(element).children("ul").find("span.submenu-indicator").bind("click touchend", function(e) {
486                e.stopPropagation(); 
487                e.preventDefault();
488                if($(this).parent().siblings('div.catalog-submenu').children(".submenu").length > 0) {
489                    if($(this).parent().siblings('div.catalog-submenu').children(".submenu").css("display") == "none") {
490                        $(this).parent().siblings('div.catalog-submenu').children(".submenu").css('display', 'block');
491                        $(this).parent().parent().parent().children(".submenu").css('display', 'none');
492                        $(this).parent().parent().parent().children(".submenu").siblings("a").removeClass("submenu-indicator-minus");
493                        $(this).parent().parent().parent().children(".submenu").siblings("a").children('i').css('transform', 'rotate(-90deg)');
494                        $(this).children('i').css('transform', 'rotate(0deg)');
495                        $(this).addClass("submenu-indicator-minus");
496                        return false;
497                    }
498                    else {
499                        $(this).parent().siblings('div.catalog-submenu').children(".submenu").delay(0).slideUp(0);
500                    }
501                    if($(this).hasClass("submenu-indicator-minus")) {
502                        $(this).removeClass("submenu-indicator-minus");
503                        $(this).children('i').css('transform', 'rotate(-90deg)');
504                    }
505                }
506            });
507        }
508
509//========== ========= //
510        
511// ========= END FIXED.MENU ========= //
512// ========= MOBILE.PUSH.MENU ========= //
513        var mobileMode = function() {
514            var $this = $(element),
515                $level = $this.find('> .mobile-level'),
516                i = 0;
517            function initEventClick(el, levelM) {
518                if($(el).attr('data-level') === levelM) {
519
520                $(el).parent().parent().find('> li').find('> a').each(function() {
521                        if(this.querySelector('.item-icon')) {
522							
523							 $(this).on('click touchstart', function(e) {
524                                 plugin.settings.positionY = $(this).position().top;
525                            });
526							
527                            $(this).on('click touchend', function(e) {
528                                e.stopPropagation();
529                                e.preventDefault();
530								if(Math.abs(plugin.settings.positionY - $(this).position().top)<10){
531									
532									var mLevel = this.parentNode.querySelector('.mobile-level');
533									mLevel.style.transitionProperty = 'left';
534									mLevel.classList.add('open-mobile');
535									var back = function() {
536										$(mLevel).removeClass("open-mobile")
537											.on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
538												$(element).find(".mobile-level")
539													.off();
540										});
541									}
542									mLevel.querySelector('a').addEventListener('click', back);
543									
544							    }
545                            });
546                        }
547                    });
548                    
549                }
550            }
551
552            function levelInc(i, el) {
553                i++;
554                var levelSub = $(el).children('ul')
555                    .children('li')
556                    .children('.mobile-level');
557                if(levelSub.length > 0) {
558                    $(levelSub).attr('data-level', 'level-mobile-' + i);
559                    $(levelSub).each(function() {
560                        levelInc(i, this);
561                    });
562                    initEventClick(levelSub, 'level-mobile-' + i);                    
563                }
564                return 0;
565            }
566
567            if($level.length > 0) {
568                $level.each(function() {
569                    i++;
570                    $(this).attr('data-level', 'level-mobile-' + i);
571                    /*if(this.classList.contains('d-flex')) {
572                        this.classList.remove('d-flex');
573                        $(this).children('ul').removeClass('container');
574                    }*/
575                    levelInc(i, this);
576                });
577            }
578
579
580        };
581
582        /*var horizontalMode = function() {
583
584            var ul = $(element).find('.nav-submenu');
585            var ulT = $(element).find('.transform-submenu');
586
587            var ulHeight = ulT.height() || 0;
588
589            $(ul).each(function() {
590                if($(this).height() > ulHeight) ulHeight = $(this).height();
591            });
592
593
594            if(windowWidth() > 767) {
595
596                if(ulT !== undefined)
597                    $(ulT).css('height', ulHeight);
598
599                    $(ul).each(function() {
600                        $(this).css('height', ulHeight);
601                    });
602
603                
604
605                var $this = $(element),
606                    $level = $this.find('> .mobile-level'),
607                    i = 0;
608
609                function initEventClick(el, levelM) {
610                    if($(el).attr('data-level') == levelM && $(el).attr('data-level') !== 'level-mobile-1') {
611                        var dataLevel = $(el).parent().parent();
612                        
613                        if($(dataLevel).attr('data-level') !== 'level-mobile-1') {
614
615                            $(dataLevel).find('> li').find('> a').each(function() {
616
617                                $(this).on('click touchend', function(e) {
618                                    e.stopPropagation();
619                                    e.preventDefault();
620                                    var mLevel = this.parentNode.querySelector('.mobile-level');
621                                    mLevel.style.transitionProperty = 'left';
622                                    mLevel.classList.add('open-horizontal');
623                                    var back = function() {
624                                        $(mLevel).removeClass("open-horizontal")
625                                            .on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd", function(){
626                                                $(element).find(".mobile-level")
627                                                    .off();
628                                        });
629                                    }
630                                    mLevel.querySelector('a').addEventListener('click', back);
631                                });
632
633                            });
634                        }
635                        else {
636                            $(dataLevel).find('> li').find('> a').each(function() {
637                                $(this).unbind('click');
638                            });
639                        }
640
641                        
642                    }
643                }
644
645                function levelInc(i, el) {
646                    i++;
647                    if($(el).hasClass('transform-submenu')) {
648                        var levelSub = $(el).children('li')
649                            .children('.mobile-level');
650                        $(el).attr('data-level', 'level-mobile-' + (i - 1));
651                    } else {
652                        var levelSub = $(el).children('ul')
653                            .children('li')
654                            .children('.mobile-level');
655                        $(el).find('> ul').attr('data-level', 'level-mobile-' + (i - 1));
656                    }
657                    
658
659                    if(levelSub.length > 0) {
660                        $(levelSub).attr('data-level', 'level-mobile-' + i);
661                        $(levelSub).each(function() {
662                            levelInc(i, this);
663                        });
664                        initEventClick(levelSub, 'level-mobile-' + i);                    
665                    }
666                    return 0;
667                }
668
669                if($level.length > 0) {
670                    $level.each(function() {
671                        i++;
672                        $(this).attr('data-level', 'level-mobile-' + i);
673                        levelInc(i, this);
674                    });
675                }
676
677            } else {
678                if(ulT !== undefined)
679                    $(ulT).css('heigth', '100%');
680                $(ul).each(function() {
681                    $(this).css('height', '100%');
682                });
683            }
684
685        };*/
686// ========= END MOBILE.PUSH.MENU ========= //
687
688// =========  WINDOW WIDTH ========= //
689        var windowWidth = function() {
690            return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
691        };
692// =========  WINDOW HEIGHT ========= //
693        var windowHeight = function() {
694            return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
695        };
696
697        plugin.init();
698    };
699
700    $.fn.sfNavMulti = function(options) {
701        return this.each(function() {
702            if(undefined === $(this).data('sfNavMulti')) {
703                var plugin = new $.sfNavMulti(this, options);
704                $(this).data('sfNavMulti', plugin);
705            }
706        });
707    };
708
709})(jQuery, window, document);

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.