PageSourceSearch

https://next-learning-owl.de/wp-content/themes/next-learning-theme2/js/script.js?ver=32

js next-learning-owl.de collected 2026-10-07 10:17:04 UTC 37,950 bytes, 1,299 lines download raw bytes

1var textSearch;
2$(document).ready(function () {
3
4	$('.mainNavLink').each(function( index ) {
5		var thisLink = $(this).attr("data-link");
6  		if (window.location.href.indexOf(thisLink) > -1) {
7			$(this).addClass('active');
8    	} 
9    	});
10	    if (window.location.href === "https://next-learning-owl.de/"){
11			var startPage = $('.mainNavLink[data-link="home"]');
12			startPage.addClass('active');
13		}
14		$('.menu-toggle').click( function(){
15			$(this).find('.hamburger-collapse').toggleClass("open");
16			$('#nav').slideToggle();
17			$('.searchbarHeaderOverlay').toggleClass("nav");
18		});
19		 $(window).resize(function() {
20			if ($(window).width() > 930) {
21				$('#nav').show();
22			}
23	});
24	
25	
26	$(document).on('click', '.registerParticipantRow.add-row', function() {
27		addParticipantForm(this);
28  } );
29
30	// Filter Settings 
31    
32
33	$(".toggleBox").click(function(){
34		if ($(this).hasClass("toggle1")) {
35			$(this).removeClass("toggle1");
36			$(this).addClass("toggle2");
37			$(".toggleActive").hide();
38			$(".toggleInactive ").show().css("display" , "flex");
39			$(".filterContent").fadeOut(200);    
40		} else {
41			$(this).removeClass("toggle2");
42			$(this).addClass("toggle1");
43			$(".toggleInactive").hide();
44			$(".toggleActive ").show().css("display" , "flex");
45			$(".filterContent").fadeIn(200);    
46		}
47		
48		});
49		
50		
51		// $(".kursButton").click(function () {
52		//     var element = $(this);
53		//     $(".kursKachel").show();
54		//     $(".kursInhalt").hide();
55		//     element.parents(".kursKachel").hide();
56		//     element.parents(".kursKachel").siblings(".kursInhalt").show();
57		// });
58		
59		
60		$(".hauptKlassifikationHead").click(function(){
61			var element = $(this);
62			if ($(this).hasClass("activeRed")) {
63				$(this).removeClass("activeRed");
64				element.parents(".hauptKlassifiation").find(".FilterUnterpunkte").slideUp(); 
65			} else {
66				$(this).addClass("activeRed");
67				element.parents(".hauptKlassifiation").find(".FilterUnterpunkte").slideDown(); 
68			}
69		});
70		
71		
72		
73	
74		
75		
76		/* fill filter */
77		
78		var elearningCount = $(".catalog-item.e_learning").length;
79		var seminarCount = $(".catalog-item.seminar").length;
80		var blendedlearningCount = $(".catalog-item.blended_learning").length
81		
82		if (elearningCount > 0) {
83			var filterHtml = '<div class="FilterPunkt" id="e_learning">E-Learning</div>';
84			$("#courseTypeFilter .FilterUnterpunkte").append(filterHtml);         
85		}
86		if (seminarCount > 0) {
87			var filterHtml = '<div class="FilterPunkt" id="seminar">Veranstaltung</div>';
88			$("#courseTypeFilter .FilterUnterpunkte").append(filterHtml);         
89		}
90		if (blendedlearningCount > 0) {
91			var filterHtml = '<div class="FilterPunkt" id="blended_learning">Blended Learning</div>';
92			$("#courseTypeFilter .FilterUnterpunkte").append(filterHtml);         
93		}
94		
95		
96		
97		/* text search */    
98		
99		var delayTimer;
100		
101		
102	
103		
104		
105		$("#textSearchInput").on('input', function () {
106			textSearchFunction(this);
107		});
108		
109		
110		$("#filterSuche").click(function(){
111			var element = $("#textSearchInput");
112			textSearchFunction(element);
113		});
114		
115		
116		
117		/* filter click */
118		
119		$(".FilterPunkt").click(function () {
120			var filterId = $(this).attr("id");
121			var filterText = $(this).text();
122			var classification = $(this).parents(".filterContent").parents(".filterContent").attr("data-classification");
123			
124			$(this).siblings().each(function() {
125				if ($(this).hasClass("active")) {
126					var thisFilterId = $(this).attr("id");
127					$(this).removeClass("active");
128					removeFilter(thisFilterId);
129				}
130			});
131
132			if ($(this).hasClass("active")) {
133				removeFilter(filterId);
134				$(this).removeClass("active");
135			}
136			else {
137				addFilter(filterId, filterText);
138				$(this).addClass("active");
139			}
140		});
141		
142		
143		
144		
145		// var btn = $('#backToTop');
146
147		// 	$(window).scroll(function() {
148		// 	if ($(window).scrollTop() > 300) {
149		// 		btn.addClass('show');
150		// 	} else {
151		// 		btn.removeClass('show');
152		// 	}
153		// 	});
154
155		// 	btn.on('click', function(e) {
156		// 	e.preventDefault();
157		// 	$('html, body').animate({scrollTop:0}, '300');
158		// 	});
159
160/** Toggle mobile menue **/
161
162$(".burgermenue").click(function(){
163	$(".mobile_nav .menu-main-menue-container").toggle();
164	if ( $(".burgermenue").hasClass("active") ) {
165		$(this).removeClass("active")
166	} else {
167		$(this).addClass("active")
168	}
169  });
170
171
172  /**
173     * Register page: Show Reg or Login Form
174     */
175
176  const showRegFormBtn = $('.showRegForm')
177  if (showRegFormBtn) {
178	  showRegFormBtn.on('click', function (e) {
179		  e.preventDefault();
180		  $(".loginForm").hide();
181		  $(".registerForm").show();
182	  })
183  }
184
185  const showLoginFormBtn = $('.showLoginForm')
186  if (showLoginFormBtn) {
187	  showLoginFormBtn.on('click', function (e) {
188		  e.preventDefault();
189		  $(".registerForm").hide();
190		  $(".loginForm").show();
191	  })
192  }
193
194  $(".addToCart").submit(function (event) {
195
196    if($(".accessTimeSelect").val() == ""){
197		$(".accessTimeSelect").addClass("disabled");
198		$(".fieldDisabledAlert").addClass("disabled");
199        // alert("Nicht alles ausgefuellt");
200        return false; //Bewirkt, dass Form nicht abgeschickt wird...
201    } else {
202		$(".accessTimeSelect").removeClass("disabled");
203		$(".fieldDisabledAlert").removeClass("disabled");
204	}
205
206	/* show new SeminarRequest */
207
208
209
210});
211  
212
213  // registration form submit
214	$(".registerForm").submit(function (event) {
215
216		$(".isEmpty").removeClass("isEmpty");
217		var missingFields = false;
218
219		$(this).find(".required").each(function(){
220			if ($(this).find("input").attr("type") == "checkbox") {
221				if (!$(this).find("input").is(':checked')) {
222					$(this).addClass("isEmpty");
223					missingFields = true;
224				}
225			} else {
226				if (!$(this).val()) {
227					$(this).addClass("isEmpty");
228					missingFields = true;
229				}
230			}
231
232		});
233
234		if (missingFields) {
235			$(this).find(".messageBox").show();
236			$(this).find(".messageBoxText").text("Bitte füllen Sie alle Pflichtfelder aus.");
237			event.preventDefault();
238			return false;
239		}
240
241		var passwordRegex = new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\+\_\$%\^&\*-\.])(?=.{8,})");
242
243		if ( !passwordRegex.test($("#password").val()) ) {
244			$("#password, #password2").addClass("isEmpty");
245			$(this).find(".messageBox").show();
246			$(this).find(".messageBoxText").text("Das Passwort muss mindestens 8 Zeichen lang sein und mind. 1 Großbuchstaben, 1 Ziffer und 1 Sonderzeichen (!@#+_$%^&*-) enthalten.");
247			event.preventDefault();
248			return false;
249		}
250		if ( $("#password").val() != $("#password2").val() ) {
251			$("#password, #password2").addClass("isEmpty");
252			$(this).find(".messageBox").show();
253			$(this).find(".messageBoxText").text("Die Passwörter stimmen nicht überein.");
254			event.preventDefault();
255			return false;
256		}
257	});
258
259	$(".accessTimeSelect, .courseQuantity").on("input", function(){
260
261		var accessTime = $(".accessTimeSelect").val();
262		$(".accessTimeInput").val(accessTime);
263		var quantity = parseInt($(".courseQuantity").val());
264		var teilnehmerzahl = parseInt($("#teilnehmerzahl").val());
265		var teilnehmerRabatt = parseInt($("#teilnehmerRabatt").val());
266
267	  //group booking calculate costs
268
269	  var endPrice = parseFloat($(".rawEndPrice").val());
270	// var endPrice = parseFloat($(".endPrice").text());
271
272
273
274	  if (accessTime == "12") {
275		endPrice = endPrice * 1.5;
276	  } else if (accessTime == "18"){
277		endPrice = endPrice * 1.8;
278	  }
279
280
281	  if (quantity >= teilnehmerzahl ) {
282		  var rabattHoehe = (endPrice * (teilnehmerRabatt/100)) * (quantity - teilnehmerzahl + 1);
283	  } else {
284		  var rabattHoehe = 0;
285	  }
286	  endPrice = endPrice * quantity - rabattHoehe;
287	  $(".endPrice").text(endPrice.toFixed(2).replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1."));
288	//   return $rabattHoehe;
289
290	});
291
292	if($(".startLoginNotification").parent().siblings(".sdds-message").length){
293		$(".startLoginNotification").parents(".elementor-section").show();
294	}else {
295		$(".startLoginNotification").parents(".elementor-section").hide();
296	}
297
298
299/*** copy purchase link to clipboard ***/
300
301// function copyToClipboard(text) {
302// 	if (window.clipboardData && window.clipboardData.setData) {
303// 		return clipboardData.setData("Text", text);
304
305// 	} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
306// 		var textarea = document.createElement("textarea");
307// 		textarea.textContent = text;
308// 		textarea.style.position = "fixed";
309// 		document.body.appendChild(textarea);
310// 		textarea.select();
311// 		try {
312// 			return document.execCommand("copy");
313// 		} catch (ex) {
314// 			console.warn("Copy to clipboard failed.", ex);
315// 			return false;
316// 		} finally {
317// 			document.body.removeChild(textarea);
318// 		}
319// 	}
320// }
321
322// const purchaseLinkBoxCopy = $('.purchaseLinkBoxCopy')
323// if (purchaseLinkBoxCopy) {
324// 	purchaseLinkBoxCopy.on('click', function (e) {
325// 		var link = $(this).prev().find("a").text();
326// 		copyToClipboard(link);
327// 		$(this).addClass("copied").text("Link wurde kopiert");
328// 	})
329// }
330
331// const purchaseLinkBoxCopyRegisterOverview = $('.purchaseLinkBoxCopyRegisterOverview')
332// if (purchaseLinkBoxCopyRegisterOverview) {
333// 	purchaseLinkBoxCopyRegisterOverview.on('click', function (e) {
334// 		var link = $(this).prev().text();
335// 		copyToClipboard(link);
336// 		$(this).addClass("copied").text("Link wurde kopiert");
337// 	})
338// }
339
340/* search bar header */
341    // $(".searchbarHeader #searchbarHeaderButton").click(function(e) {
342	// 	 e.stopPropagation(); // ⬅️ wichtig!
343    //     $(this).parents(".searchbarHeader").addClass("open");
344	// 	$('.searchbarHeaderOverlay').toggleClass("active");
345    //     setTimeout(function() {
346    //         $("#searchbarInput").focus();
347    //     }, 100);
348    // });
349
350	// $("#searchbarInput").on('input', function (e) {
351	// 	if ($(this).val() == "") {
352	// 		$(this).removeClass("active");
353	// 		$(this).siblings("#searchbarDelete").removeClass("active");
354	// 		$(this).parents(".searchbarHeaderOpen").find(".searchbarHeaderResults").hide();
355	// 	} else {
356	// 		$(this).addClass("active");
357	// 		$(this).siblings("#searchbarDelete").addClass("active");
358	// 		searchbarFilterCourses();
359	// 		$(this).parents(".searchbarHeaderOpen").find(".searchbarHeaderResults").show();
360	// 	}
361	// });
362
363	// $("#searchbarDelete").on('click', function (e) {
364	// 	$(this).siblings("#searchbarInput").val("").removeClass("active");
365	// 	$(this).removeClass("active");
366	// 	searchbarCloseResults();
367	// });
368
369	// $("#searchbarInput").on('keydown', function (e) {
370	// 	var code = (e.keyCode ? e.keyCode : e.which);
371	// 	if(code == 13 && $("#searchbarInput").val().trim()) { //Enter keycode
372	// 		e.preventDefault();
373	// 		Search.open();
374	// 	}
375	// });
376
377	// $("#searchbarButton").on('click', function (e) {
378	// 	e.preventDefault();
379	// 	Search.open();
380	// });
381
382      // =========================
383    // OPEN SEARCH
384    // =========================
385    // $(".searchbarHeader #searchbarHeaderButton").on("click touchstart", function (e) {
386    //     e.preventDefault();
387    //     e.stopPropagation();
388
389    //     $(".searchbarHeader").addClass("open");
390    //     $(".searchbarHeaderOverlay").addClass("active");
391
392    //     //  FIX: Android stabiler Fokus
393    //     setTimeout(function () {
394    //         $("#searchbarInput")[0].focus({ preventScroll: true });
395
396    //     }, 250);
397    // });
398
399
400    // // =========================
401    // // INPUT HANDLING
402    // // =========================
403    // $("#searchbarInput").on("input", function () {
404
405    //     let val = $(this).val();
406
407    //     if (!val) {
408    //         $(this).removeClass("active");
409    //         $("#searchbarDelete").removeClass("active");
410    //         $(".searchbarHeaderResults").hide();
411    //         return;
412    //     }
413
414    //     $(this).addClass("active");
415    //     $("#searchbarDelete").addClass("active");
416
417    //     searchbarFilterCourses();
418    //     $(".searchbarHeaderResults").show();
419    // });
420
421
422    // // =========================
423    // // IMPORTANT FIX: INPUT PROTECTION (ANDROID)
424    // // =========================
425    // $("#searchbarInput").on("click touchstart focus", function (e) {
426    //     e.stopPropagation();
427    // });
428
429    // $("#searchbarInput").on("focus", function (e) {
430    //     e.stopPropagation();
431    // });
432
433
434    // // =========================
435    // // DELETE BUTTON
436    // // =========================
437    // $("#searchbarDelete").on("click touchstart", function (e) {
438    //     e.preventDefault();
439    //     e.stopPropagation();
440
441    //     $("#searchbarInput").val("").removeClass("active");
442    //     $(this).removeClass("active");
443
444    //     searchbarCloseResults();
445    // });
446
447
448    // // =========================
449    // // ENTER KEY
450    // // =========================
451    // $("#searchbarInput").on("keydown", function (e) {
452
453    //     if (e.key === "Enter") {
454    //         e.preventDefault();
455
456    //         if ($(this).val().trim()) {
457    //             searchbarFilterCourses();
458    //         }
459    //     }
460    // });
461
462
463    // // =========================
464    // // SEARCH BUTTON
465    // // =========================
466    // $("#searchbarButton").on("click touchstart", function (e) {
467    //     e.preventDefault();
468    //     e.stopPropagation();
469
470    //     searchbarFilterCourses();
471    // });
472
473
474    // // =========================
475    // // OVERLAY CLOSE
476    // // =========================
477    // $(".searchbarHeaderOverlay").on("click touchstart", function (e) {
478    //     e.preventDefault();
479    //     e.stopPropagation();
480
481    //     $(".searchbarHeader").removeClass("open");
482    //     $(this).removeClass("active");
483
484    //     searchbarCloseResults();
485    // });
486
487
488    // // =========================
489    // // GLOBAL SAFETY (NO AUTO CLOSE INSIDE SEARCH AREA)
490    // // =========================
491    // $(document).on("click touchstart", function (e) {
492
493    //     if ($(e.target).closest(".searchbarHeader").length) {
494    //         return;
495    //     }
496    // });
497
498	
499
500	// // $(".searchbarHeader #searchbarHeaderButton").click(function() {
501	// // 	if($(this).parents(".searchbarHeader").hasClass("active") && $('#searchbarInput').val().trim()) {
502	// // 		$(this).parents(".searchbarHeader").removeClass("active");
503	// // 		Search.open();
504	// // 		return;
505	// // 	}
506
507	// // 	$(this).parents(".searchbarHeader").addClass("active");
508	// // 	setTimeout(function() {
509	// // 		$('#searchbarInput').focus();
510	// // 	}, 100);
511	// // });
512
513	// headerResize();
514
515	/* search bar header */
516    $(".searchbarHeader #searchbarHeaderButton").click(function() {
517        $(this).parents(".searchbarHeader").addClass("open");
518		$('.searchbarHeaderOverlay').toggleClass("active");
519        setTimeout(function() {
520            $("#searchbarInput").focus();
521        }, 100);
522    });
523
524	$("#searchbarInput").on('input', function (e) {
525		if ($(this).val() == "") {
526			$(this).removeClass("active");
527			$(this).siblings("#searchbarDelete").removeClass("active");
528			$(this).parents(".searchbarHeaderOpen").find(".searchbarHeaderResults").hide();
529		} else {
530			$(this).addClass("active");
531			$(this).siblings("#searchbarDelete").addClass("active");
532			searchbarFilterCourses();
533			$(this).parents(".searchbarHeaderOpen").find(".searchbarHeaderResults").show();
534		}
535	});
536
537	$("#searchbarDelete").on('click', function (e) {
538		$(this).siblings("#searchbarInput").val("").removeClass("active");
539		$(this).removeClass("active");
540		searchbarCloseResults();
541	});
542
543	$("#searchbarInput").on('keydown', function (e) {
544		var code = (e.keyCode ? e.keyCode : e.which);
545		if(code == 13 && $("#searchbarInput").val().trim()) { //Enter keycode
546			e.preventDefault();
547			Search.open();
548		}
549	});
550
551	$("#searchbarButton").on('click', function (e) {
552		e.preventDefault();
553		Search.open();
554	});
555
556	$(".searchbarHeader #searchbarHeaderButton").click(function() {
557		if($(this).parents(".searchbarHeader").hasClass("active") && $('#searchbarInput').val().trim()) {
558			$(this).parents(".searchbarHeader").removeClass("active");
559			Search.open();
560			return;
561		}
562
563		$(this).parents(".searchbarHeader").addClass("active");
564		setTimeout(function() {
565			$('#searchbarInput').focus();
566		}, 100);
567	});
568
569	headerResize();
570
571	
572}); // end document ready
573
574	// headerResize();
575
576	// $(document).bind("click", function (event) {
577	// 	if (headerResize()) {
578	// 		if (!$(event.target).closest(".searchbarHeader").length && !$(event.target).is("#searchbarInput")) {
579	// 			$(".searchbarHeader").removeClass("open");
580	// 			$('.searchbarHeaderOverlay').removeClass("active");
581	// 			$(".searchbarHeader #searchbarInput").blur();
582	// 		} else {
583	// 			$(".searchbarHeader").addClass("open");
584	// 			$('.searchbarHeaderOverlay').addClass("active");
585	// 		}
586	// 	}
587	// });
588
589	// $(document).on("click touchstart", function (event) {
590
591	// 	if (!headerResize()) return;
592
593	// 	const $target = $(event.target);
594
595	// 	// Klick innerhalb der Searchbar → nichts tun
596	// 	if ($target.closest(".searchbarHeader").length) {
597	// 		return;
598	// 	}
599
600	// 	// Close nur wenn wirklich außerhalb
601	// 	$(".searchbarHeader").removeClass("open");
602	// 	$(".searchbarHeaderOverlay").removeClass("active");
603
604	// 	searchbarCloseResults();
605	// });
606
607	$(document).bind("click", function (event) {
608	if (headerResize()) {
609		if (!$(event.target).closest(".searchbarHeader").length && !$(event.target).is("#searchbarInput")) {
610			$(".searchbarHeader").removeClass("open");
611			$('.searchbarHeaderOverlay').removeClass("active");
612			$(".searchbarHeader #searchbarInput").blur();
613		} else {
614			$(".searchbarHeader").addClass("open");
615			$('.searchbarHeaderOverlay').addClass("active");
616		}
617	}
618});
619
620// class Search {
621// 	static open(query = '#searchbarInput') {
622//     	let val = $(query).val()
623
624//     	if (!val.trim()) {
625//     		return;
626//     	}
627
628//     	$(query).val('');
629//     	$(query).removeClass('active');
630//     	$('#searchbarDelete').removeClass('active');
631// 		searchbarCloseResults();
632//     }
633// }
634
635class Search {
636	static open(query = '#searchbarInput') {
637    	let val = $(query).val()
638
639    	if (!val.trim()) {
640    		return;
641    	}
642
643    	$(query).val('');
644    	$(query).removeClass('active');
645    	$('#searchbarDelete').removeClass('active');
646		searchbarCloseResults();
647    }
648}
649
650
651
652/*** copy purchase link to clipboard ***/
653function copyLink(){
654	  var temp = $("<input>");
655	$(".regCodeWrapper").append(temp);
656   temp.val($('.regCodeInput').text()).select();
657	document.execCommand("copy");
658	temp.remove();
659  }
660
661function languageSwitchAction(element) {
662	$(element).find('.wpmlContainer').fadeToggle(400);
663}
664
665
666/**
667 * Event overview page functions
668 */
669
670function toggleSingleEventDetailsList (element){
671		$(element).find(".dooIcon-arrow-down").toggleClass("active");
672		var thisEventListContent = $(element).parents(".singleEventContent").find(".toggleAdditionalEventInfo");
673		thisEventListContent.toggle();
674}
675
676function filterEventList(element) {
677	$(".singleEvent").show();
678	var courseFilterElement = [];
679	var courseFilterElements = [];
680	let optionInput = $(".eventFilter").find("option");
681	optionInput.each(function () {
682		if ($(this).is(':selected')) {
683			courseFilterElement.push($(this).attr("value"));
684			courseFilterElements = courseFilterElement.filter(function(v){return v!==''});
685		}
686	});
687	$(element).parents(".customSelect").addClass("active");
688	var showIsAvailable = $("#filterIsAvailable");
689	$(".singleEvent").removeClass("active");
690	$(".singleEvent").each(function() {
691		var eventHtml = $(this).html();
692		if ( courseFilterElements.length === 0 ) {
693			$(".singleEvent").show();
694		} else if (courseFilterElements.length === 1 && eventHtml.indexOf(courseFilterElements) >= 0) {
695			$(this).addClass("active");
696		} else if (courseFilterElements.length === 2 && (eventHtml.indexOf(courseFilterElements[0]) >= 0) && (eventHtml.indexOf(courseFilterElements[1]) >= 0)) {
697			$(this).addClass("active");
698		} else {
699			$(this).hide();
700		}
701	});
702	$(".singleEvent").each(function() {
703		if ( showIsAvailable.hasClass("checked") ) {
704			if ( $(this).hasClass("eventIsUnavailable") ){
705				$(this).hide();
706			}
707		}
708	});
709}
710function resetFilterEventList(element) {
711	let thisSelect = $(element).siblings("select");
712	thisSelect.val("");
713	filterEventList();
714	$(element).parents(".customSelect").removeClass("active");
715}
716function filterCheckbox(element) {
717	$(element).toggleClass("checked");
718	filterEventList();
719}
720
721
722/**
723 * Single product page functions
724 */
725
726function toggleEventDetailsList (element){
727	$(element).find(".dooIcon-arrow-down").toggleClass("active");
728	$(element).parents(".tableRow").toggleClass("activeRow");
729	var thisDetailsList = $(element).parents(".tableRow").next(".tableEventDetailsList");
730	thisDetailsList.toggle();
731}
732
733function filterInactiveSeminars(element) {
734	$(element).toggleClass("checked");
735	var showIsAvailable = $("#filterIsAvailable");
736	$(".tableBody .mainTableRow").each(function() {
737		if ( $(this).hasClass('activeRow') ){
738			$(this).find('.tableEventHandle').click();
739		}
740	});
741	$(".tableBody .mainTableRow").show();
742	$(".tableBody .mainTableRow").each(function() {
743		if ( showIsAvailable.hasClass("checked") ) {
744			if ( $(this).find('.availableCircle').hasClass("eventIsUnavailable") ){
745				$(this).hide();
746			}
747		}
748	});
749}
750
751
752
753/**
754 * Participant registration page functions
755 */
756
757function addParticipantForm(element) {
758	$(element).clone().appendTo(".registerParticipantTable").hide();
759	$(element).removeClass('add-row');
760	$(element).find('.add-participant').hide();
761	$(element).find(".add-participant-form").show();
762}
763	
764function addParticipant(element) {
765	var participantFirstName = $(element).parents(".add-participant-form").find("#participant_first_name").val();
766	var participantLastName = $(element).parents(".add-participant-form").find("#participant_last_name").val();
767	var participantEmail = $(element).parents(".add-participant-form").find("#participant_email").val(); 
768	$(element).parents(".add-participant-form").hide();
769	
770	var filledContainer = $(element).parents(".add-participant-form").siblings(".add-participant-filled");
771	filledContainer.show();
772	filledContainer.find(".participantFirstName").html(participantFirstName);
773	filledContainer.find(".participantLastName").html(participantLastName);
774	filledContainer.find(".participantEmail").html(participantEmail);
775	
776	var dataFreePlaces = parseInt($('.eventStatus').attr('data-freeplaces'));
777	if ( $('.registerParticipantRow').length <= dataFreePlaces ) {
778		$(element).parents(".registerParticipantRow").next().show();
779	}
780	
781	var username = participantFirstName + " " + participantLastName;
782	var userId = 101;
783	while ( $(".users[name='users["+ userId +"][firstname]']").length ){
784		userId++;
785	}
786	
787	$(element).parents(".add-participant-form").siblings(".add-participant-filled").find(".registerParticipantInformarion").attr("name", userId);
788	
789	// add user id
790    $(".addToCart").append('<input type="hidden" name="users['+ userId +'][firstname]" class="users" value="'+ participantFirstName +'">');
791	$(".addToCart").append('<input type="hidden" name="users['+ userId +'][lastname]" class="users" value="'+ participantLastName +'">');
792	$(".addToCart").append('<input type="hidden" name="users['+ userId +'][email]" class="users" value="'+ participantEmail +'">');
793	
794	checkParticipantFilled();
795	countQuantity();
796}
797	
798function removeParticipant(element) {
799	var getUserId = $(element).parents(".add-participant-filled").find(".registerParticipantInformarion").attr("name");
800
801	// remove user id
802	$(".addToCart").find(".users[name='users["+ getUserId +"][firstname]']").remove();
803	$(".addToCart").find(".users[name='users["+ getUserId +"][lastname]']").remove();
804	$(".addToCart").find(".users[name='users["+ getUserId +"][email]']").remove();
805	
806	$(element).parents('.registerParticipantRow').remove();
807	$(".registerParticipantRow.add-row").show();
808	checkParticipantFilled();
809	updateParticipant();
810	countQuantity();
811}
812
813function updateParticipant() {
814	var allUsersLenght = $('input.users:not(".selfReg")').length / 3;
815	var allUsersArray = [];
816	$('input.users:not(".selfReg")').each( function() {
817		let thisUserInput = $(this).attr('name').match(/\d+/);
818		allUsersArray.push(thisUserInput[0]);
819	});
820	var uniqueUsersArray = getUniqueArray(allUsersArray);
821	
822	for (var i = 1; i <= uniqueUsersArray.length; i++) {
823		$('[name*=' + uniqueUsersArray[i - 1] + ']').each(function() {
824			var currentName = $(this).attr('name');
825			var newName = currentName.replace(uniqueUsersArray[i - 1], "10" + i);
826			$(this).attr('name', newName);
827		});
828	}
829}
830
831function getUniqueArray(array) {
832	return array.filter(function(value, index, self) {
833		return self.indexOf(value) === index;
834	});
835}
836	
837function countQuantity() {
838	var selectedCustomerCheckbox;
839	if ( $('.selfRegistration').hasClass('addCustomerParticipant')) { 
840		selectedCustomerCheckbox = 1;
841	} else {
842		selectedCustomerCheckbox = 0;
843	};
844	var selectedParticipants = $(".registerParticipantRow").length - 1 + selectedCustomerCheckbox;
845    $(".addToCart .quantity").val(selectedParticipants);
846}
847	
848function checkParticipantFilled() {
849	if ( $(".registerParticipantRow").length > 1 || $('.selfRegistration').is(':checked')){
850		$(".registerParticipantButton").removeClass("inactive");
851		$(".registerParticipantButton").prop("disabled", false);
852	} else {
853		$(".registerParticipantButton").addClass("inactive");
854		$(".registerParticipantButton").prop("disabled", true);
855	}
856}
857	
858function checkParticipantRow(element) {
859	var firstName = $(element).parents(".add-participant-form").find("#participant_first_name");
860	var lastName = $(element).parents(".add-participant-form").find("#participant_last_name");
861    var userEmail = $(element).parents(".add-participant-form").find("#participant_email");
862	var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
863	
864	if ( firstName.val() && lastName.val() && emailRegex.test(userEmail.val()) ){
865		$(element).parents(".add-participant-form").find(".primaryButton").removeClass("inactive");
866	} else {
867		$(element).parents(".add-participant-form").find(".primaryButton").addClass("inactive");
868	}
869}
870
871function addCustomerAsParticipant(element){
872	$(element).toggleClass('addCustomerParticipant');
873	checkParticipantFilled();
874	if ( $(element).hasClass('addCustomerParticipant')) {
875		$(".addToCart").append('<input type="hidden" name="users[self]" class="users selfReg" value="self">');
876	} else {
877		$('.selfReg').remove();
878	}
879	countQuantity();
880}
881
882
883
884
885/**
886 * Account page functions
887 */
888
889function accountShowLogin() {
890    $(".loginChooseWrapper, .loginRegisterWrapper").hide();
891    $(".loginLoginformWrapper").show();
892}
893
894function accountShowRegister() {
895    $(".loginChooseWrapper, .loginLoginformWrapper").hide();
896    $(".loginRegisterWrapper").show();
897}
898
899function accountShowPrivateRegister() {
900    $("#registerFormCompany").hide();
901    $("#registerFormPrivate").show();
902    $(".accountShowPrivateRegister").addClass("active");
903    $(".accountShowCompanyRegister").removeClass("active");
904}
905
906function accountShowCompanyRegister() {
907    $("#registerFormPrivate").hide();
908    $("#registerFormCompany").show();
909    $(".accountShowPrivateRegister").removeClass("active");
910    $(".accountShowCompanyRegister").addClass("active");    
911}
912
913
914
915// Filter Functions
916
917var activeFilters = [];
918
919function addFilter(filterId, filterText) {
920    $(".catalog-courses-wrapper").addClass("activeFilter");
921    $(".filterHead").show();
922    var filterHTML = '<div class="activeFilterHead" id="'+ filterId +'" onclick="removeFilter(\''+ filterId +'\');"><span class="dooIconContainer dooContainerName-cancel userIcon"><i class="dooIcon dooIcon-cancel dooIconSize-16 cancel"></i></span>'+ filterText +'</div>';
923    $(".filterHeadContent").append(filterHTML);
924
925	// if (!activeFilters.hasOwnProperty(classification)) {
926	// 	activeFilters[classification] = [];
927	// }
928
929    activeFilters.push(filterId);
930    //console.log(activeFilters);
931    //$(".catalog-item").hide();
932    
933    var allActiveFilters = "";
934    
935    /* filter AND */
936    for (var i = 0; i < activeFilters.length; i++) {
937        var actualFilter = activeFilters[i];
938        allActiveFilters += "."+actualFilter;        
939    }
940    console.log(allActiveFilters);  
941    $(".catalog-item").removeClass("showFilter");
942    $(".catalog-item"+allActiveFilters).addClass("showFilter");
943
944    
945    /* filter OR */
946    // for (var i = 0; i < activeFilters.length; i++) {
947    //     var actualFilter = activeFilters[i];
948    //     $(".catalog-item."+actualFilter).show().css("display" , "flex");
949    //     $(".catalog-item."+actualFilter).addClass("showFilter");
950    // }
951
952	/* filter twodimensional AND + OR */
953	
954
955	// var filterVariants = 1;
956	// var classificationCounts = [];
957	// for (const [key, value] of Object.entries(activeFilters)) {
958	// 	classificationCounts[key] = value.length;
959	// 	filterVariants = filterVariants * classificationCounts[key];
960	// }
961	// console.log(filterVariants);
962
963	// $(".catalog-item").removeClass("showFilter");
964	// for (var i = 0; i < filterVariants; i++) {
965
966	// 	for (const [key, value] of Object.entries(activeFilters)) {
967
968	// 		for (var i = 0; i < value.length; i++) {
969	// 			var actualFilter = value[i];
970
971	// 		}		
972
973	// 	}
974
975	// 	var actualFilter = value[i];
976	// 	allActiveFilters = allActiveFilters += "."+actualFilter; 
977	// 	$(".catalog-item"+allActiveFilters).addClass("showFilter");
978	// }
979
980
981
982	// for (const [key, value] of Object.entries(activeFilters)) {
983	// 	allActiveFilters = "";
984	// 	for (var i = 0; i < value.length; i++) {
985	// 		var actualFilter = value[i];
986
987	// 		// $(".catalog-item."+actualFilter).show().css("display" , "flex");
988	// 		// $(".catalog-item."+actualFilter).addClass("showFilter");
989	// 		// allActiveFilters += "."+actualFilter; 
990	// 	}		
991		// console.log(allActiveFilters);
992		// $(".catalog-item"+allActiveFilters).addClass("showFilter");
993	// }
994	
995    
996    /* text search */
997    if (textSearch != undefined) {
998        
999    }
1000    
1001    checkNoResults();    
1002    
1003}
1004
1005
1006
1007function removeFilter(filterId, classification) {
1008    $(".filterHead .activeFilterHead#"+filterId).remove();
1009    $(".FilterPunkt.active#"+filterId).removeClass("active");    
1010    
1011    for (var i = 0; i < activeFilters.length; i++) {
1012        if (activeFilters[i] === filterId) {
1013            activeFilters.splice(i, 1);
1014        }
1015    }
1016    
1017    $(".catalog-item."+filterId).removeClass("showFilter");
1018	// $(".catalog-item."+filterId).hide();
1019
1020
1021	// Filter AND
1022	for (var i = 0; i < activeFilters.length; i++) {
1023		var actualFilter = activeFilters[i];
1024		var allActiveFilters = "."+actualFilter;        
1025	}
1026
1027	$(".catalog-item"+allActiveFilters).addClass("showFilter");
1028	//Filter AND End
1029    
1030    // var allActiveFilters = "";
1031    
1032    /* filter AND */
1033    // for (var i = 0; i < activeFilters.length; i++) {
1034    //     var actualFilter = activeFilters[i];
1035    //     allActiveFilters += "."+actualFilter;        
1036    // }
1037    //console.log(allActiveFilters);  
1038    // $(".catalog-item").removeClass("showFilter");
1039    // $(".catalog-item"+allActiveFilters).addClass("showFilter");
1040    
1041    /* filter OR */
1042    // for (var i = 0; i < activeFilters.length; i++) {
1043    //     var actualFilter = activeFilters[i];
1044    //     $(".catalog-item."+actualFilter).show();
1045    //     $(".catalog-item."+actualFilter).addClass("showFilter");
1046    // }
1047    
1048    if ( activeFilters.length <= 0 ) {
1049        $(".catalog-courses-wrapper").removeClass("activeFilter");
1050    }
1051    
1052    if ( activeFilters.length <= 0 && ( textSearch == "" || textSearch == undefined ) ) {
1053        $(".filterHead").hide();
1054    }
1055    
1056    checkNoResults();
1057    
1058}
1059
1060// Test für Und Filterung zwischen verscheidenen Filtergruppen
1061
1062// var activeFilters = [];
1063
1064// function addFilter(filterId, filterText) {
1065//     $(".catalog-courses-wrapper").addClass("activeFilter");
1066//     $(".filterHead").show();
1067//     var filterHTML = '<div class="activeFilterHead" id="'+ filterId +'" onclick="removeFilter(\''+ filterId +'\');"><span class="dooIconContainer dooContainerName-cancel userIcon"><i class="dooIcon dooIcon-cancel dooIconSize-16 cancel"></i></span>'+ filterText +'</div>';
1068//     $(".filterHeadContent").append(filterHTML);
1069    
1070//     activeFilters.push(filterId);
1071//     //console.log(activeFilters);
1072//     //$(".catalog-item").hide();
1073    
1074//     var allActiveFilters = "";
1075    
1076//     /* filter AND */
1077//     for (var i = 0; i < activeFilters.length; i++) {
1078//         var actualFilter = activeFilters[i];
1079//         allActiveFilters += "."+actualFilter;        
1080		    
1081//     /* filter OR */
1082// 		$(".filterContent").ech(function(index) {
1083// 			for (var j = 0; j < activeFilters.length; j++) {
1084// 			var actualFilter = activeFilters[i];
1085// 			$(".catalog-item."+actualFilter).show();
1086// 			$(".catalog-item."+actualFilter).addClass("showFilter");
1087// 			}
1088// 		});
1089//     }
1090//     console.log(allActiveFilters);  
1091//     $(".catalog-item").removeClass("showFilter");
1092//     $(".catalog-item"+allActiveFilters).addClass("showFilter");
1093        
1094
1095    
1096//     /* text search */
1097//     if (textSearch != undefined) {
1098        
1099//     }
1100    
1101//     checkNoResults();    
1102    
1103// }
1104
1105
1106function removeTextSearch() {
1107    $(".catalog-courses-wrapper .catalog-item.showFilterText").removeClass("showFilterText");
1108    $("#textSearchInput").val("");
1109    $(".activeTextSearch").hide();
1110    $(".catalog-courses-wrapper").removeClass("activeTextFilter");
1111    if ( activeFilters.length <= 0 ) {
1112        $(".catalog-courses-wrapper").removeClass("activeFilter");
1113        $(".filterHead").hide();
1114    }
1115    checkNoResults();
1116}
1117
1118
1119
1120
1121
1122function textSearchFunction(element) {
1123    textSearch = $(element).val();
1124    
1125    //clearTimeout(delayTimer);
1126    //delayTimer = setTimeout(function() {
1127    
1128
1129        $(".catalog-courses-wrapper").addClass("activeTextFilter");
1130
1131        // Retrieve the input field text and reset the count to zero
1132        var filter = $(element).val();
1133        var count = 0;
1134
1135        // Loop through the comment list
1136        $('.catalog-courses-wrapper .catalog-item').each(function () {
1137            // If the list item does not contain the text phrase fade it out
1138            if ($(this).text().search(new RegExp(filter, "i")) < 0) {
1139                $(this).removeClass("showFilterText");
1140                // Show the list item if the phrase matches and increase the count by 1
1141            }
1142            else {
1143                $(this).addClass("showFilterText");
1144                count++;
1145            }
1146        });
1147
1148        if (textSearch != "") {
1149            $(".filterHead").show();
1150            $(".activeTextSearch").show();
1151            $(".activeTextSearch").text(textSearch);
1152		}
1153
1154        if ( activeFilters.length <= 0 && ( textSearch == "" || textSearch == undefined ) ) {
1155            $(".filterHead").hide();
1156        }
1157    
1158        checkNoResults();
1159
1160	//}, 400);
1161
1162}
1163
1164
1165function checkNoResults() {
1166    if ( $(".catalog-item").is(":visible") ) {
1167        $(".filter-no-results").hide();
1168    } else {
1169        $(".filter-no-results").show();
1170    }
1171
1172
1173
1174      //addFilter("text-search", "Suche:"+ textSearch);                    
1175        //}
1176
1177        if ( textSearch == "" || textSearch == undefined ) {
1178            $(".catalog-courses-wrapper").removeClass("activeTextFilter");
1179            $(".activeTextSearch").hide();
1180        }
1181}
1182
1183
1184
1185	function showRequest() {
1186			$(".seminarCustomRequestFormular").show();
1187		}
1188
1189
1190
1191
1192function searchbarFilt
1192erCourses() {
1193	var inputValue = $("#searchbarInput").val();
1194    var searchResults = $(".searchbarHeaderOpen").find(".searchResultRow:not(.no-results)");
1195
1196	if (inputValue != "") {
1197		searchResults.each(function() {
1198			var searchResultName = $(this).attr("data-name");
1199			if (searchResultName.toLowerCase().includes(inputValue.toLowerCase())) {
1200				$(this).css('display', 'block');
1201				$(this).addClass('activeResult');
1202				$(this).removeClass('lastResult');
1203			} else {
1204				$(this).css('display', 'none');
1205				$(this).removeClass('activeResult');
1206			}
1207		});
1208
1209		var foundResults = $(".searchbarHeaderOpen").find(".activeResult");
1210		if (foundResults.length == 0) {
1211			$(".searchbarHeaderOpen").find(".searchResultRow.no-results").css('display', 'block');
1212		} else {
1213			$(".searchbarHeaderOpen").find(".searchResultRow.no-results").css('display', 'none');
1214			foundResults.each(function(index) {
1215				if (index === foundResults.length - 1) {
1216					$(this).addClass('lastResult');
1217				}
1218			});
1219		}
1220	}
1221}
1222
1223function searchbarCloseResults(){
1224	var allSearchResults = $(".searchbarHeaderOpen").find(".searchResultRow");
1225	allSearchResults.each(function() {
1226		$(this).css('display', 'none');
1227	});
1228}
1229
1230function headerResize() {
1231	var innerNavWidth = $('#headerLinks').width();
1232	var searchbarWidth = $('.searchbarHeaderOpen').width();
1233	var navMenueWidth = $('.main_nav').width();
1234	var actualNavWidth = searchbarWidth + navMenueWidth;
1235	var windowWidth = $(window).width();
1236
1237	if ( windowWidth > 930 ) {
1238		if ((actualNavWidth + 300) < innerNavWidth) {
1239			$(".searchbarHeader").addClass("open");
1240			return false;
1241		} else {
1242			$(".searchbarHeader").removeClass("open");
1243			return true;
1244		}
1245	} else {
1246		return true;
1247	}
1248}
1249
1250// function headerResize() {
1251// 	var windowWidth = $(window).width();
1252// 	if ( windowWidth > 600 ) {
1253// 		$(".searchbarHeader").addClass("open");
1254// 			return false;
1255// 	} else {
1256// 		$(".searchbarHeader").removeClass("open");
1257// 		return true;
1258// 	}
1259// }
1260
1261
1262let headerWidth = false;
1263
1264function headerResize() {
1265	var windowWidth = window.innerWidth;
1266
1267	if (windowWidth > 600) {
1268		$(".searchbarHeader").addClass("open");
1269		headerWidth = true;
1270	} else {
1271		// Nur beim Übergang von groß → klein einmal schließen
1272		if (headerWidth) {
1273			$(".searchbarHeader").removeClass("open");
1274		}
1275		headerWidth = false;
1276	}
1277}
1278
1279$(document).on('click', function(e) {
1280	if (window.innerWidth <= 600) {
1281		if (!$(e.target).closest('.searchbarHeader').length) {
1282			$('.searchbarHeader').removeClass('open');
1283			$('.searchbarHeaderOverlay').removeClass('active');
1284		}
1285	}
1286});
1287
1288$(window).resize(headerResize);
1289
1290
1291document.addEventListener('DOMContentLoaded', function () {
1292  document.querySelectorAll('.swiper-slide .catalog-item-price').forEach(function (el) {
1293    var text = el.textContent.trim();
1294    // fängt "0€", "0 €", "0,00 €" usw. ab
1295    if (/^0([.,]0+)?\s*€?$/.test(text)) {
1296      el.textContent = 'Auf Anfrage';
1297    }
1298  });
1299});

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.