PageSourceSearch

https://weser-aktivhotel-corvey.de/wp-content/themes/hoteller/js/core/custom.js?ver=6.8.9

js weser-aktivhotel-corvey.de collected 2026-10-06 12:34:38 UTC 18,956 bytes, 611 lines download raw bytes

1function isReallyNaN(x) {
2  return x !== x;
3}
4
5jQuery(document).ready(function(){ 
6	"use strict";
7
8	jQuery(document).setNav();
9	
10	var moduloThumbnail = false;
11	if(jQuery('#tg_lightbox_thumbnails').val() == 'thumbnail')
12	{
13		moduloThumbnail = true;
14	}
15	
16	var lightboxTimer = jQuery('#tg_lightbox_timer').val();
17	
18	// create instance of ModuloBox
19	var mobx = '';
20	
21	mobx = new ModuloBox({
22		// options
23		mediaSelector : '.tg_gallery_lightbox, .woocommerce-product-gallery__image a',
24		scrollToZoom  : true,
25		controls : ['zoom', 'play', 'fullScreen', 'share', 'close'],
26		shareButtons  : ['facebook', 'googleplus', 'twitter', 'pinterest', 'linkedin'],
27		slideShowInterval : parseInt(lightboxTimer),
28		countTimer: true,
29		thumbnails: moduloThumbnail,
30		videoAutoPlay: true,
31		thumbnailSizes : {
32			1920 : {          // browser width in 'px'
33				width  : 110, // thumbnail width in 'px' - 0 in width will hide thumbnails
34				height : 80,  // thumbnail height in 'px' - 0 in height will hide thumbnails
35				gutter : 10   // gutter width in 'px' between thumbnails
36			},
37			1280 : {
38				width  : 90,
39				height : 65,
40				gutter : 10
41			},
42			680 : {
43				width  : 70,
44				height : 50,
45				gutter : 8
46			},
47			480 : {
48				width  : 60,
49				height : 44,
50				gutter : 5
51			}
52		}
53	});
54	
55	// initialize the instance	
56	mobx.init();
57	
58	jQuery(window).resize(function(){
59		//Resize main menu
60		jQuery(document).setNav();
61		
62		if(jQuery(this).width() < 768)
63		{
64			//Remove sticky sidebar for mobile & tablet devices
65			jQuery("#page_content_wrapper .sidebar_wrapper").trigger("sticky_kit:detach");
66		}
67		else
68		{
69			//Calculate wrapper padding top value
70			if(jQuery('#tg_header_content').val() == 'menu')
71			{
72				jQuery('#wrapper').css('paddingTop', parseInt(jQuery('.header_style_wrapper').height())+'px');
73			}
74			else
75			{
76				jQuery('#wrapper').css('paddingTop', parseInt(jQuery('#elementor_header').height())+'px');
77			}
78			
79			//Reset menu padding top and bottom
80			jQuery('#menu_wrapper div .nav > li > a').attr('style', '');
81			jQuery('#menu_wrapper div .nav > li > a').attr('style', '');
82		}
83		
84		//Calculate revolution slider height
85		if(jQuery('.page_slider.menu_transparent').find('.rev_slider_wrapper').length > 0)
86		{
87			var sliderHeight = jQuery('.page_slider.menu_transparent').find('.rev_slider_wrapper').height();
88			var topBarHeight = jQuery('.top_bar').height();
89			
90			if(jQuery('.above_top_bar').length > 0)
91			{
92				topBarHeight+= jQuery('.above_top_bar').height();
93			}
94			
95			if(jQuery('.page_slider.menu_transparent').find('.rev_slider_wrapper.fullscreen-container').length > 0)
96			{
97				var topBarHeight = 55;
98			}
99	
100			jQuery('.ppb_wrapper').css('marginTop', sliderHeight-topBarHeight+'px');
101			jQuery('#page_content_wrapper').css('marginTop', sliderHeight-topBarHeight+'px');
102		}
103	});
104	
105	jQuery('#menu_expand_wrapper a').on( 'click', function(){
106		jQuery('#menu_wrapper').fadeIn();
107		jQuery('#custom_logo').animate({'left': '15px', 'opacity': 1}, 400);
108		jQuery('#menu_close').animate({'left': '-10px', 'opacity': 1}, 400);
109		jQuery(this).animate({'left': '-60px', 'opacity': 0}, 400);
110		jQuery('#menu_border_wrapper select').animate({'left': '0', 'opacity': 1}, 400).fadeIn();
111	});
112	
113	jQuery('#menu_close').on( 'click', function(){
114		jQuery('#custom_logo').animate({'left': '-200px', 'opacity': 0}, 400);
115		jQuery(this).stop().animate({'left': '-200px', 'opacity': 0}, 400);
116		jQuery('#menu_expand_wrapper a').animate({'left': '20px', 'opacity': 1}, 400);
117		jQuery('#menu_border_wrapper select').animate({'left': '-200px', 'opacity': 0}, 400).fadeOut();
118		jQuery('#menu_wrapper').fadeOut();
119	});
120	
121	//Add to top button when scrolling
122	jQuery(window).scroll(function() {
123		 var calScreenWidth = jQuery(window).width();
124		
125		if(jQuery(this).scrollTop() > 200) {
126			jQuery('#toTop').css({opacity: 1, "visibility": "visible"}).animate({"visibility": "visible"}, {duration:1000,easing:"easeOutExpo"});
127		} else if(jQuery(this).scrollTop() == 0) {
128			jQuery('#toTop').css({opacity: 0, "visibility": "hidden"}).animate({"visibility": "hidden"}, {duration:1500,easing:"easeOutExpo"});
129		}
130	});
131 
132	jQuery('#toTop, .hr_totop').on( 'click', function() {
133		jQuery('body,html,#page_content_wrapper.split').animate({scrollTop:0},800);
134	});
135	
136	var isDisableDragging = jQuery('#pp_enable_dragging').val();
137	
138	if(isDisableDragging!='')
139	{
140		jQuery("img").mousedown(function(){
141			return false;
142		});
143	}
144	
145	if(jQuery('#pp_topbar').val()==0)
146	{
147		var topBarHeight = jQuery('.header_style_wrapper').height();
148	}
149	else
150	{
151		var topBarHeight = parseInt(jQuery('.header_style_wrapper').height()-jQuery('.header_style_wrapper .above_top_bar').height());
152	}
153	
154	var logoHeight = jQuery('#custom_logo img').height();
155	var logoTransHeight = jQuery('#custom_logo_transparent img').height();
156	var logoMargin = parseInt(jQuery('#custom_logo').css('marginTop'));
157	var logoTransMargin = parseInt(jQuery('#custom_logo_transparent').css('marginTop'));
158	var menuPaddingTop = parseInt(jQuery('#menu_wrapper div .nav li > a').css('paddingTop'));
159	var menuPaddingBottom = parseInt(jQuery('#menu_wrapper div .nav li > a').css('paddingBottom'));
160	var SearchPaddingTop = parseInt(jQuery('.top_bar #searchform button').css('paddingTop'));
161	var menuLayout = jQuery('#pp_menu_layout').val();
162	
163	if(menuLayout != 'leftmenu' || jQuery(window).width()<=768)
164	{
165		//Calculate wrapper padding top value
166		if(jQuery('#tg_header_content').val() == 'menu')
167		{
168			jQuery('#wrapper').css('paddingTop', parseInt(jQuery('.header_style_wrapper').height())+'px');
169		}
170		else
171		{
172			jQuery('#wrapper').css('paddingTop', parseInt(jQuery('#elementor_header').height())+'px');
173			setTimeout(function () { jQuery('#wrapper').css('paddingTop', parseInt(jQuery('#elementor_header').height())+'px'); }, 200);
174			setTimeout(function () { jQuery('#wrapper').css('paddingTop', parseInt(jQuery('#elementor_header').height())+'px'); }, 1000);
175		}
176	}
177	
178	if(menuLayout != 'leftmenu' || jQuery(window).width()<=960)
179	{
180		jQuery('#page_content_wrapper.split, .page_content_wrapper.split').css('top', parseInt(topBarHeight+jQuery('.header_style_wrapper .above_top_bar').height())+'px');
181		jQuery('#page_content_wrapper.split, .page_content_wrapper.split').css('paddingBottom', parseInt(topBarHeight+jQuery('.header_style_wrapper .above_top_bar').height())+'px');
182		
183		jQuery(window).scroll(function(){
184			if(jQuery('#pp_fixed_menu').val()==1 && jQuery('html').data('style') != 'fullscreen'  && jQuery('html').data('style') != 'fullscreen_white')
185			{
186				if(jQuery(this).scrollTop() >= 200){
187					jQuery('.extend_top_contact_info').hide();
188					
189					jQuery('.header_style_wrapper').addClass('scroll');
190					jQuery('.top_bar').addClass('scroll');
191					
192					if(jQuery('.top_bar').hasClass('hasbg'))
193					{
194						jQuery('.top_bar').removeClass('hasbg');
195						jQuery('.top_bar').data('hasbg', 1);
196						
197						jQuery('#custom_logo').removeClass('hidden');
198						jQuery('#custom_logo_transparent').addClass('hidden');
199					}
200				}
201				else if(jQuery(this).scrollTop() < 200)
202				{
203					jQuery('.extend_top_contact_info').show();
204					
205					jQuery('#custom_logo img').removeClass('zoom');
206					jQuery('#custom_logo img').css('maxHeight', '');
207					jQuery('#custom_logo_transparent img').removeClass('zoom');
208					
209					jQuery('#custom_logo').css('marginTop', parseInt(logoMargin)+'px');
210					jQuery('#custom_logo_transparent').css('marginTop', parseInt(logoTransMargin)+'px');
211					
212					jQuery('#menu_wrapper div .nav > li > a').css('paddingTop', menuPaddingTop+'px');
213					jQuery('#menu_wrapper div .nav > li > a').css('paddingBottom', menuPaddingBottom+'px');
214					
215					if(jQuery('.top_bar').data('hasbg')==1)
216					{
217						jQuery('.top_bar').addClass('hasbg');
218						jQuery('#custom_logo').addClass('hidden');
219						jQuery('#custom_logo_transparent').removeClass('hidden');
220					}
221					
222					jQuery('.header_style_wrapper').removeClass('scroll');
223					jQuery('.top_bar').removeClass('scroll');
224				}
225		   }
226		   else
227		   {
228			   if(jQuery(this).scrollTop() >= 200)
229			   {
230					   jQuery('.header_style_wrapper').addClass('nofixed');
231			   }
232			   else
233			   {
234					   jQuery('.header_style_wrapper').removeClass('nofixed');
235			   }
236		   }
237		});
238		
239		if(jQuery('#tg_smart_fixed_menu').val()==1 && jQuery('html').data('style') != 'fullscreen'  && jQuery('html').data('style') != 'fullscreen_white')
240		{
241			//Smart sticky menu
242			if(!is_touch_device())
243			{
244				var lastScrollTop = 0;
245				jQuery(window).scroll(function(event){
246				   var st = jQuery(this).scrollTop();
247				   if (st > lastScrollTop && st > 0){
248					   jQuery('.top_bar').removeClass('scroll_up');
249					   jQuery('.header_style_wrapper').removeClass('scroll_up');
250					   jQuery('.header_style_wrapper').addClass('scroll_down');
251				   } else {
252					  jQuery('.top_bar').addClass('scroll_up');
253					  jQuery('.header_style_wrapper').addClass('scroll_up');
254					  jQuery('.header_style_wrapper').removeClass('scroll_down');
255				   }
256				   lastScrollTop = st;
257				   
258				   jQuery('.header_style_wrapper').attr('data-st', st);
259				   jQuery('.header_style_wrapper').attr('data-lastscrolltop', lastScrollTop);
260				});
261			}
262			else
263			{
264				var lastY;
265				jQuery(document).bind('touchmove', function (e){
266					 var currentY = e.originalEvent.touches[0].clientY;
267
268					 if(currentY > 200){
269						 jQuery('.top_bar').addClass('scroll_up');
270						jQuery('.header_style_wrapper').addClass('scroll_up');
271						jQuery('.header_style_wrapper').removeClass('scroll_down');
272						
273					 } else {
274						jQuery('.top_bar').removeClass('scroll_up');
275						jQuery('.header_style_wrapper').removeClass('scroll_up');
276						jQuery('.header_style_wrapper').addClass('scroll_down');
277					 }
278					 
279					 jQuery('.header_style_wrapper').attr('data-pos', currentY);
280				});
281			}
282		}
283	} //If not left menu layout
284	
285	//script for Elementor header
286	jQuery(window).scroll(function(){
287		if(jQuery('#pp_fixed_menu').val()==1)
288		{
289			if(jQuery(this).scrollTop() >= 100){
290				jQuery('#elementor_header').removeClass('visible');
291				jQuery('#elementor_sticky_header').addClass('visible');
292			}
293			else if(jQuery(this).scrollTop() < 100)
294			{
295				jQuery('#elementor_header').addClass('visible');
296				jQuery('#elementor_sticky_header').removeClass('visible');
297			}
298	   }
299	});
300	
301	jQuery(document).mouseenter(function()
302	{	
303		jQuery('body').addClass('hover');	
304	});	
305	
306	jQuery(document).mouseleave(function()
307	{	
308		jQuery('body').removeClass('hover');	
309	});	
310	
311	jQuery('#post_more_close').on( 'click', function(){
312		jQuery('#post_more_wrapper').animate({ right: '-380px' }, 300);
313		
314		return false;
315	});
316	
317	jQuery('#mobile_nav_icon, #elementor_mobile_nav, .elementor_mobile_nav').on( 'click', function() {
318		jQuery('body').addClass('js_nav');
319		jQuery('body').addClass('modalview');
320		jQuery('#close_mobile_menu').addClass('open');
321		
322		if(is_touch_device())
323		{
324			jQuery('body.js_nav').css('overflow', 'auto');
325		}
326	});
327	
328	jQuery('#close_mobile_menu').on( 'click', function() {
329		jQuery('body').removeClass('js_nav');
330		setTimeout(function () { jQuery('body').removeClass('modalview'); }, 400);
331		jQuery(this).removeClass('open');
332	});
333	
334	jQuery('.mobile_menu_close a, #mobile_menu_close').on( 'click', function() {
335		jQuery('body').removeClass('js_nav');
336		setTimeout(function () { jQuery('body').removeClass('modalview'); }, 400);
337		jQuery('#close_mobile_menu').removeClass('open');
338	});
339		
340	jQuery('.post_share').on( 'click', function() {
341		var targetShareID = jQuery(this).attr('data-share');
342		var targetParentID = jQuery(this).attr('data-parent');
343		
344		jQuery(this).toggleClass('visible');
345		jQuery('#'+targetShareID).toggleClass('slideUp');
346		jQuery('#'+targetParentID).toggleClass('sharing');
347		
348		return false;
349	});
350	
351	
352	if(jQuery('.page_slider.menu_transparent').find('.rev_slider_wrapper').length > 0)
353	{
354		var sliderHeight = jQuery('.page_slider.menu_transparent').find('.rev_slider_wrapper').height();
355		var topBarHeight = jQuery('.top_bar').height();
356		
357		if(jQuery('.above_top_bar').length > 0)
358		{
359			topBarHeight+= jQuery('.above_top_bar').height();
360		}
361		
362		if(jQuery('.page_slider.menu_transparent').find('.rev_slider_wrapper.fullscreen-container').length > 0)
363		{
364			var topBarHeight = 55;
365		}
366
367		jQuery('.ppb_wrapper').css('marginTop', sliderHeight-topBarHeight+'px');
368		jQuery('#page_content_wrapper').css('marginTop', sliderHeight-topBarHeight+'px');
369	}
370	
371	jQuery('#demo_apply').on( 'click', function(){
372		jQuery('#ajax_loading').addClass('visible');
373		jQuery('body').addClass('loading');
374		jQuery("form#form_option").submit();
375	});
376	
377	jQuery('#option_wrapper').mouseenter(function()
378	{	
379		jQuery('body').addClass('overflow_hidden');	
380	});	
381	
382	jQuery('#option_wrapper').mouseleave(function()
383	{	
384		jQuery('body').removeClass('overflow_hidden');	
385	});	
386	
387	var calScreenHeight = jQuery(window).height()-108;
388	var miniRightPos = 800;
389	
390	jQuery('#overlay_background').on( 'click', function(){
391		if(!jQuery('body').hasClass('js_nav'))
392		{
393			jQuery('#overlay_background').removeClass('visible');
394			jQuery('#overlay_background').removeClass('share_open');
395			jQuery('#fullscreen_share_wrapper').css('visibility', 'hidden');
396		}
397	});
398	
399	var menuLayout = jQuery('#pp_menu_layout').val();
400	
401	jQuery('.rev_slider_wrapper.fullscreen-container').each(function(){
402		jQuery(this).append('<div class="icon-scroll"></div>');
403	});
404	
405	if(jQuery('.one.fullwidth.slideronly').length > 0)
406	{
407		jQuery('body').addClass('overflow_hidden');
408	}
409	
410	jQuery('#post_share_text').on( 'click', function() {
411		jQuery('body').addClass('overflow_hidden');
412		jQuery('body').addClass('blur');
413		jQuery('#side_menu_wrapper').addClass('visible');
414		jQuery('#side_menu_wrapper').addClass('share_open');
415		jQuery('#fullscreen_share_wrapper').css('visibility', 'visible');
416	});
417	
418	jQuery('#close_share').on( 'click', function() {
419		jQuery('body').removeClass('overflow_hidden');
420		jQuery('body').removeClass('blur');
421		jQuery('#side_menu_wrapper').removeClass('visible');
422		jQuery('#side_menu_wrapper').removeClass('share_open');
423		jQuery('#fullscreen_share_wrapper').css('visibility', 'hidden');
424	});
425	
426	// Find all YouTube & Vimeo videos
427	/*jQuery('iframe[src*="youtube.com"]').each(function() {
428		jQuery(this).wrap('<div class="video-container"></div>');
429	});
430	
431	jQuery('iframe[src*="vimeo.com"]').each(function() {
432		jQuery(this).wrap('<div class="video-container"></div>');
433	});*/
434	
435	jQuery('.blog-tilt').tilt({
436		perspective: 5000
437	});
438	
439	jQuery(".input_wrapper input").focusout(function(){
440		if(jQuery(this).val() != "")
441		{
442			$(this).addClass("has-content");
443		} else {
444			jQuery(this).removeClass("has-content");
445		}
446	});
447	
448	jQuery(window).scroll(function() {
449		var oVal;
450		oVal = jQuery(window).scrollTop() / 300;
451		if(oVal>1)
452		{
453			oVal = 1;
454		}
455		oVal = parseFloat(1-oVal);
456		
457		jQuery('#page_caption.hasbg .page_title_wrapper .page_title_inner').css('opacity', oVal);
458		
459		var posVal = -(jQuery(window).scrollTop() * 0.005);
460		jQuery('#page_caption.hasbg .page_title_wrapper .page_title_inner').css({'transform':'translate(0px,'+posVal+'px)'});
461	});
462	
463	jQuery('#page_title_nav li a').on( 'click', function(event){
464		var documentScroll = jQuery(document).scrollTop();
465		var linkURL = jQuery(this).attr('href');
466		var sectionID = jQuery(this).attr('href').substr(1);
467		 
468		if(linkURL.slice(0,1)=='#' && sectionID != '')
469		{
470			var topBarHeight = 0;
471			if(jQuery('.top_bar').length > 0) {
472				var topBarHeight = parseInt(jQuery('.top_bar').height());
473			}
474			else if(jQuery('#elementor_sticky_header').length > 0) {
475				var topBarHeight = parseInt(jQuery('#elementor_sticky_header').height());
476			}
477
478			var scrollToPos = parseInt(jQuery('#'+sectionID).offset().top-topBarHeight);
479			
480			jQuery('body,html').animate({
481				scrollTop: scrollToPos
482			}, 1200);
483		}
484		else
485		{
486			return true;
487		}
488	});
489	
490	jQuery('#singleroom_book').on( 'click', function(event){
491		var formID = jQuery(this).attr('data-formid');
492	
493		jQuery('#singleroom_book_form'+formID).toggleClass('visible');
494	});
495	
496	jQuery('.mphb-gateways-list li input[type=radio]').change(function() {
497		jQuery('.mphb-gateways-list li').removeClass('active');
498		jQuery(this).parent('.mphb-gateway').addClass('active');
499	});
500	
501	jQuery('.mphb-gateways-list li').each(function() {
502		var radioInput = jQuery(this).find('input[type=radio]:first-child');
503		
504		if(radioInput.is(':checked')) {
505			radioInput.parent('.mphb-gateway').addClass('active');
506		}
507	});
508	
509	jQuery('.mphb-gateways-list li').on( 'click', function(event){
510		jQuery('.mphb-gateways-list li').removeClass('active');
511		jQuery(this).addClass('active');
512		
513		var radioID = jQuery(this).find('input[type=radio]').attr('id');
514		jQuery("#"+radioID).prop("checked", true);
515	});
516	
517	if(!is_touch_device())
518	{
519		jQuery('.stellar').each(function() {
520			jQuery(this).attr('data-stellar-ratio', '1.15');
521		});
522		
523		jQuery(window).stellar({
524			positionProperty: 'transform',
525			responsive: true,
526			parallaxBackgrounds: false,
527			horizontalScrolling: false,
528			hideDistantElements: false,
529		});
530	}
531	
532	setTimeout(function () { jQuery('#elementor_header').addClass('visible'); }, 200);
533	
534	//Apply all entrance animation
535	jQuery('.smoove').each(function() {
536		var minWidth = 1;
537		if(typeof jQuery(this).attr('data-minwidth') != 'undefined')
538		{
539			minWidth = jQuery(this).attr('data-minwidth');
540		}
541		
542		var offset = '20%';
543		if(typeof jQuery(this).attr('data-offset') != 'undefined')
544		{
545			offset = jQuery(this).attr('data-offset');
546		}
547		
548		jQuery(this).smoove({
549			min_width : parseInt(minWidth),
550			offset : offset
551		});
552	});
553	
554	//Desktop menu
555	jQuery('#menu_wrapper div .nav li a, .mobile_main_nav li a').on( 'click', function(event){
556		var documentScroll = jQuery(document).scrollTop();
557		var linkURL = jQuery(this).attr('href');
558		var sectionID = jQuery(this).attr('href').substr(1);
559		
560		if(linkURL.slice(0,1)=='#' && sectionID != '')
561		{
562			event.preventDefault();
563			var topBarHeight = jQuery('.top_bar').height();
564			
565			if(!jQuery(this).parent('li').hasClass('menu-item-has-children'))
566			{
567				jQuery('#close_mobile_menu').trigger('click');
568			}
569			
570			if(sectionID=='top')
571			{
572				jQuery('body,html').animate({scrollTop:0},1200);
573			}
574			else
575			{
576				if(documentScroll != 0)
577				{
578					var scrollToPos = parseInt(jQuery('#'+sectionID).offset().top-topBarHeight-32);
579				}
580				else
581				{
582					var scrollToPos = parseInt(jQuery('#'+sectionID).offset().top-topBarHeight+82);
583				}
584				
585				if(isReallyNaN(scrollToPos))
586				{
587					var scrollToPosObj = document.getElementById(sectionID).getBoundingClientRect();
588					scrollToPos = scrollToPosObj.top + window.scrollY;
589				}
590			
591				jQuery('body,html').animate({
592					scrollTop: scrollToPos
593				}, 1200);
594			}
595			
596			jQuery('#menu_wrapper div .nav li').removeClass('current-menu-item');
597			jQuery(this).parent('li').addClass('current-menu-item');
598			
599			if(jQuery(window).width() < 960)
600			{
601				jQuery('body').removeClass('js_nav');
602			}
603		}
604		else
605		{
606			return true;
607		}
608	});
609});
610
611jQuery(window).on('resize load',adjustIframes);

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.