PageSourceSearch

https://tg-parkstein.de/templates/weizerr/template.js??rs=1791408441

js tg-parkstein.de collected 2026-10-07 21:27:44 UTC 4,215 bytes, 156 lines download raw bytes

1var scrollTopNow = -1;
2var cwidth = document.body.clientWidth;
3
4$( document ).ready(function() {
5	initmobilemenu();
6	
7	 $( "#nav a" ).focus(function() {
8		$( "#nav li.menu-expand" ).removeClass('tabselected');
9		$(this).parents('li.menu-expand').addClass('tabselected');
10	});
11	//delete_cookie_permission()
12	check_cookie_permission ();
13	checkscrolled();
14	
15})
16
17$(window).scroll(function() {    
18    var scrol = $(window).scrollTop();
19	var pos = $('#ContentWrapper').offset().top; 
20	var ofy = pos - scrol;
21	//console.log('pos '+ofy+ 'px');
22
23    if (ofy < 0) {
24        $("body").addClass("reduced");
25    } else {
26        $("body").removeClass("reduced");
27    }
28});
29
30
31function checkscrolled() {
32	if (cwidth < 601) {return false; } //no parallax on small screens
33	
34	var scrollTop = $(window).scrollTop();
35	if (scrollTop != scrollTopNow && scrollTop < 1000) {
36		scrollTopNow = scrollTop;
37		p = ( 0.5 * scrollTop );// + $('#topmenubox').height() - 20;
38		//console.log('center '+p+ 'px');
39		//document.getElementById("topparallax").style.backgroundPosition = 'center '+p+'px';	
40	}
41	temp = setTimeout('checkscrolled()',20);	
42}
43
44
45//-------------------------------------------------------------
46
47function showloginbox() {
48	var url = TEMPLATE_DIR+'/inc/login.load.php';
49	var redirect_url = window.location.href;
50	
51	if(document.getElementById("login-box").style.display == 'none') {	
52		$( "#login-box" ).load(url, function() {
53			$('#redirect_url').val(redirect_url);			
54			document.getElementById("login-box").style.display = 'block';
55		});	
56	} else {
57		document.getElementById("login-box").style.display = 'none';
58	}			
59}
60
61
62//-------------------------------------------------------------
63
64
65
66function gototop() {
67	$('html, body').animate({ scrollTop: ($('body').offset().top)}, 'slow');
68}
69function goto(theid) {
70	$('html, body').animate({ scrollTop: ($('#'+theid).offset().top)}, 'slow');
71}
72
73
74
75//Mobile Menu
76
77//var ua = navigator.userAgent; event = (ua.match(/iPad/i)) ? "touchstart" : "click";
78
79
80$( document ).ready(function() {
81	$(".toggleMobileMenu").click(function(e) {
82		e.preventDefault();
83		if ( $('body').hasClass('mobilemenuopen') ) {
84			$('body').removeClass('mobilemenuopen');
85		} else {
86			$('body').addClass('mobilemenuopen');
87			var sc = $(window).scrollTop();
88			document.getElementById("nav2").style.top = (sc + 100) + 'px';	
89			initmobilemenu();
90		}
91	});
92	
93	
94	$(window).bind('resize orientationchange', function() {
95		cwidth = document.body.clientWidth;
96		if ( $('#nav2').hasClass('mobilemenuopen') ) { initmobilemenu(); }
97	});
98		
99});
100
101
102function initmobilemenu() {
103	cwidth = document.body.clientWidth;;
104	if (cwidth < 1200) {
105		document.getElementById("nav2").innerHTML = document.getElementById("nav").innerHTML;
106		$("#nav2 li a.menu-expand").unbind('click').bind('click', function(e) {			
107			
108			if ($(this).parent("li").hasClass("is_opened") ) {return true;} //wenn schon geklickt worden, also:class is_opened link ausf hren
109			
110			e.preventDefault();
111			$(this).toggleClass("is_opened");
112			$(this).parent("li").toggleClass("is_opened");
113			//$(this).parent("li").find( "ul:first" ).show( "slow");
114			return false;
115			
116		});
117	} 	
118}
119
120
121
122/*======================================================
123Cookie Permission
124======================================================*/
125function check_cookie_permission () {
126	if (typeof cookie_permission_url == 'undefined' || cookie_permission_url == '') {
127		return;
128	}
129
130	if (localStorage['cookie_permission'] && localStorage['cookie_permission'] == 'accepted') {
131		//OK, do nothing
132	} else {
133		$( "body" ).append('<div id="cookie_permission"></div>');
134		$( "#cookie_permission" ).load(cookie_permission_url, function() {
135			$( "#cookie_permission" ).addClass('visible');
136		});
137	
138	}
139}
140
141function accept_cookie_permission() {
142	localStorage.setItem('cookie_permission', 'accepted');
143	$('#cookie_permission').hide('500');
144}
145
146function delete_cookie_permission() {
147	localStorage.setItem('cookie_permission', '');
148}
149document.addEventListener('DOMContentLoaded', function () {
150    var buchung = document.querySelector('a.pid89.sm2-is-menulink');
151
152    if (buchung) {
153        buchung.setAttribute('target', '_blank');
154        buchung.setAttribute('rel', 'noopener noreferrer');
155    }
156});

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.