PageSourceSearch

https://www.alfred-delp-studiennetzwerk.org/_assets/b4d01d375a6833188ae8909cf4264f83/Js/app.js?1791441221

js alfred-delp-studiennetzwerk.org collected 2026-10-08 06:44:01 UTC 15,748 bytes, 531 lines download raw bytes

1var flipbook = null;
2$.fn.equalizeHeight = function() {
3	var maxHeight = 0, itemHeight;
4	for (var i = 0; i < this.length; i++) {
5		itemHeight = $(this[i]).height('auto').outerHeight(true);
6		if (maxHeight < itemHeight) {
7			maxHeight = itemHeight;
8		}
9	}
10	return this.height(maxHeight);
11};
12
13$.fn.isInViewport = function() {
14	var elementTop = $(this).offset().top;
15	var elementBottom = elementTop + $(this).outerHeight();
16
17	var viewportTop = $(window).scrollTop();
18	var viewportBottom = viewportTop + $(window).height();
19
20	return elementBottom > viewportTop && elementTop < viewportBottom;
21};
22
23function once(fn, context) {
24	var result;
25	return function() {
26		if(fn) {
27			result = fn.apply(context || this, arguments);
28			fn = null;
29		}
30		return result;
31	};
32}
33
34function resizeMasonryItem(item){
35  var grid = item.closest('.condolences-masonry');
36
37  var rowHeight = parseInt(window.getComputedStyle(grid[0]).getPropertyValue('grid-auto-rows'));
38  var rowGap = parseInt(window.getComputedStyle(grid[0]).getPropertyValue('grid-row-gap'));
39  var rowSpan = Math.ceil((item.find('.gray-bg')[0].getBoundingClientRect().height+rowGap)/(rowHeight+rowGap));
40  item.css("grid-row-end", "span " + rowSpan);
41}
42
43function resizeAllMasonryItems(){
44  $('.condolences-masonry > div').each(function(){
45  	resizeMasonryItem($(this));
46  });
47}
48
49jQuery(document).ready(function() {
50
51	resizeAllMasonryItems();
52
53	$( window ).resize(function() {
54  		resizeAllMasonryItems();
55  		resizeFlipBook();
56	});
57
58	// mobile menu
59	// mobile nav
60	$('.off-canvas .mobile-menu ul, .off-canvas .mobile-menu ul ul').parent().addClass('has-dropdown');
61	$('.off-canvas .mobile-menu .has-dropdown > a').on('click', function(event){
62		event.preventDefault();
63
64		$(this).parent().toggleClass('open').siblings().removeClass('open');
65	});
66
67	// Home-Page More Button behavior
68	jQuery(".home_news .news-list .more-link").click(function(e){
69		if (Foundation.MediaQuery.current =='small' || Foundation.MediaQuery.current =='msmall') {
70			var container = jQuery(this).parents(".news-list");
71			if (!container.hasClass("expanded")) {
72				container.addClass("expanded");
73				e.preventDefault();
74			}
75		}
76	});
77
78
79
80	/**
81	 * =============== MEGA MENU ==============
82	 */
83	// equalize stuff in megamenu
84	var equalizeMegaMenuHeights=function() {
85		$(".level1-item .mega-container-innerWrap").each(function(){
86			var height=$(this).find(".submenu, .teaser-content > *:lt(2)").equalizeHeight().height();
87			$(this).find(".submenu").height((parseInt(height)+parseInt($(this).find(".teaser-content > *:lt(2)").first().css("padding-top")))+"px");
88		});
89	};
90	equalizeMegaMenuHeights();
91	// hover submenu
92	$(".level2-item").hover (
93		function() {
94			var $subheight = $(this).find('.submenu2').height();
95			var $calcheight = $(this).closest('.submenu').height();
96			//console.log("hier: " + $subheight + " und " + $calcheight);
97			if ($subheight > $calcheight) {
98				$(this).closest('.submenu').height($subheight);
99			} else {
100				$(this).find('.submenu2').height($calcheight);
101			}
102			$(this).addClass('menu-out').siblings().removeClass('menu-out');
103		}, function() {
104			$(this).removeClass('menu-out');
105		}
106	);
107
108
109	/**
110	 * =============== SEARCH FLYOUT ==============
111	 */
112	$("#header-search-button").on('click', function(event){
113		event.preventDefault();
114		event.stopPropagation();
115		jQuery(".search-bar-wrapper").toggleClass('open');
116		if (jQuery(".search-bar-wrapper").hasClass('open')) {
117			jQuery("#sword").focus();
118			jQuery("header.header").addClass("locked");
119		}
120	});
121	jQuery("#sword").click(function(e) {
122		e.stopPropagation();
123	});
124	jQuery("body").click(function(e) {
125		if (jQuery("header.header").hasClass("locked")) {
126			jQuery("header.header").removeClass("locked");
127			jQuery(".search-bar-wrapper").removeClass("open");
128		}
129	});
130	var fetchAutocomplete = function(query,sync,async) {
131		if (query && query.length>2) {
132			jQuery.ajax({
133				url: '/?eID=tx_solr_suggest&id=1000',
134				dataType: 'json',
135				data: {
136					termLowercase: query.toLowerCase(),
137					termOriginal: query,
138				},
139				success: function(data) {
140					var suggests=[];
141					jQuery(".search-suggest-list").empty();
142					jQuery.each(data,function(key,value) {
143						suggests.push(key);
144					});
145					async(suggests);
146				}
147			});
148		}
149	};
150	$('#sword').typeahead(null, {
151		hint: true,
152		highlight: true,
153		minLength: 1,
154		source: fetchAutocomplete
155	});
156	$('#sword').bind('typeahead:select', function(ev, suggestion) {
157		jQuery(".search-form").submit();
158	});
159
160	/**
161	 *  ============= PUBLICATION ORDER FORM ============
162	 */
163	if($('#show-pub-orderform').length > 0){
164		$('#show-pub-orderform').click(function(e){
165			e.preventDefault();
166			$('#publication-orderform').slideDown();
167			$('#show-pub-orderform').parents('.more-link-container').css("visibility","hidden");
168		});
169		$('#close-button-pub-form').click(function(){
170			$('#publication-orderform').slideUp('fast', function(){
171				$('#show-pub-orderform').parents('.more-link-container').css("visibility","visible");
172			});
173
174		});
175	}
176
177	/**
178	 * =============== ORBIT SLIDERS ==============
179	 */
180	var firstBackImage = $(".four-pillars.orbit .orbit-slide").first().attr('data-back-img');
181	if (firstBackImage) {
182		$(".four-pillars.orbit").closest("[name^='c']").css("background-image", 'url("'+firstBackImage+'")');
183	}
184	var sliderCounterCallbackSelectors=[".home-slider.orbit, .news-detail-slider.orbit"];
185	var sliderCounterCallback = function(e) {
186		var slider=jQuery(e.target);
187		var numElements = slider.find(".slide").length;
188		var activeElement = slider.find(".slide.is-active").index();
189		slider.find(".slide-info").html((activeElement+1) + " / " + numElements);
190	};
191	var sliderChangeTitleCallbackSelectors=[".four-pillars.orbit"];
192	var sliderChangeTitleCallback = function(e) {
193		var slider = jQuery(e.target);
194		var activeElement = slider.find(".slide.is-active").index();
195		var nextElementTitle = slider.find("li:eq("+((activeElement+1)%4)+") .pillar-content-title a").html();
196		var backImage = slider.find('.slide.is-active').attr('data-back-img');
197		if (!nextElementTitle) {
198			nextElementTitle = slider.find("li:eq("+((activeElement+1)%4)+") .pillar-content-title").html();
199		}
200		if (backImage) {
201			$(".four-pillars.orbit").closest("[name^='c']").css("background-image", 'url("'+backImage+'")');
202		}
203		jQuery("#replace-slider-next").html(nextElementTitle);
204		// As we have several orbit-bullets for mobile and desktop view we have to update all with "is-active" class:
205		$(".four-pillars.orbit .orbit-bullets *[data-slide='" + activeElement + "']").addClass('is-active');
206	};
207	jQuery(sliderCounterCallbackSelectors.join()).bind("slidechange.zf.orbit", sliderCounterCallback);
208	jQuery(sliderChangeTitleCallbackSelectors.join()).bind("slidechange.zf.orbit", sliderChangeTitleCallback);
209
210	$(window).on('changed.zf.mediaquery', function(event, newSize, oldSize) {
211		equalizeMegaMenuHeights();
212		var reloadSelectors = [".home-slider.orbit",".news-detail-slider.orbit",".four-pillars.orbit"];
213		jQuery.each(reloadSelectors, function(index,selector) {
214			if (jQuery(selector).length >0) {
215				jQuery(selector).foundation('destroy');
216				jQuery(selector).show();
217				jQuery(selector).find("*:not(:visible)").show();
218				jQuery(selector).find("*[style]").removeAttr("style");
219				jQuery(selector).find(".is-active").removeClass(".is-active");
220
221				new Foundation.Orbit(jQuery(selector), {
222						//useMUI: false,
223						//bullets: true,
224						//autoPlay: true,
225						//boxOfBullets: 'orbit-bullets'
226				});
227			};
228		});
229		jQuery(sliderCounterCallbackSelectors.join()).bind("slidechange.zf.orbit", sliderCounterCallback);
230		jQuery(sliderChangeTitleCallbackSelectors.join()).bind("slidechange.zf.orbit", sliderChangeTitleCallback);
231	});
232	/**
233	 * =============== CALENDAR SLIDER ==============
234	 */
235	var calSlider = null;
236	var reloadCalSlider=function(size) {
237		if (jQuery("#cal-slider").length) {
238			if (calSlider) {
239				jQuery("#cal-slider").foundation('destroy').show();
240				calSlider = null;
241				jQuery("#cal-slider").find("*:not(:visible)").show();
242				jQuery("#cal-slider").find("*[style]").removeAttr("style");
243				$('#cal-slider > .orb-cont.orbit-container').removeClass('orbit-container').find('.orbit-slide').removeClass('orbit-slide');
244			}
245			if (size == "small" || size == "msmall") {
246				if (!calSlider) {
247					$('#cal-slider > .orb-cont').addClass('orbit-container').find(' > .cal-item-container').addClass('orbit-slide');
248					calSlider = new Foundation.Orbit(jQuery("#cal-slider"), {
249						useMUI: false,
250						bullets: true,
251						autoPlay: true,
252						boxOfBullets: 'orbit-bullets'
253					});
254				}
255			}
256		}
257	};
258	reloadCalSlider(Foundation.MediaQuery.current);
259	$(window).on('changed.zf.mediaquery',function(event, newSize, oldSize) {
260		reloadCalSlider(newSize);
261	});
262	/**
263	 * =============== SLICK SLIDER ==============
264	 */
265	$('.slick-blog-authors').slick({
266	  dots: false,
267	  arrows: true,
268	  infinite: true,
269	  speed: 300,
270	  slidesToShow: 1,
271	  slidesToScroll: 1,
272	  mobileFirst: true,
273	  responsive: [
274	    {
275	      breakpoint: 1199,
276	      settings: {
277	        slidesToShow: 5
278	      }
279	    },
280	    {
281	      breakpoint: 991,
282	      settings: {
283	        slidesToShow: 4
284	      }
285	    },
286	    {
287	      breakpoint: 767,
288	      settings: {
289	        slidesToShow: 3
290	      }
291	    },
292		  {
293			  breakpoint: 558,
294			  settings: {
295				  slidesToShow: 2
296			  }
297		  }
298	  ]
299	});
300	/**
301	 * =============== OUR MEMBERS ==============
302	 */
303	$('.our-members-list-filter a').click(function(){
304		var thisEl = $(this).closest('.our-members-list');
305		thisEl.find('.our-members-list-filter a').removeClass('active');
306		$(this).addClass('active');
307		var categoryId = $(this).attr("data-id");
308
309		if(categoryId=="0") {
310			thisEl.find('.our-members-list-col').show();
311		} else {
312			thisEl.find('.our-members-list-col').hide();
313			thisEl.find('.our-members-list-col').each(function(){
314				var categories = $(this).attr("data-categories").split(",");
315				if(jQuery.inArray(categoryId, categories) !== -1) {
316					$(this).show();
317				}
318			});
319		}
320
321		return false;
322	});
323
324	/**
325	 * =============== CALENDAR FANCY BOX ==============
326	 */
327	jQuery("#responsive-calendar .event a.eventLink").fancybox({
328		type:'ajax',
329		padding: 0,
330		maxWidth	: 800,
331		maxHeight	: 600,
332		fitToView	: false,
333		width		: '50%',
334		height		: '70%',
335		autoSize	: false,
336		topRatio	: 0.6,
337		closeClick	: false,
338		openEffect	: 'none',
339		closeEffect	: 'none',
340		wrapCSS		: 'fancy-calendar',
341		title		: ' ',
342		closeBtn:true,
343		tpl: {
344			closeBtn: '<a title="Close" class="fancybox-item fancybox-close close-btn" href="javascript:;">X</a>'
345		},
346		helpers: {
347			overlay: {
348				locked: false
349			}
350		},
351		beforeLoad: function() {
352			if (Foundation.MediaQuery.atLeast('large')) {
353				return true;
354			} else {
355				var href = jQuery(this).get(0).href;
356				var clickedObj = jQuery("#responsive-calendar a[href='"+href+"']");
357				jQuery.ajax(href,{
358					success:function(data) {
359						jQuery("#responsive-calendar .ajax-container").empty();
360						jQuery("#responsive-calendar li.day.opened").removeClass("opened");
361						jQuery(clickedObj).parents("li.day").addClass("opened").find(".ajax-container").html(data);
362					}
363				});
364				return false;
365			}
366		}
367	});
368	jQuery("#responsive-calendar li .close-me").click(function(e) {
369		jQuery(this).parents(".opened").removeClass("opened");
370	});
371
372	/**
373	 * ======================= Videos Fancy Box ==================
374	 */
375	jQuery(".fancybox-open-iframe").fancybox({
376		type:'iframe',
377		tpl: {
378			closeBtn: '<a title="Close" class="fancybox-item fancybox-close close-btn" href="javascript:;">X</a>'
379		},
380		wrapCSS		: 'fancy-video',
381		helpers: {
382			overlay: {
383				locked: false
384			}
385		}
386	});
387
388	/**
389	 * =============== CALENDAR FILTER STATES ==============
390	 */
391
392	var setCalendar=function(uid) {
393		if (uid !== 'all') {
394		jQuery("#responsive-calendar .event:not([data-calendar="+uid+"])").hide();
395		jQuery("#responsive-calendar .event[data-calendar="+uid+"]").show();
396		} else {
397			jQuery("#responsive-calendar .event").show();
398		}
399
400		var title=jQuery(".calendar-filter[data-uid="+uid+"]").addClass("active").html();
401		jQuery("#responsive-calendar .calendar-opener").html(title);
402		$(".menu.calendars").removeClass('open');
403	};
404	jQuery("#responsive-calendar .calendar-filter").click(function(e) {
405		jQuery(".calendar-filter").removeClass("active");
406		jQuery(this).addClass("active");
407		var calendarUid = jQuery(this).data('uid');
408		jQuery.cookie('active-calendar',calendarUid);
409		setCalendar(calendarUid);
410	});
411	var calendarUid = jQuery.cookie('active-calendar');
412	if (!calendarUid) {
413		calendarUid=jQuery(".calendars .calendar-filter").first().data('uid');
414		jQuery.cookie('active-calendar', calendarUid);
415	}
416	setCalendar(calendarUid);
417	jQuery(".calendar-opener").click(function() {
418		$(".menu.calendars").toggleClass('open');
419	});
420
421	/**
422	 * =============== TABS JESUITEN ==============
423	 */
424	jQuery(".tabbed-news-list .tabheader a.tab-handle").click(function(e) {
425		e.preventDefault();
426		var container = jQuery(this).parents(".tabbed-news-list");
427		jQuery(".tabheader .tab.active").removeClass("active");
428		jQuery(this).parents(".tab").addClass("active");
429		var target = jQuery(this).data("tab-target");
430		container.find(".tabcontents .active").removeClass("active");
431		container.find("."+target).addClass("active");
432	});
433
434	/**
435	 * =============== FLIPBOOK ==============
436	 */
437	function resizeFlipBook() {
438		let display = 'single';
439		let width = window.innerWidth-40;
440		let height = window.innerHeight;
441
442		width = Math.min(1102, width);
443		height = Math.min(790, width/1120*790);
444
445		if(width >= 768) {
446			display = 'double';
447		} else {
448			height = height * 2;
449		}
450		let $flipbook = $(".flipbook");
451		if($flipbook.length > 0) {
452			$flipbook.turn('display', display);
453			$flipbook.turn('size', width, height);
454			$flipbook.turn('resize');
455		}
456	}
457	jQuery(".publication-wrapper .pillar-logo, .publication-current .pub-cover").click(function(e) {
458
459		$('.flipbook-lazy').each(function(){
460			var imgSrc = $(this).data("src");
461			$(this).attr("src", imgSrc);
462		});
463
464		if (!flipbook) {
465			flipbook = jQuery(".flipbook").show().turn();
466			resizeFlipBook();
467			jQuery(".flipbook-wrapper").addClass('open');
468			jQuery(".flipbook-close a").click(function(e) {
469				e.preventDefault();
470				jQuery(".flipbook-wrapper").hide();
471			});
472			jQuery(".flipbook-control.control-left").click(function() {flipbook.turn('previous')});
473			jQuery(".flipbook-control.control-right").click(function() {flipbook.turn('next');});
474		} else {
475			jQuery(".flipbook-wrapper").show();
476		}
477
478	});
479	if (jQuery.cookie('public-form-open')=='1') {
480		jQuery("#publication-orderform").show();
481		$('#show-pub-orderform').parents('.more-link-container').css("visibility","hidden");
482	}
483	jQuery("#show-pub-orderform").click(function() {
484		jQuery.cookie('public-form-open','1');
485	});
486	jQuery("#close-button-pub-form").click(function() {
487		jQuery.cookie('public-form-open','0');
488	});
489
490	/**
491	 * =============== coutnUp ==============
492	 */
493	var initCount = once(function() {
494		var countOptions = {
495			useEasing: true,
496			useGrouping: true,
497			separator: '.',
498			decimal: ','
499		};
500		jQuery('.numbers .count').each( function(i, e){
501			var number = jQuery(this).attr('data-count');
502			var demo = new CountUp(e, 0, number, 0, 4, countOptions);
503			if (!demo.error) {
504				demo.start();
505			} else {
506				console.error(demo.error);
507			}
508		});
509	});
510	if (jQuery('.numbers .count').length > 0) {
511		if (jQuery('.numbers').isInViewport()) {
512			initCount();
513		} else {
514			jQuery(window).on('resize scroll', function(){
515				if (jQuery('.numbers').isInViewport()) {
516					initCount();
517				}
518			});
519		}
520	}
521
522	/**
523	 * =============== Accordion ==============
524	 */
525
526	var accordion = new Foundation.Accordion(jQuery('.accordion'));
527});
528
529$(function($) {
530    $("img.lazy").Lazy();
531});

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.