PageSourceSearch

https://toblhof.it/user/themes/trendstudio/js/script.js

js toblhof.it collected 2026-09-27 04:27:07 UTC 10,911 bytes, 491 lines download raw bytes

1(function($) {
2
3	"use strict";
4
5
6	/* MOBILE HEADER */
7
8	$(document).ready(function () {
9	  //Menu button on click event
10	  $('.mobile-nav-button').on('click', function() {
11	    // Toggles a class on the menu button to transform the burger menu into a cross
12	    $( ".mobile-nav-button .mobile-nav-button__line:nth-of-type(1)" ).toggleClass( "mobile-nav-button__line--1");
13	    $( ".mobile-nav-button .mobile-nav-button__line:nth-of-type(2)" ).toggleClass( "mobile-nav-button__line--2");
14	    $( ".mobile-nav-button .mobile-nav-button__line:nth-of-type(3)" ).toggleClass( "mobile-nav-button__line--3");
15
16	    // Toggles a class that slides the menu into view on the screen
17	    $('.mobile-menu').toggleClass('mobile-menu--open');
18	    return false;
19	  });
20	});
21
22
23	//Mobile Nav Hide Show
24	if($('.mobile-menu').length){
25
26		$('.mobile-menu .menu-box').mCustomScrollbar();
27
28		var mobileMenuContent = $('.main-header .nav-outer .main-menu').html();
29		$('.mobile-menu .menu-box .menu-outer').append(mobileMenuContent);
30		$('.sticky-header .main-menu').append(mobileMenuContent);
31
32		//Dropdown Button
33		$('.mobile-menu li.dropdown .dropdown-btn').on('click', function() {
34			$(this).toggleClass('open');
35			$(this).prev('ul').slideToggle(500);
36		});
37
38		//Dropdown Button
39		$('.mobile-menu li.dropdown .dropdown-btn').on('click', function() {
40			$(this).toggleClass('open');
41			$(this).prev('.mega-menu').slideToggle(500);
42		});
43
44		//Menu Toggle Btn
45		$('.mobile-nav-toggler').on('click', function() {
46			$('body').addClass('mobile-menu-visible');
47		});
48
49		//Menu Toggle Btn
50		$('.mobile-menu .menu-backdrop,.mobile-menu .close-btn').on('click', function() {
51			$('body').removeClass('mobile-menu-visible');
52		});
53	}
54
55
56
57	// Add sticky on scroll
58	$(window).scroll(function(){
59	    if ($(this).scrollTop() > 50) {
60	       $('.header-out').addClass('scrollfix');
61	    } else {
62	       $('.header-out').removeClass('scrollfix');
63	    }
64	});
65
66
67	// Slick slider
68
69	$(document).ready(function(){
70	  $('.slick-slider').slick({
71			slidesToShow: 1,
72		  slidesToScroll: 1,
73		  autoplay: true,
74		  autoplaySpeed: 5000,
75			infinite: true,
76			pauseOnFocus: false,
77			pauseOnHover: false,
78			fade: !0,
79        cssEase: 'linear',
80	  });
81
82
83		// Slick slider 10 Gründe Motivi
84		$('.slick-slider-motivi').slick({
85			dots: true,
86			prevArrow: $('.prev'),
87			nextArrow: $('.motivi-next'),
88			appendDots: $('.motivi-dots'),
89			slidesToShow: 1,
90			slidesToScroll: 1,
91			autoplay: false,
92			infinite: true,
93			pauseOnFocus: false,
94			pauseOnHover: false,
95			fade: !0,
96				cssEase: 'linear',
97		});
98
99		// Slick slider Offers ANGEBOTE
100		$(".regular").slick({
101		    dots: true,
102		    infinite: true,
103		    slidesToShow: 2,
104		    slidesToScroll: 1,
105		    prevArrow: $('.prev'),
106		    nextArrow: $('.next'),
107		    appendDots: $('.dots'),
108		    autoplay: true,
109		    autoplaySpeed: 8000,
110				margin: 20,
111		    responsive: [
112		        {
113		          breakpoint: 1301,
114		          settings: {
115		            slidesToShow: 1,
116		          }
117		        }
118		    ]
119		});
120
121
122
123
124		// Slick Slider refresh, dass der Slider im Tab funktioniert
125		$("#room-tab1").click(function(){
126	    $('.slick-slider-rooms1').slick('refresh');
127		});
128		$("#room-tab2").click(function(){
129	    $('.slick-slider-rooms2').slick('refresh');
130		});
131		$("#room-tab3").click(function(){
132	    $('.slick-slider-rooms3').slick('refresh');
133		});
134		$("#room-tab4").click(function(){
135	    $('.slick-slider-rooms4').slick('refresh');
136		});
137
138		// Slick slider rooms
139		$('.slick-slider-rooms1').slick({
140			dots: true,
141			prevArrow: $('.rooms1-prev'),
142			nextArrow: $('.rooms1-next'),
143			appendDots: $('.rooms1-dots'),
144			slidesToShow: 1,
145			slidesToScroll: 1,
146			autoplay: false,
147			infinite: true,
148			pauseOnFocus: false,
149			pauseOnHover: false,
150			fade: !0,
151				cssEase: 'linear',
152		});
153		// Slick slider rooms
154		$('.slick-slider-rooms2').slick({
155			dots: true,
156			prevArrow: $('.rooms2-prev'),
157			nextArrow: $('.rooms2-next'),
158			appendDots: $('.rooms2-dots'),
159			slidesToShow: 1,
160			slidesToScroll: 1,
161			autoplay: false,
162			infinite: true,
163			pauseOnFocus: false,
164			pauseOnHover: false,
165			fade: !0,
166				cssEase: 'linear',
167		});
168		// Slick slider rooms
169		$('.slick-slider-rooms3').slick({
170			dots: true,
171			prevArrow: $('.rooms3-prev'),
172			nextArrow: $('.rooms3-next'),
173			appendDots: $('.rooms3-dots'),
174			slidesToShow: 1,
175			slidesToScroll: 1,
176			autoplay: false,
177			infinite: true,
178			pauseOnFocus: false,
179			pauseOnHover: false,
180			fade: !0,
181				cssEase: 'linear',
182		});
183		// Slick slider rooms
184		$('.slick-slider-rooms4').slick({
185			dots: true,
186			prevArrow: $('.rooms4-prev'),
187			nextArrow: $('.rooms4-next'),
188			appendDots: $('.rooms4-dots'),
189			slidesToShow: 1,
190			slidesToScroll: 1,
191			autoplay: false,
192			infinite: true,
193			pauseOnFocus: false,
194			pauseOnHover: false,
195			fade: !0,
196				cssEase: 'linear',
197		});
198
199
200
201		// Slick slider Gallery
202		$('.slick-slider-gallery').slick({
203			dots: true,
204			prevArrow: $('.gallery-prev'),
205			nextArrow: $('.gallery-next'),
206			appendDots: $('.gallery-dots'),
207		  slidesToShow: 3,
208		  slidesToScroll: 3,
209			autoplay: true,
210			autoplaySpeed: 4000,
211			infinite: true,
212			pauseOnFocus: false,
213			pauseOnHover: false,
214			responsive: [
215					{
216						breakpoint: 768,
217						settings: {
218							slidesToShow: 2,
219						}
220					}
221			]
222		});
223
224	});
225
226	//LightBox / Fancybox
227	if($('.lightbox').length) {
228		$('.lightbox').fancybox({
229			openEffect  : 'fade',
230			closeEffect : 'fade',
231			helpers : {
232				media : {}
233			}
234		});
235	}
236
237
238})(window.jQuery);
239
240
241
242
243
244$(document).ready(function() {
245	$('.lightbox').magnificPopup({
246		type: 'image',
247		closeOnContentClick: true,
248		closeBtnInside: false,
249		fixedContentPos: true,
250		mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
251		image: {
252			verticalFit: true
253		},
254		zoom: {
255			enabled: true,
256			duration: 300 // don't foget to change the duration also in CSS
257		}
258	});
259
260});
261
262
263
264'use strict';
265
266(function($){
267  var $canvas,
268      fnInitWaves,
269      fnDrawWave,
270      tmrResize;
271
272  fnDrawWave = function(canvas){
273    var $this = $(canvas),
274        $outer,
275        iWidth,
276        iHeight,
277        iMidWidth,
278        iQuartWidth,
279        iLineWidth,
280        iFillLineWidth,
281        ctx;
282
283      $outer = $this.parent();
284
285      iWidth = $outer.outerWidth();
286      iHeight = $outer.outerHeight();
287      iMidWidth = Math.floor(iWidth / 2);
288      iQuartWidth = Math.floor(iMidWidth / 2);
289
290      iLineWidth = 6;
291      iFillLineWidth = 6;
292
293      $this.attr({
294        width: iWidth,
295        height: iHeight
296      });
297
298      ctx = canvas.getContext('2d');
299
300      // Wave init
301      ctx.lineWidth = iLineWidth;
302      ctx.strokeStyle = 'white';
303      ctx.beginPath();
304      ctx.moveTo(
305        0,
306        iHeight / 2
307      );
308
309      // Wave peak
310      ctx.quadraticCurveTo(
311        iQuartWidth,
312        -(iHeight / 2) + iLineWidth,
313        iMidWidth,
314        iHeight / 2
315      );
316
317      // Wave valley
318      ctx.quadraticCurveTo(
319        iQuartWidth + iMidWidth,
320        (iHeight * 1.5) - iLineWidth,
321        iWidth,
322        iHeight / 2
323      );
324
325      // Wave end
326      ctx.lineCap = 'round';
327      ctx.stroke();
328      ctx.closePath();
329
330      // Wave peak fill init
331      ctx.lineWidth = iFillLineWidth;
332      ctx.strokeStyle = 'red';
333      ctx.beginPath();
334      ctx.moveTo(
335        0,
336        (iHeight / 2) + iFillLineWidth
337      );
338
339      // Wave peak fill
340      ctx.quadraticCurveTo(
341        iQuartWidth,
342        -(iHeight / 2) + (iLineWidth * 2),
343        iMidWidth,
344        (iHeight / 2) + iFillLineWidth
345      );
346
347      // Wave fill end
348      ctx.lineCap = 'butt';
349      ctx.stroke();
350      ctx.fillStyle = 'red';
351      ctx.fill();
352      ctx.closePath();
353
354      // Wave valley fill init
355      ctx.lineWidth = iFillLineWidth;
356      ctx.strokeStyle = 'orange';
357      ctx.beginPath();
358      ctx.moveTo(
359        iMidWidth,
360        (iHeight / 2) - iFillLineWidth
361      );
362
363      ctx.quadraticCurveTo(
364        iQuartWidth + iMidWidth,
365        (iHeight * 1.5) - iFillLineWidth,
366        iWidth,
367        (iHeight / 2) - iFillLineWidth
368      );
369
370      // Wave valley fill end
371      ctx.lineCap = 'butt';
372      ctx.stroke();
373      ctx.fillStyle = 'orange';
374      ctx.fill();
375      ctx.closePath();
376  };
377
378  fnInitWaves = function(){
379    $canvas.each(function(i, el){
380      fnDrawWave(el);
381    });
382  };
383
384  $(function(){
385    $canvas = $('canvas.wave');
386
387    fnInitWaves.apply(undefined);
388  });
389
390  $(window).on('resize', function(){
391    clearTimeout(tmrResize);
392
393    tmrResize = setTimeout(fnInitWaves, 250);
394  });
395})(jQuery);
396
397
398function myTab1() {
399  document.getElementById("room-tab2").classList.remove('active');
400	document.getElementById("room-tab3").classList.remove('active');
401	document.getElementById("room-tab4").classList.remove('active');
402}
403function myTab2() {
404	document.getElementById("room-tab1").classList.remove('active');
405 document.getElementById("room-tab3").classList.remove('active');
406 document.getElementById("room-tab4").classList.remove('active');
407}
408function myTab3() {
409	document.getElementById("room-tab2").classList.remove('active');
410 document.getElementById("room-tab1").classList.remove('active');
411 document.getElementById("room-tab4").classList.remove('active');
412}
413function myTab4() {
414	document.getElementById("room-tab2").classList.remove('active');
415 document.getElementById("room-tab3").classList.remove('active');
416 document.getElementById("room-tab1").classList.remove('active');
417}
418
419$("#room-tab1").click(function() {
420$('html,body').animate({
421		scrollTop: $("#nav-tabContent").offset().top},
422		'slow');
423});
424
425$("#room-tab2").click(function() {
426$('html,body').animate({
427		scrollTop: $("#nav-tabContent").offset().top},
428		'slow');
429});
430
431
432$("#room-tab3").click(function() {
433$('html,body').animate({
434		scrollTop: $("#nav-tabContent").offset().top},
435		'slow');
436});
437
438
439$("#room-tab4").click(function() {
440$('html,body').animate({
441		scrollTop: $("#nav-tabContent").offset().top},
442		'slow');
443});
444
445
446
447function myFunction(x) {
448  if (x.matches) { // If media query matches
449
450
451		$('.home-content').addClass('active');
452
453  } else {
454
455		$(window).scroll(function(){
456		    if ($(this).scrollTop() > 450) {
457		       $('.home-content').addClass('active');
458		    }
459		});
460
461  }
462}
463
464var x = window.matchMedia("(max-width: 1200px)")
465myFunction(x) // Call listener function at run time
466x.addListener(myFunction) // Attach listener function on state changes
467
468
469// Animation nach oben bei Home + Innenseiten Home-Content
470
471
472$('.page-content').addClass('active');
473
474
475// Read more Button News
476$( document ).ready(function() {
477	$(".more_button").click(function(e) {
478        e.preventDefault();
479
480        var $this = $(this).closest(".text_outer");
481
482        if($this.hasClass("active")) {
483            $this.removeClass("active");
484        } else {
485            $(".text_outer").removeClass("active");
486            $this.addClass("active");
487        }
488    });
489});
490
491$("select option:first-child").attr("disabled", "true");

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.