PageSourceSearch

https://masconmenos.nl/wp-content/themes/zerif-pro/js/zerif.js?ver=20120206

js masconmenos.nl collected 2026-10-01 23:49:39 UTC 24,065 bytes, 715 lines download raw bytes

1/* LOADER */
2jQuery(document).ready(function(){
3	
4	var zerif_frame = jQuery('iframe.zerif_google_map');
5	var zerif_frameSrc = new Array();
6
7    if( zerif_frame.length ){
8		jQuery.each( zerif_frame, function(i, f){
9			zerif_frameSrc[i] = jQuery(f).attr('src');
10            /*remove the src attribute so window will ignore these iframes*/
11            jQuery(f).attr('src', '');
12        }); 
13	}
14	
15	function zerif_display_iframe_map() {
16		if( zerif_frame.length ){
17			jQuery.each( zerif_frame, function(a, x){
18				/*put the src attribute value back*/
19				jQuery(x).attr('src', zerif_frameSrc[a]);
20			});
21		}	
22	}
23	
24	jQuery(".status").fadeOut();
25	jQuery(".preloader").delay(1000).fadeOut("slow");
26	setTimeout(zerif_display_iframe_map, 500);
27});
28
29/** BACKGROUND SLIDER ***/
30jQuery(document).ready(function(){
31	if ( jQuery('.fadein-slider .slide-item').length > 1 ) {
32		jQuery('.fadein-slider .slide-item:gt(0)').hide();
33		setInterval(function(){
34			jQuery('.fadein-slider :first-child').fadeOut(2000).next('.slide-item').fadeIn(2000).end().appendTo('.fadein-slider');
35		}, 10000);
36	}
37});
38
39
40/* RESPONSIVE BACKGROUND ON MOBILE */
41var portraitViewInit = 0, // Initial viewport orientation: Default Landscape
42    resize = false;
43jQuery( document ).ready( zerif_bg_responsive );
44jQuery( window ).resize( zerif_bg_responsive );
45function zerif_bg_responsive() {
46  if( jQuery( '#mobile-bg-responsive' ).length > 0 && jQuery( 'body.custom-background' ).length > 0 && isMobile.any() ) {
47    // There is background image
48    var windowWidth   = window.innerWidth;
49    var windowHeight  = window.innerHeight;
50    // Check if orientation is Portrait or Landscape: Default is Landscape
51    portraitView = 0;
52    if( windowHeight >= windowWidth ) {
53      portraitView = 1;
54    }
55    if( isMobile.iOS() ) {
56      windowHeight+=100;
57    }
58    if( portraitViewInit != portraitView ) {
59      var bgHelper = jQuery( '.zerif-mobile-bg-helper-bg' );
60      if( !resize ) {
61        var imgURL = jQuery( 'body.custom-background' ).css( 'background-image' );
62        jQuery( '.zerif-mobile-bg-helper-bg-inside' ).css( { 
63          'background-image': imgURL,
64        } ).addClass( 'zerif-mobile-h-inside' );
65        jQuery( '.zerif-mobile-bg-helper-wrap-all' ).addClass( 'zerif-mobile-h-all' );
66        jQuery( '.zerif-mobile-bg-helper-content' ).addClass( 'zerif-mobile-h-content' );
67        bgHelper.css( {
68          'width':      windowWidth,
69          'height':     windowHeight
70        } ).addClass( 'zerif-mobile-h-bg' );
71        portraitViewInit = portraitView;
72        resize = true;
73      } else {
74        // Resize window
75        bgHelper.css( {
76          'width':      windowWidth,
77          'height':     windowHeight
78        } );
79        portraitViewInit = portraitView;
80      }
81    }
82  }
83}
84
85
86/*** DROPDOWN FOR MOBILE MENU */
87var callback_mobile_dropdown = function () {
88
89	var navLi = jQuery('#site-navigation li');
90
91    navLi.each(function(){
92        if ( jQuery(this).find('ul').length > 0 && !jQuery(this).hasClass('has_children') ){
93            jQuery(this).addClass('has_children');
94            jQuery(this).find('a').first().after('<p class="dropdownmenu"></p>');
95        }
96    });
97    jQuery('.dropdownmenu').click(function(){
98        if( jQuery(this).parent('li').hasClass('this-open') ){
99            jQuery(this).parent('li').removeClass('this-open');
100        }else{
101            jQuery(this).parent('li').addClass('this-open');
102        }
103    });
104
105    navLi.find('a').click(function(){
106    	jQuery('.navbar-toggle').addClass('collapsed');
107       	jQuery('.collapse').removeClass('in'); 
108    });
109
110};
111jQuery(document).ready(callback_mobile_dropdown);
112
113
114/* show/hide reCaptcha */
115jQuery(document).ready(function() {
116
117  var thisOpen = false;
118  jQuery('.contact-form .form-control').each(function(){
119    if ( (typeof jQuery(this).val() != 'undefined') && (jQuery(this).val().length > 0) ){
120      thisOpen = true;
121      jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
122      return false;
123    }
124  });
125  if ( thisOpen == false && (typeof jQuery('.contact-form textarea').val() != 'undefined') && (jQuery('.contact-form textarea').val().length > 0) ) {
126    thisOpen = true;
127    jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
128  }
129  jQuery('.contact-form input, .contact-form textarea').focus(function(){
130    if ( !jQuery('.zerif-g-recaptcha').hasClass('recaptcha-display') ) {
131        jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
132    }
133  });
134
135});
136
137/* Bootstrap Fix */
138if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
139	
140	var msViewportStyle = document.createElement('style')
141
142	msViewportStyle.appendChild(
143
144		document.createTextNode(
145
146			'@-ms-viewport{width:auto!important}'
147
148		)
149
150	)
151
152	document.querySelector('head').appendChild(msViewportStyle);
153
154}
155
156jQuery(document).ready(function() {
157	
158	/* PARALLAX */
159	var jQuerywindow = jQuery(window);
160
161	jQuery('div[data-type="background"], header[data-type="background"], section[data-type="background"]').each(function(){
162
163		var jQuerybgobj = jQuery(this);
164
165		jQuery(window).scroll(function() {
166
167			var yPos = -(jQuerywindow.scrollTop() / jQuerybgobj.data('speed'));
168
169			var coords = '50% '+ yPos + 'px';
170
171			jQuerybgobj.css({ 
172
173				backgroundPosition: coords 
174
175			});
176
177		});
178
179	});
180	
181});
182
183
184/*=================================
185===  SMOOTH SCROLL             ====
186=================================== */
187
188jQuery(document).ready(function(){
189  jQuery('#site-navigation a[href*=#]:not([href=#]), header.header a[href*=#]:not([href=#])').bind('click',function () {
190    var headerHeight;
191    var hash    = this.hash;
192    var idName  = hash.substring(1);    // get id name
193    var alink   = this;                 // this button pressed
194    // check if there is a section that had same id as the button pressed
195    if ( jQuery('section [id*=' + idName + ']').length > 0 && jQuery(window).width() >= 751 ){
196      jQuery('.current').removeClass('current');
197      jQuery(alink).parent('li').addClass('current');
198    }else{
199      jQuery('.current').removeClass('current');
200    }
201    if ( jQuery(window).width() >= 751 ) {
202      headerHeight = jQuery('#main-nav').height();
203    } else {
204      headerHeight = 0;
205    }
206    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
207      var target = jQuery(this.hash);
208      target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
209      if (target.length) {
210        jQuery('html,body').animate({
211          scrollTop: target.offset().top - headerHeight + 5
212        }, 1200);
213        return false;
214      }
215    }
216  });
217});
218
219jQuery(document).ready(function(){
220    var headerHeight;
221    jQuery('.current').removeClass('current');
222    jQuery('#site-navigation a[href$="' + window.location.hash + '"]').parent('li').addClass('current');
223    if ( jQuery(window).width() >= 751 ) {
224      headerHeight = jQuery('#main-nav').height();
225    } else {
226      headerHeight = 0;
227    }
228    if (location.pathname.replace(/^\//,'') == window.location.pathname.replace(/^\//,'') && location.hostname == window.location.hostname) {
229      var target = jQuery(window.location.hash);
230      if (target.length) {
231        jQuery('html,body').animate({
232          scrollTop: target.offset().top - headerHeight + 5
233        }, 1200);
234        return false;
235      }
236    }
237});
238
239/* TOP NAVIGATION MENU SELECTED ITEMS */
240function zerif_scrolled() {
241    
242      if ( jQuery(window).width() >= 751 ) {
243          var zerif_scrollTop = jQuery(window).scrollTop();       // cursor position
244          var headerHeight = jQuery('#main-nav').outerHeight();   // header height
245          var isInOneSection = 'no';                              // used for checking if the cursor is in one section or not
246          // for all sections check if the cursor is inside a section
247          jQuery("section").each( function() {
248            var thisID = '#' + jQuery(this).attr('id');           // section id
249            var zerif_offset = jQuery(this).offset().top;         // distance between top and our section
250            var thisHeight  = jQuery(this).outerHeight();         // section height
251            var thisBegin   = zerif_offset - headerHeight;                      // where the section begins
252            var thisEnd     = zerif_offset + thisHeight - headerHeight;         // where the section ends  
253            // if position of the cursor is inside of the this section
254            if ( zerif_scrollTop >= thisBegin && zerif_scrollTop <= thisEnd ) {
255              isInOneSection = 'yes';
256              jQuery('.current').removeClass('current');
257              jQuery('#site-navigation a[href$="' + thisID + '"]').parent('li').addClass('current');    // find the menu button with the same ID section
258              return false;
259            }
260            if (isInOneSection == 'no') {
261              jQuery('.current').removeClass('current');
262            }
263          });
264      }
265}
266jQuery(window).on('scroll',zerif_scrolled);
267
268
269
270jQuery(window).load(function() {
271	
272	/* SUBSCRIBE  */
273	jQuery("form :input").each(function(index, elem) {
274	
275		var eId = jQuery(elem).attr("class");
276	
277		if( (eId == "sib-email-area") || (eId == "sib-NAME-area") ) {
278		
279			var label = null;
280			if (eId && (label = jQuery(elem).parents("form").find("label."+eId)).length == 1) {
281				jQuery(elem).attr("placeholder", jQuery(label).html());
282				jQuery(label).remove();
283			}
284		}
285	});
286});	
287
288
289/* TOP NAVIGATION MENU SELECTED ITEMS */
290jQuery(window).scroll(function(){
291	
292	var zerif_scrollTop = jQuery(window).scrollTop();
293	var zerif_windowHeight = jQuery(window).height();
294	
295	jQuery("section").each( function() {
296		
297		var zerif_offset = jQuery(this).offset();
298		
299		if (zerif_scrollTop <= zerif_offset.top && (jQuery(this).height() + zerif_offset.top) < (zerif_scrollTop + zerif_windowHeight) ) {
300				
301			jQuery('ul.nav > li a').each( function() {
302				jQuery(this).removeClass('nav-active');
303			});
304			
305			var zerif_current_id_visible = jQuery(this).attr('id');
306			
307			jQuery('ul.nav > li a').each( function() {
308				if( jQuery(this).attr('href') ) {
309					if( jQuery(this).attr('href').indexOf(zerif_current_id_visible) >= 0 ) {
310						jQuery('ul.nav > li a').each( function() {
311							jQuery(this).removeClass('nav-active');
312						});
313						jQuery(this).addClass('nav-active');
314					}
315				}	
316				
317			});
318		}
319		
320	});
321
322});
323
324
325/* SETS THE HEIGHT OF THE HEADER */
326jQuery(window).load(function(){
327  setminHeightHeader();
328});
329jQuery(window).resize(function() {
330  setminHeightHeader();
331});
332function setminHeightHeader() {
333  if ( jQuery('#main-nav').css('min-height') != 75 || jQuery('.header').css('min-height') != 75 ) {
334    jQuery('#main-nav').css('min-height',75);
335    jQuery('.header').css('min-height',75);
336  }
337  if ( jQuery(window).width() > 750 ) {
338      var minHeight = parseInt( jQuery('#main-nav').height() );
339      jQuery('#main-nav').css('min-height',minHeight);
340      jQuery('.header').css('min-height',minHeight);
341  }
342}
343/* - */
344
345
346/* STICKY FOOTER */
347jQuery(window).load(function(){
348  fixFooterBottom();
349});
350jQuery(window).resize(function() {
351  fixFooterBottom();
352});
353
354function fixFooterBottom(){
355
356	var header      = jQuery('header.header');
357	var footer      = jQuery('footer#footer');
358	var content     = jQuery('.site-content > .container');
359
360	content.css('min-height', '1px');
361
362	var headerHeight  = header.outerHeight();
363	var footerHeight  = footer.outerHeight();
364	var contentHeight = content.outerHeight();
365	var windowHeight  = jQuery(window).height();
366
367	var totalHeight = headerHeight + footerHeight + contentHeight;
368
369	if (totalHeight<windowHeight){
370	  content.css('min-height', windowHeight - headerHeight - footerHeight );
371	}else{
372	  content.css('min-height','1px');
373	}
374}
375
376
377/*** CENTERED MENU */
378var callback_menu_align = function () {
379
380	var headerWrap 		= jQuery('.header');
381	var navWrap 		= jQuery('#site-navigation');
382	var logoWrap 		= jQuery('.responsive-logo');
383	var containerWrap 	= jQuery('.container');
384	var classToAdd		= 'menu-align-center';
385
386	if ( headerWrap.hasClass(classToAdd) ) 
387	{
388        headerWrap.removeClass(classToAdd);
389	}
390    var logoWidth 		= logoWrap.outerWidth();
391    var menuWidth 		= navWrap.outerWidth();
392    var containerWidth 	= containerWrap.width();
393
394    if ( menuWidth + logoWidth > containerWidth ) {
395        headerWrap.addClass(classToAdd);
396    }
397    else
398    {
399        if ( headerWrap.hasClass(classToAdd) )
400        {
401            headerWrap.removeClass(classToAdd);
402        }
403    }
404}
405jQuery(window).load(callback_menu_align);
406jQuery(window).resize(callback_menu_align);
407
408var isMobile = {
409    Android: function() {
410        return navigator.userAgent.match(/Android/i);
411    },
412    BlackBerry: function() {
413        return navigator.userAgent.match(/BlackBerry/i);
414    },
415    iOS: function() {
416        return navigator.userAgent.match(/iPhone|iPad|iPod/i);
417    },
418    Opera: function() {
419        return navigator.userAgent.match(/Opera Mini/i);
420    },
421    Windows: function() {
422        return navigator.userAgent.match(/IEMobile/i);
423    },
424    any: function() {
425        return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
426    }
427};
428
429/* Rollover on mobile devices */
430if( isMobile.any() ) {
431
432  /* Our team section */
433    jQuery('.team-member').on('click', function(){
434        jQuery('.team-member-open').removeClass('team-member-open');
435        jQuery(this).addClass('team-member-open');
436        event.stopPropagation();
437    });    
438    jQuery("html").click(function() {
439      jQuery('.team-member-open').removeClass('team-member-open');
440  });
441  
442  /* Portfolio section */
443  jQuery(document).ready(function(){
444      jQuery('.cbp-rfgrid li').prepend('<p class="cbp-rfgrid-tr"></p>');
445  });
446    jQuery('.cbp-rfgrid li').on('click', function(){
447        if ( !jQuery(this).hasClass('cbp-rfgrid-open') ){
448            jQuery('.cbp-rfgrid-tr').css('display','block');
449            jQuery('.cbp-rfgrid-open').removeClass('cbp-rfgrid-open');
450            
451            jQuery(this).addClass('cbp-rfgrid-open');
452            jQuery(this).find('.cbp-rfgrid-tr').css('display','none');
453            event.stopPropagation();            
454        }
455    });
456    jQuery("html").click(function() {
457        jQuery('.cbp-rfgrid-tr').css('display','block');
458        jQuery('.cbp-rfgrid-open').removeClass('cbp-rfgrid-open');
459  });
460    
461}
462
463/* latest news */
464jQuery(window).load(function(){
465
466  if( jQuery( '#carousel-homepage-latestnews').length > 0 ) {
467    if( jQuery( '#carousel-homepage-latestnews div.item' ).length < 2 ) {
468      jQuery( '#carousel-homepage-latestnews > a' ).css('display','none');
469    }
470    var maxheight = 0;
471    jQuery( '#carousel-homepage-latestnews div.item' ).each(function(){
472      if( jQuery(this).height() > maxheight ) {
473        maxheight = jQuery(this).height();
474      }
475    });
476    jQuery( '#carousel-homepage-latestnews div.item' ).height(maxheight);
477  }
478
479});
480
481
482/* testimonial Masonry style */
483var window_width_old;
484var exist_class = false;
485jQuery(document).ready(function(){
486  if( jQuery('.testimonial-masonry').length>0 ){
487    exist_class = true;
488    window_width_old = jQuery('.container').outerWidth();
489    if( window_width_old < 970 ) {
490        jQuery('.testimonial-masonry').zerifgridpinterest({columns: 1,selector: '.zerif_testim'});
491    } else {
492        jQuery('.testimonial-masonry').zerifgridpinterest({columns: 3,selector: '.zerif_testim'});
493    }
494  }
495});
496
497jQuery(window).resize(function() {
498    if( window_width_old != jQuery('.container').outerWidth() && exist_class === true ){
499        window_width_old = jQuery('.container').outerWidth();
500        if( window_width_old < 970 ) {
501            jQuery('.testimonial-masonry').zerifgridpinterest({columns: 1,selector: '.zerif_testim'});
502        } else {
503            jQuery('.testimonial-masonry').zerifgridpinterest({columns: 3,selector: '.zerif_testim'});
504        }
505    }
506});
507
508
509(function ($, window, document, undefined) {
510    var defaults = {
511            columns:                3,
512            selector:               'div',
513            excludeParentClass:     '',
514        };
515    function ZerifGridPinterest(element, options) {
516        this.element    = element;
517        this.options    = $.extend({}, defaults, options);
518        this.defaults   = defaults;
519        this.init();
520    }
521    ZerifGridPinterest.prototype.init = function () {
522        var self            = this,
523            $container      = $(this.element);
524            $select_options = $(this.element).children();
525        self.make_magic( $container, $select_options );
526    };
527    ZerifGridPinterest.prototype.make_magic = function (container) {
528        var self            = this;
529            $container      = $(container),
530            columns_height  = [],
531            prefix          = 'zerif',
532            unique_class    = prefix + '_grid_' + self.make_unique();
533            local_class     = prefix + '_grid';
534        var classname;
535        var substr_index    = this.element.className.indexOf(prefix+'_grid_');
536        if( substr_index>-1 ) {
537            classname = this.element.className.substr( 0, this.element.className.length-unique_class.length-local_class.length );
538        } else {
539            classname = this.element.className;
540        }
541        var my_id;
542        if( this.element.id == '' ) {
543            my_id = prefix+'_id_' + self.make_unique();
544        } else {
545            my_id = this.element.id;
546        }
547        $container.after('<div id="' + my_id + '" class="' + classname + ' ' + local_class + ' ' + unique_class + '"></div>');
548        var i;
549        for(i=1; i<=this.options.columns; i++){
550            columns_height.push(0);
551            var first_cols = '';
552            var last_cols = '';
553            if( i%self.options.columns == 1 ) { first_cols = prefix + '_grid_first'; }
554            if( i%self.options.columns == 0 ) { first_cols = prefix + '_grid_last'; }
555            $('.'+unique_class).append('<div class="' + prefix + '_grid_col_' + this.options.columns +' ' + prefix + '_grid_column_' + i +' ' + first_cols + ' ' + last_cols + '"></div>');
556        }
557        if( this.element.className.indexOf(local_class)<0 ){
558            $container.children(this.options.selector).each(function(index){
559                var min = Math.min.apply(null,columns_height);
560                var this_index = columns_height.indexOf(min)+1;
561                $(this).attr(prefix+'grid-attr','this-'+index).appendTo('.'+unique_class +' .' + prefix + '_grid_column_'+this_index);
562                columns_height[this_index-1] = $('.'+unique_class +' .' + prefix + '_grid_column_'+this_index).height();
563            });
564        } else {
565            var no_boxes = $container.find(this.options.selector).length;
566            var i;
567            for( i=0; i<no_boxes; i++ ){
568                var min = Math.min.apply(null,columns_height);
569                var this_index = columns_height.indexOf(min)+1;
570                $('#'+this.element.id).find('['+prefix+'grid-attr="this-'+i+'"]').appendTo('.'+unique_class +' .' + prefix + '_grid_column_'+this_index);
571                columns_height[this_index-1] = $('.'+unique_class +' .' + prefix + '_grid_column_'+this_index).height();
572            }
573        }
574        $container.remove();
575    }
576    ZerifGridPinterest.prototype.make_unique = function () {
577        var text = "";
578        var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
579        for( var i=0; i<10; i++ )
580            text += possible.charAt(Math.floor(Math.random() * possible.length));
581        return text;
582    }
583    $.fn.zerifgridpinterest = function (options) {
584        return this.each(function () {
585            var value = '';
586            if (!$.data(this, value)) {
587                $.data(this, value, new ZerifGridPinterest(this, options) );
588            }
589        });
590    }
591})(jQuery);
592/* Header section */
593jQuery(window).load(zerif_parallax_effect);
594jQuery(window).resize(zerif_parallax_effect);
595
596function zerif_parallax_effect(){
597
598    if( jQuery('#parallax_move').length>0 ) {
599      var scene = document.getElementById('parallax_move');
600      var window_width = jQuery(window).outerWidth();
601      jQuery('#parallax_move').css({
602        'width':            window_width + 120,
603        'margin-left':      -60,
604        'margin-top':       -60,
605        'position':         'absolute',
606      });
607      var h = jQuery('header#home').outerHeight();
608      jQuery('#parallax_move').children().each(function(){
609        jQuery(this).css({
610            'height': h+100,
611        });
612      });
613      if( !isMobile.any() ) {
614        var parallax = new Parallax(scene);
615      } else {
616        jQuery('#parallax_move').css({
617          'z-index': '0',
618        });
619        jQuery('#parallax_move .layer').css({
620          'position': 'absolute',
621          'top': '0',
622          'left': '0',
623          'z-index': '1',
624        });
625      }
626    }
627
628}
629
630
631/* Menu levels */
632jQuery( document ).ready( function() {
633  jQuery( '#site-navigation' ).zerifsubmenuorientation();
634} );
635;(function ($, window) {
636    var defaults = {
637        // 'true'   -> if there is a big submenu all submenu will be aligned to the right
638        // 'false'  -> Only big submenu will be aligned to the right
639        allItems: false,
640      };
641    function ZerifSubmenuOrientation(element, options) {
642      this.element  = element;
643      this.options  = $.extend({}, defaults, options);
644      this.defaults = defaults;
645      this.init();
646    }
647    ZerifSubmenuOrientation.prototype.init = function () {
648      var self            = this,
649          $container      = $(this.element),
650          $select_options = $(this.element).children();
651      var resize_finish;
652      if( self.options.allItems !== true ) {
653        $(window).resize(function() {
654            clearTimeout(resize_finish);
655            resize_finish = setTimeout( function () {
656                self.make_magic($container, $select_options);
657            }, 11);
658        });
659      }
660      self.make_magic($container, $select_options);
661      if( self.options.allItems !== true ) {
662        setTimeout(function() {
663            $(window).resize();
664        }, 500);
665      }
666    };
667    ZerifSubmenuOrientation.prototype.make_magic = function (container, select_options) {
668      var self            = this,
669          $container      = $(container),
670          $select_options = $(select_options);
671      var itemWrap;
672      if( $container[0].tagName == 'UL' ) {
673        itemWrap = $container[0];
674      } else {
675        itemWrap = $container.find( 'ul' )[0];
676      }
677      var windowsWidth = window.innerWidth;
678      var itemId = '#' + itemWrap.id;
679      $( itemId ).children( 'li' ).each( function() {
680        if ( this.id == '' ) { return; }
681        var max_deep = self.max_deep( '#'+this.id );
682        var offsetLeft        = $( "#"+this.id ).offset().left;
683        var submenuWidthItem  = $( "#"+this.id ).find( 'ul' ).width();
684        var submenuTotalWidth = max_deep * submenuWidthItem;
685        if( submenuTotalWidth > 0 && windowsWidth < offsetLeft + submenuTotalWidth ) {
686          if( self.options.allItems === true ) {
687            $( '#'+itemWrap.id ).addClass( 'menu-item-open-left-all' );
688            return false;
689          }
690          $( '#'+this.id ).addClass( 'menu-item-open-left' );
691        } else if( $( '#'+this.id ).hasClass( 'menu-item-open-left' ) ) {
692          $( '#'+this.id ).removeClass( 'menu-item-open-left' );
693        }
694      } );
695    };
696    ZerifSubmenuOrientation.prototype.max_deep = function ( item ) {
697      var maxDepth      = -1, 
698          currentDepth  = -1;
699      $( item + " li:not(:has(ul))").each(function() {
700        currentDepth = $(this).parents("ul").length;
701        if (currentDepth > maxDepth) {
702           maxDepth = currentDepth;
703        }
704      });
705      return maxDepth - 1;
706    }
707    $.fn.zerifsubmenuorientation = function (options) {
708      return this.each(function () {
709        var value = '';
710          if (!$.data(this, value)) {
711              $.data(this, value, new ZerifSubmenuOrientation(this, options) );
712          }
713      });
714    }
715})(jQuery,window);

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.