PageSourceSearch

https://wetnotes.eu/files/cto_layout/scripts/scripts.js

js wetnotes.eu collected 2026-10-08 17:01:14 UTC 26,491 bytes, 873 lines download raw bytes

1/* =============================================================================
2 * Mobile view
3 * ========================================================================== */
4jQuery(document).ready(function() 
5{	
6	if (jQuery('body').hasClass('mobile'))
7	{
8		// set body class
9		jQuery('body').addClass('viewport_mobile');
10		// fire event
11		jQuery(document).trigger('Eclipse.viewport_mobile',{});
12	}
13});
14
15
16/* =============================================================================
17 * IOS workaround for wrong position bug under IOS11,12
18 * ========================================================================== */
19jQuery(document).ready(function() 
20{
21	if( jQuery('body').hasClass('ios') )
22	{
23		jQuery("html, body").animate({scrollTop: 0});
24	} 
25});
26
27
28/* =============================================================================
29 * Universal optin loader
30 * ========================================================================== */
31function Eclipse_optin(strElementType)
32{
33	if(strElementType == undefined || strElementType == '')
34	{
35		return;
36	}
37	// user settings not applied yet
38	if(localStorage.getItem('user_privacy_settings') == undefined || localStorage.getItem('user_privacy_settings') == '' || localStorage.getItem('user_privacy_settings') <= 0)
39	{
40		return
41	}
42
43	// find all scripts having a data-src attribute
44	var targets = jQuery(strElementType+'[data-src]');	
45	
46	if(targets.length > 0)
47	{
48		jQuery.each(targets,function(i,e)
49		{
50			var privacy = jQuery(e).data('privacy');
51			if(privacy == undefined)
52			{
53				privacy = 0;
54			}
55			
56			var attr = 'src';
57			if(strElementType == 'link')
58			{
59				attr = 'href';
60			}
61			else if(strElementType == 'object')
62			{
63				attr = 'data';
64			}
65			
66			if(localStorage.getItem('user_privacy_settings') >= privacy)
67			{
68				jQuery(e).attr(attr,jQuery(e).data('src') );
69			}
70		});
71	}
72}
73
74jQuery(document).ready(function() 
75{
76	Eclipse_optin('script');
77	Eclipse_optin('link');
78	Eclipse_optin('iframe');
79	Eclipse_optin('object');
80	Eclipse_optin('img');
81});
82
83// listen to Eclipse.user_privacy Event
84jQuery(document).on('Eclipse.user_privacy',function(event,params)
85{
86	Eclipse_optin('script');
87	Eclipse_optin('link');
88	Eclipse_optin('iframe');
89	Eclipse_optin('object');
90	Eclipse_optin('img');
91});
92
93
94/* =============================================================================
95 * Eclipse_setPrivacy(intLevel)
96 * @param integer	Level of privacy
97 * ========================================================================== */
98function Eclipse_setPrivacy(intLevel)
99{
100	// set local storage
101	localStorage.setItem('user_privacy_settings',intLevel);
102	// set cookie for php
103	jQuery.cookie('user_privacy_settings',intLevel,{expires:30,path:'/'});
104	// fire event
105	jQuery(document).trigger('Eclipse.user_privacy',{'level':intLevel});
106}
107
108
109/* =============================================================================
110 * Eclipse_clearPrivacy(blnReload)
111 * @param boolean	Reload page true/false
112 * ========================================================================== */
113function Eclipse_clearPrivacy(blnReload)
114{
115	if(blnReload == undefined || blnReload == null)
116	{
117		blnReload = true;
118	}
119	
120	// clear local storage
121	localStorage.removeItem('user_privacy_settings');
122	// empty cookie
123	jQuery.removeCookie('user_privacy_settings',{path:'/'});
124	// fire event
125	jQuery(document).trigger('Eclipse.clear_privacy_settings',{});
126	
127	// reload page
128	if(blnReload)
129	{
130		location.reload();
131	}
132}
133
134
135/* =============================================================================
136 * Cookie atombomb
137 * Clear all cookies when user clears the privacy
138 * ========================================================================== */
139jQuery(document).on('Eclipse.clear_privacy_settings', function (event)
140{ 
141	for (var i in jQuery.cookie()) 
142	{
143		jQuery.removeCookie(i);
144	}
145});
146
147
148/* =============================================================================
149 * mainmenu menuheader (deactivate link)
150 * ========================================================================== */
151jQuery(document).ready(function(){
152	jQuery('.mainmenu .menuheader').removeAttr("href");
153});
154
155/* =============================================================================
156 * mainmenu avoid_click
157 * ========================================================================== */
158jQuery(document).ready(function(){
159	jQuery('.mainmenu a.avoid_click, .smartmenu-content a.avoid_click, #mobnav a.avoid_click').attr("href","javascript:void(0);");
160	jQuery('.mainmenu a.avoid-click, .smartmenu-content a.avoid-click, #mobnav a.avoid-click').attr("href","javascript:void(0);");
161});
162
163/* =============================================================================
164 * ce_parallax scripts/parallax/
165 * ========================================================================== */
166jQuery(document).ready(function ()
167{
168	if ( !jQuery('body').hasClass('ios') && typeof jQuery(window).stellar == 'function')
169	{
170		jQuery(window).stellar({ horizontalScrolling: false, responsive: true });
171	}
172});
173
174/* =============================================================================
175 * ce_table responsive 
176 * ========================================================================== */
177function respTables() {
178	jQuery('.ce_table').each(function() {
179	 	var tableWidth = jQuery(this).find('table').width();
180	 	var ce_tableWidth = jQuery(this).width();
181	 	if (tableWidth > ce_tableWidth) {
182		 	jQuery(this).addClass('overflow');
183	 	} else {
184		 	jQuery(this).removeClass('overflow');
185	 	}
186	});	
187};
188
189jQuery(document).ready(function(){
190	respTables();
191});
192
193jQuery(window).on("resize", function(){ 
194	respTables(); 
195});
196
197/* =============================================================================
198 * css3 animation (css/animate.css)
199 * ========================================================================== */
200var el = jQuery("body");
201var animationClasses = ["fadeIn", "zoomIn", "fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInUpBig","rotateIn","zoomIn","slideInDown","slideInLeft","slideInRight","slideInUp","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp"];
202jQuery.each(animationClasses, function(key, value){
203	el.find("." + value).each(function(){
204		jQuery(this).removeClass(value).attr("data-animate", value);
205		
206	});
207});
208	
209jQuery(document).ready(function ()
210{
211	var animate_start = function (element)
212	{
213		element.find('.animate').not('.nowaypoint').each(function () {
214			var item = jQuery(this);
215		    var animation = item.data("animate");
216		    if(jQuery('body').hasClass('ios') || jQuery('body').hasClass('android')) {
217		    	item.removeClass('animate');
218		    	return true;
219		    	
220		    } else {
221				var waypoint = new Waypoint(
222				{
223					element: item,
224					offset: '90%',
225					handler: function(direction)
226					{
227						item.removeClass('animate').addClass('animated '+animation).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
228							item.removeClass(animation+' animated');
229						});
230						// remove waypoint when triggered once
231						this.destroy();
232					}
233				});
234	        }
235		});
236	};
237	
238	setTimeout(function() {
239		jQuery('.mod_article').each(function() {
240	        animate_start( jQuery(this) );
241	    });
242	},500);
243	
244});
245
246/* =============================================================================
247 * ce_youtube_background (scripts/jquery.mb.YTPlayer/)
248 * ========================================================================== */
249jQuery(document).ready(function() {
250	if(!jQuery('body').hasClass('mobile')) {
251		jQuery(".player").mb_YTPlayer();
252	}
253});
254
255/* =============================================================================
256 * scrollToTop
257 * ========================================================================== */
258jQuery(document).ready(function(){
259	jQuery('a.totop').click(function(e){
260    	e.preventDefault();
261    	jQuery("html, body").animate({scrollTop: jQuery('#contentwrapper').offset().top - 100}, 500);
262	});
263});
264
265/* =============================================================================
266 * #slider min-height
267 * ========================================================================== */
268jQuery(document).ready(setMinHeightToSliderSection);
269jQuery(window).resize(setMinHeightToSliderSection);
270function setMinHeightToSliderSection()
271{
272	if( jQuery('#fix-wrapper').css('position') == 'absolute' )
273	{
274		jQuery('#slider.empty').css('min-height', jQuery('#fix-wrapper').height());
275	}
276	else
277	{
278		jQuery('#slider.empty').css('min-height', '');
279	}
280}
281
282/* =============================================================================
283 * Fixed-header body class
284 * ========================================================================== */
285
286function headerFixed() {
287	var topHeight = jQuery("#top-wrapper").outerHeight();
288	if(topHeight == jQuery(window).innerHeight())
289	{
290		topHeight = jQuery(window).innerHeight() / 3;
291	}
292	
293	if (jQuery(this).scrollTop() > topHeight) {
294		jQuery("body").addClass("fixed-header");
295		
296	} else {
297		jQuery("body").removeClass("fixed-header");
298    }
299};
300	
301jQuery(document).ready(function(){ 
302	headerFixed();
303});
304
305jQuery(window).scroll(function() {
306	headerFixed();
307});
308
309/* =============================================================================
310 * generate smartmenu on onepage_page
311 * ========================================================================== */
312jQuery(document).ready(function ()
313{	
314	if (jQuery('body').hasClass('onepage_page'))
315	{	
316		// delete menu of smartmenu
317		jQuery('.smartmenu-content ul.level_1').remove();
318			
319		// clone level_1 from mainmenu to empty smartmenu
320		jQuery('.smartmenu-content .smartmenu-table').append(jQuery(".header.original nav.mainmenu.desktop ul.level_1").clone().removeClass("mainmenu"));
321	}
322});	
323
324/* =============================================================================
325 * smartmenu
326 * ========================================================================== */
327jQuery(document).ready(function(){ 
328
329	jQuery('.smartmenu-trigger').click(function(e){
330		jQuery('.smartmenu-content').addClass('open');
331		jQuery('.smartmenu').addClass('open');
332		jQuery('body').addClass('no_scroll');
333	});
334	
335	jQuery('.smartmenu-content .smartmenu-close').click(function(e){
336		jQuery('.smartmenu-content').removeClass('open');
337		jQuery('.smartmenu').removeClass('open');
338		jQuery('body').removeClass('no_scroll');
339	});
340	
341	jQuery('.smartmenu-content a:not(.submenu)').click(function(e){
342		// is not new window
343		if(jQuery(e.target).attr('target') != '_blank')
344		{
345			jQuery('.smartmenu-content').removeClass('open');
346			jQuery('body').removeClass('no_scroll');
347		}
348	});
349	
350	// open trail content on page load
351	jQuery('.smartmenu-content').find('.trail').addClass('open');
352	jQuery('.smartmenu-content').find('.trail > ul').show();
353});
354
355jQuery(document).ready(function(){ 
356	
357	jQuery('.smartmenu-content .subitems_trigger').on('click', function(){
358		var element = jQuery(this).parent('li');
359		if (element.hasClass('open')) {
360			element.removeClass('open');
361			element.find('li').removeClass('open');
362			element.find('ul').slideUp();
363		}
364		else {
365			element.addClass('open');
366			element.children('ul').slideDown();
367			element.siblings('li').children('ul').slideUp();
368			element.siblings('li').removeClass('open');
369			element.siblings('li').find('li').removeClass('open');
370			element.siblings('li').find('ul').slideUp();
371		}
372	});
373	
374});
375
376/* =============================================================================
377 * mmenu
378 * ========================================================================== */
379jQuery(document).ready(function(){ 
380	jQuery('.mmenu_trigger, .mmenu_overlay').click(function()
381	{
382		jQuery('body').toggleClass('mmenu_open');
383		jQuery('body').toggleClass('no_scroll');
384		jQuery('.burger').toggleClass('open');
385		jQuery('.mmenu_overlay').fadeToggle('slow');
386	});
387});
388
389jQuery(document).keyup(function(e) {
390  if (e.keyCode == 27 && jQuery('body').hasClass('mmenu_open')) 
391  {
392	  jQuery('.burger').removeClass('open');
393	  jQuery('body').removeClass('mmenu_open');
394	  jQuery('body').removeClass('no_scroll');
395	  jQuery('.mmenu_overlay').fadeToggle('slow');
396  }
397});
398
399
400/* =============================================================================
401 * megamenu
402 * ========================================================================== */
403jQuery(document).ready(function(){
404	jQuery('.mainmenu li.megamenu .level_2').wrap('<div class="megamenu-wrapper"></div>');
405	jQuery('li.megamenu.remove-link a.a-level_2').removeAttr("href");
406});
407	
408function megamenuWidth() {
409	var elWidth = jQuery(".header .inside").width();
410	jQuery(".header .mainmenu ul .megamenu-wrapper").css('width', elWidth);
411};
412	
413jQuery(window).on("resize", function(){ 
414	megamenuWidth(); 
415});
416
417jQuery(document).ready(function(){ 
418	megamenuWidth();
419});
420
421/* =============================================================================
422 * doubleTapToGo scripts/doubletaptogo/
423 * ========================================================================== */
424jQuery(document).ready(function(){
425	if(jQuery('body').hasClass('android') || jQuery('body').hasClass('win') || jQuery('body').hasClass('ios') || jQuery('body').hasClass('viewport_tablet')){
426		jQuery('nav.mainmenu li.submenu:not(.level_2 .megamenu)').doubleTapToGo();
427		jQuery('.smartmenu li.submenu').doubleTapToGo();
428		jQuery('.top_metanavi li.submenu').doubleTapToGo();
429		jQuery('.header_metanavi li.submenu').doubleTapToGo();
430		jQuery('.mod_langswitcher li').doubleTapToGo();
431		
432		jQuery.each(jQuery('.mod_langswitcher li a'),function(i,elem)
433		{
434			jQuery(elem).click(function(e) { e.preventDefault(); window.location.href = jQuery(this).attr('href'); });
435		});
436	}
437});
438
439/* =============================================================================
440 * Add no-scroll class to body when lightbox opens
441 * ========================================================================== */
442jQuery(document).bind('cbox_open',function() {
443	jQuery('body').addClass('no_scroll');
444});
445
446jQuery(document).bind('cbox_closed',function() {
447	jQuery('body').removeClass('no_scroll');
448});
449
450/* =============================================================================
451 * remove class mainmenu in offcanvas menu
452 * ========================================================================== */
453jQuery(document).ready(function(){ 
454	jQuery('.mm-menu').removeClass('mainmenu');
455});
456
457/* =============================================================================
458 * offcanvas-top
459 * ========================================================================== */
460jQuery(document).ready(function(){ 
461	jQuery('.offcanvas-trigger').click(function(){
462		jQuery('#offcanvas-top').toggleClass('offcanvas-top-open');
463		jQuery('.offcanvas-trigger').toggleClass('offcanvas-top-open');
464	});
465});
466
467
468/* =============================================================================
469 * one-page-nav
470 * ========================================================================== */
471
472/**
473 * Add an item counter class to the body on one_page sites
474 */
475jQuery(document).ready(function() 
476{
477	if(jQuery('body').hasClass('onepage_page'))
478	{
479		// count articles in #slider
480		jQuery('body').addClass( 'onepage_items_' + jQuery('#slider .inside > .mod_article').length );
481	}
482});
483
484/**
485 * Initialize smooth scrolling to one page anchor links	
486 */
487jQuery(document).ready(function() {
488	
489	if(jQuery('body').hasClass('is_regular_page'))
490	{
491		jQuery('.smartmenu-content a').addClass('backlink');
492		jQuery('.onepage_page a').addClass('backlink');
493	}
494
495	// remove onepage cookies for body class "to_top"
496	if (jQuery('body').hasClass('to_top'))
497	{
498		jQuery.removeCookie('onepage_active');
499		jQuery.removeCookie('onepage_position');
500		jQuery.removeCookie('onepage_animate');
501	}
502	
503	var stickyheader = jQuery(".stickyheader");
504	var header = jQuery(".header.original");
505	var lastActive = null;
506	var links = jQuery(".onepage_page .mainmenu a:not(.backlink), .onepage_page .onepagenav a:not(.backlink), .page_navigation a:not(.backlink), .smartmenu-content a:not(.backlink)");
507	var horizontalScroll = jQuery('body').hasClass('horizontal_scrolling');
508	// not on mobile devices because content is 100% 
509	if(horizontalScroll && jQuery('body').hasClass('mobile'))
510	{
511		horizontalScroll = false;
512	}
513	
514	var duration = 300;
515	var timeout = 200;
516	
517	// jump to hashtag anchor in url
518	var strHash = window.location.hash.toString();
519	if(strHash.length > 0)
520	{
521		var target = jQuery(strHash);
522		if( target.length > 0 )
523		{
524			jQuery(strHash+' a').addClass('active');
525			
526			lastActive = jQuery(".onepagenav a:not(.backlink)[href*=\\"+strHash+"]");
527			lastActive.addClass('active');
528			
529			var offsetX = 0;
530			var posX = target.offset().left - offsetX;
531			
532			var offsetY = stickyheader.height();
533			var posY = target.offset().top - offsetY;
534			
535			jQuery("html, body").animate({scrollTop: posY, scrollLeft:posX},
536			{
537				start		: function()
538				{
539					jQuery.cookie('onepage_animate',1);
540				},
541				complete	: function()
542				{
543					setTimeout(function()
544					{
545						jQuery.cookie('onepage_animate',0);
546					}, timeout);
547				}
548			}, 0);
549		}
550	}
551	
552	// set the last anchor to active on page load and scroll to it
553	if(jQuery.cookie('onepage_active') !== null && jQuery.cookie('onepage_active') != undefined && strHash.length < 1) 
554	{
555		jQuery.each(links, function(index, elem) {
556			var hash = this.href.split("#");
557			if(!hash[1])
558			{
559				return;
560			}
561			var anchor = hash[1].toString();
562			if(anchor == jQuery.cookie('onepage_active'))
563			{
564				jQuery(elem).addClass('active');
565				lastActive = jQuery(elem);
566			}
567		});
568		
569		// find target in page
570		var target = jQuery("#"+jQuery.cookie('onepage_active'));
571		if (target.length > 0)
572		{
573			var offsetX = 0;
574			var posX = target.offset().left - offsetX;
575			
576			var offsetY = stickyheader.height();
577			var posY = target.offset().top - offsetY;
578			
579			jQuery("html,body").stop().animate({scrollTop: posY, scrollLeft: posX}, {
580				duration	: 0,
581				start		: function()
582				{
583					// on start: flag that onepage started its animation
584					jQuery.cookie('onepage_animate',1);
585				},
586				complete	: function()
587				{
588					setTimeout(function()
589					{
590						jQuery.cookie('onepage_animate',0);
591						jQuery.cookie('onepage_position',null);
592					}, timeout);
593				}
594			});
595		}
596	}
597		
598	// click event listener	
599	links.click(function(event) 
600	{ 
601		var hash = this.href.split("#");
602		if(!hash[1])
603		{
604			return true;
605		}
606		var anchor = hash[1].toString();
607		var target = jQuery("#"+anchor);
608		if(target.length < 1) 
609		{
610			return false;
611		}
612		
613		// store the current active anchor as cookie for further use
614		jQuery.cookie('onepage_active',anchor);
615		
616		var offsetX = 0;
617		var posX = target.offset().left - offsetX;
618		
619		var offsetY = stickyheader.height();
620		var posY = target.offset().top - offsetY;
621		
622		jQuery("html,body").stop().animate({scrollTop: posY, scrollLeft: posX}, 
623		{
624			duration	: duration,
625			start		: function()
626			{
627				jQuery.cookie('onepage_animate',1);
628			},
629			step		: function()
630			{
631				// on start: flag that onepage started its animation
632				jQuery.cookie('onepage_animate',1);
633			},
634			complete	: function()
635			{
636				// on complete: remove the flag
637				setTimeout(function()
638				{
639					jQuery.cookie('onepage_animate',0);
640				}, timeout);
641				
642				// store last position
643				jQuery.cookie('onepage_position',{'x':posX,'y':posY,'anchor':anchor});
644			}
645		});
646		
647		// toggle active class
648		if(lastActive != jQuery(this)) 
649		{
650			links.removeClass('active');
651			
652			jQuery(".onepagenav a[href*="+anchor+"]").addClass('active');
653			jQuery(".mainmenu a[href*="+anchor+"]").addClass('active');
654			
655			jQuery(this).addClass('active');
656		}
657		
658		event.preventDefault();
659		return false;
660	});	
661});
662
663
664/**
665 * Set navi active on scroll
666 */
667jQuery(document).ready(function() {
668	var links = jQuery(".onepage_page .mainmenu a:not(.backlink), .onepage_page .onepagenav a:not(.backlink), .page_navigation a");
669	var stickyheader = jQuery(".stickyheader");
670	var header = jQuery(".header.original");
671	var lastActive = jQuery(".onepage_page .mainmenu a.active, .onepage_page .onepagenav a.active");
672	var horizontalScroll = jQuery('body').hasClass('horizontal_scrolling');
673	// not on mobile devices because content is 100% 
674	if(horizontalScroll && jQuery('body').hasClass('mobile'))
675	{
676		horizontalScroll = false;
677	}
678	
679	var lastScrollX = 0;
680	var lastScrollY = 0;
681	
682	jQuery(window).scroll(function() 
683	{
684		// escape when animation is running
685		if(jQuery.cookie('onepage_animate') > 0) 
686		{
687			return;
688		}
689		
690		// remove active class from all links
691		links.removeClass('active');
692		
693		var scrollX = jQuery(window).scrollLeft();
694		var scrollY = jQuery(window).scrollTop();
695		var offsetX = 10;
696		var offsetY = stickyheader.height();
697		
698		jQuery.each(links, function(index, elem) 
699		{
700			var hash = elem.href.split("#");
701			if(!hash[1]) 
702			{
703				return;
704			}
705			var anchor = hash[1].toString();
706			var target = jQuery("#"+anchor);
707			if(target.length < 1) 
708			{
709				return;
710			}
711			
712			// vertical scrolling
713			var posY = target.offset().top - offsetY;
714			var sizeY = posY + target.height();
715			if (posY <= scrollY && sizeY >= scrollY && !horizontalScroll) 
716			{
717	        	jQuery(elem).addClass("active");
718	        }
719	        
720	        // horizontal scolling
721	        var posX = target.offset().left - offsetX;
722			var sizeX = posX + target.width();
723			if (posX <= scrollX && sizeX >= scrollX && horizontalScroll) 
724			{
725	        	jQuery(elem).addClass("active");
726	        }
727	    });
728	});
729	
730});
731
732/* =============================================================================
733 * imagebox workaround if content height > fix height
734 * ========================================================================== */
735function imageboxHeight() {
736	jQuery(".ce_text_imagebox").each(function() {
737		var fixHeight = jQuery(this).height();
738		var contentHeight = jQuery(this).find(".inside").outerHeight();
739		if (contentHeight > fixHeight) {
740			jQuery(this).addClass("oversize");
741		} else {
742			jQuery(this).removeClass("oversize");
743		}
744	});
745};
746
747jQuery(document).ready(function(){
748	imageboxHeight();
749});
750
751jQuery(window).on("resize", function(){ 
752	imageboxHeight(); 
753});
754
755/* =============================================================================
756 * ce_text_image_bar workaround if content height > fix height
757 * ========================================================================== */
758function imagebarHeight() {
759	jQuery(".ce_text_image_bar").each(function() {
760		var fixHeight = jQuery(this).height();
761		var contentHeight = jQuery(this).find(".text-table").outerHeight();
762		if (contentHeight > fixHeight) {
763			jQuery(this).addClass("oversize");
764		} else {
765			jQuery(this).removeClass("oversize");
766		}
767	});
768};
769
770jQuery(document).ready(function(){
771	imagebarHeight();
772});
773
774jQuery(window).on("resize", function(){ 
775	imagebarHeight(); 
776});
777
778/* =============================================================================
779 * search top trigger
780 * ========================================================================== */
781jQuery(document).ready(function(){
782	jQuery(".ce_search_label").click(function(){
783    	jQuery(".body_bottom .mod_search").addClass("show-search");
784	});
785	jQuery(".body_bottom .close-window").click(function(){
786    	jQuery(".body_bottom .mod_search").removeClass("show-search");
787	});
788});
789
790/* =============================================================================
791 * scroll to anchors
792 * ========================================================================== */
793jQuery(document).ready(function()
794{
795    jQuery('#main a[href*=\\#], #left a[href*=\\#], #right a[href*=\\#], #slider a[href*=\\#], #footer a[href*=\\#], #bottom a[href*=\\#]').click(function(e)
796	{
797		// return with default behavior
798		if( jQuery(this).hasClass('external-anchor') || jQuery(this).hasClass('not-anchor') )
799		{
800			return true;
801		}
802		
803    	var target = jQuery('#'+jQuery(this).attr("href").split('#')[1]);
804		if(target == undefined || target == null)
805        {
806            return true;    
807        }
808        else if(target.length < 1)
809        {
810	        return true;
811        }
812        
813        e.preventDefault();
814        
815        var stickheaderHeight = 0;
816		if(jQuery('#stickyheader'))
817		{
818			stickheaderHeight = jQuery('#stickyheader').height();
819        }
820		
821        jQuery("html, body").animate({scrollTop: target.offset().top - stickheaderHeight}, 500);
822        return false;
823    });
824});
825
826
827/* =============================================================================
828 * force page to start on top "to_top"
829 * ========================================================================== */
830jQuery(document).ready(function ()
831{
832	if (jQuery('body').hasClass('to_top') )
833	{
834		document.body.scrollTop = 0;
835 		document.documentElement.scrollTop = 0;
836		jQuery('html,body').animate({ scrollTop: 0 });
837		// force browsers like chrome to reset last remembered scroll position
838		window.onload = function ()
839		{
840			setTimeout(function(){ scrollTo(0,-1); },0);
841		}
842	}
843});
844
845/* =============================================================================
846 * Viewport pixel
847 * ========================================================================== */
848jQuery(window).on('load resize', function () 
849{	
850	if (jQuery('#viewport-pixel').length < 1 || jQuery('#viewport-pixel') == undefined)
851	{
852		return;
853	}
854
855	var val = jQuery('#viewport-pixel').css('opacity');
856	
857	// remove old class
858	jQuery('body').removeClass('viewport_desktop viewport_tablet viewport_mobile');
859
860	// tablet
861	if (val > 0.75)
862	{
863		jQuery('body').addClass('viewport_desktop');
864	}
865	else if (val <= 0.75 && val > 0.5)
866	{
867		jQuery('body').addClass('viewport_tablet');
868	}
869	else if (val <= 0.5)
870	{
871		jQuery('body').addClass('viewport_mobile');
872	}
873});

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.