PageSourceSearch

https://www.dorsten.de/_Resources/Static/Packages/DigiPublica.Plat…/JavaScript/digipublica.js?bust=1ac8b29c

js dorsten.de collected 2026-10-01 11:52:44 UTC 41,571 bytes, 1,219 lines download raw bytes

1/*
2       ___       _             __    ___                _
3  ____/ (_)___ _(_)___  __  __/ /_  / (_)________ _    (_)____
4 / __  / / __ `/ / __ \/ / / / __ \/ / / ___/ __ `/   / / ___/
5/ /_/ / / /_/ / / /_/ / /_/ / /_/ / / / /__/ /_/ /   / (__  )
6\__,_/_/\__, /_/ .___/\__,_/_.___/_/_/\___/\__,_(_)_/ /____/
7       /____/ /_/                                /___/
8*/
9
10/* -----------------------------------------------
11SCROLLKEEPER
12----------------------------------------------- */
13/*
14document.addEventListener("DOMContentLoaded", function(event) {
15    var scrollpos = localStorage.getItem('scrollpos');
16    if (scrollpos) window.scrollTo(0, scrollpos);
17});
18
19window.onbeforeunload = function(e) {
20    localStorage.setItem('scrollpos', window.scrollY);
21};
22*/
23/* -----------------------------------------------
24STICKY
25----------------------------------------------- */
26
27jQuery(window).scroll(function() {
28  if (jQuery(this).scrollTop() > 1) {
29    jQuery("header").addClass("is-sticky");
30  }
31  else{
32    jQuery("header").removeClass("is-sticky");
33  }
34});
35
36/* -----------------------------------------------
37SEARCH-TOGGLE
38----------------------------------------------- */
39
40jQuery(document).ready(function(){
41  jQuery(".search-toggle").click(function(){
42    jQuery(this).toggleClass("active");
43    jQuery(this).next().toggleClass("active");
44  });
45});
46
47/* -----------------------------------------------
48OFFCANVAS-TABINDEX
49----------------------------------------------- */
50
51jQuery(window).on("resize", function () {
52    if ($(window).width() >= 1350) {
53        jQuery(".offcanvas-toggle").attr("tabindex", "-1");
54        jQuery(".offcanvas a").attr("tabindex", "-1");
55    } else {
56        jQuery(".offcanvas-toggle").removeAttr("tabindex");
57        jQuery(".offcanvas a").removeAttr("tabindex");
58    }
59}).resize();
60
61
62/* -----------------------------------------------
63OFFCANVAS-SUBMENU
64----------------------------------------------- */
65
66jQuery(document).ready(function(){
67  jQuery(".offcanvas .open-submenu").click(function(){
68    jQuery(this).next("ul").addClass("active");
69    jQuery(this).parent().parent().addClass("previous");
70  });
71  jQuery(".offcanvas .navigation-item--previous").click(function(){
72    jQuery(this).parent("ul").removeClass("active");
73    jQuery(this).parent().parent().parent().removeClass("previous");
74  });
75  jQuery(".offcanvas .navigation-item--state-current").parents("ul").addClass("active");
76  jQuery(".offcanvas .navigation-item--state-current").parents("ul").addClass("previous");
77  jQuery(".offcanvas .navigation-item--state-current").parent("ul").removeClass("previous");
78});
79
80/*
81
82       ___       _             __    ___                _     
83  ____/ (_)___ _(_)___  __  __/ /_  / (_)________ _    (_)____
84 / __  / / __ `/ / __ \/ / / / __ \/ / / ___/ __ `/   / / ___/
85/ /_/ / / /_/ / / /_/ / /_/ / /_/ / / / /__/ /_/ /   / (__  ) 
86\__,_/_/\__, /_/ .___/\__,_/_.___/_/_/\___/\__,_(_)_/ /____/  
87       /____/ /_/                                /___/        
88
89
90 Version: 1.4.4
91  Author: digiPublica
92 Website: https://www.digipublica.de
93    Desc: digiPublica Basic JS for Default NodeTypes
94
95*/
96
97/* -----------------------------------------------
98SLIDE TO ANCHOR
99----------------------------------------------- */
100
101$('body').on('click', 'a[href^="#"]', function(e) {
102  var headerHeight = jQuery('.header-wrap').outerHeight();
103
104  var linkTitle = jQuery(this).attr('href');
105  var strip = '#';
106  var linkTitleStrip = linkTitle.replace(strip,'');
107  var linkTarget = '#' + linkTitleStrip;
108  e.preventDefault();
109  jQuery('html, body').animate({
110      scrollTop: $(linkTarget).offset().top - headerHeight - 25
111  }, 1000);
112});
113
114jQuery(window).load(function() {
115  if(window.location.hash) {
116    var headerHeight = jQuery('.header-wrap').outerHeight();
117    var linkTarget = window.location.hash;
118    jQuery('html, body').animate({
119        scrollTop: $(linkTarget).offset().top - headerHeight - 25
120    }, 1000);
121  }
122});
123
124/* -----------------------------------------------
125ACCORDION
126----------------------------------------------- */
127
128$(function() {
129  var header = $(".header-wrap").height();
130  $("body:not(.neos-backend) .accordion").accordion({
131    collapsible: true,
132    active: false,
133    heightStyle: "content",
134    activate: function( event, ui ) {
135        if(!$.isEmptyObject(ui.newHeader.offset())) {
136            $('html:not(:animated), body:not(:animated)').animate({ scrollTop: ui.newHeader.offset().top - header }, 500, 'easeInOutCubic');
137        }
138    }
139  });
140});     
141
142/* -----------------------------------------------
143INPUTFILTER
144----------------------------------------------- */
145
146jQuery("#search-filter").keyup(function() {
147var plz = jQuery("#search-filter").val();
148applyFilter(plz);
149});
150
151window.onload = function () {
152  var url = new URL(window.location.href);
153  var fType = url.searchParams.get("search");        
154  if (fType) {applyFilter(fType);}
155  document.getElementById('search-filter').value = fType;
156}
157
158function applyFilter(fType) {
159  jQuery(".filterable > tr, .filterable > li, .filterable.pageteaser-teaser").each(function() {
160    if(jQuery(this).text().toLowerCase().indexOf(fType.toLowerCase()) > -1) {
161      jQuery(this).show();
162    } else {
163      jQuery(this).hide();
164    }        
165  });        
166}
167
168/* -----------------------------------------------
169IMAGEGALLERY
170----------------------------------------------- */
171
172$('.imagegallery-expander a').click(function() {
173$(this).parent().prev().toggleClass("opened");
174if ($(this).parent().prev(".opened").length) {
175  $(this).find("span").html("Weniger Bilder anzeigen");
176} else {
177  $(this).find("span").html("Alle Bilder anzeigen");
178}
179});
180
181/* -----------------------------------------------
182COPYRIGHT TOGGLE
183----------------------------------------------- */
184
185jQuery(document).ready(function(){
186  jQuery(".copyright-toggle").click(function(){
187    jQuery(this).next(".copyright-banner").toggleClass("opened");
188  });
189  jQuery(".copyright-close").click(function(){
190    jQuery(this).parents(".copyright-banner").toggleClass("opened");
191  });
192});
193
194/* -----------------------------------------------
195TYPEWRITER SEARCH
196----------------------------------------------- */
197
198jQuery(document).ready(function(){
199    var TxtType = function(el, toRotate, period) {
200            this.toRotate = toRotate;
201            this.el = el;
202            this.loopNum = 0;
203            this.period = parseInt(period, 10) || 3000;
204            this.txt = '';
205            this.tick();
206            this.isDeleting = false;
207        };
208
209        TxtType.prototype.tick = function() {
210            var i = this.loopNum % this.toRotate.length;
211            var fullTxt = this.toRotate[i];
212
213            if (this.isDeleting) {
214            this.txt = fullTxt.substring(0, this.txt.length - 1);
215            } else {
216            this.txt = fullTxt.substring(0, this.txt.length + 1);
217            }
218
219            this.el.innerHTML = jQuery(".typewrite").attr("placeholder", this.txt);
220
221            var that = this;
222            var delta = 200 - Math.random() * 100;
223
224            if (this.isDeleting) { delta /= 2; }
225
226            if (!this.isDeleting && this.txt === fullTxt) {
227            delta = this.period;
228            this.isDeleting = true;
229            } else if (this.isDeleting && this.txt === '') {
230            this.isDeleting = false;
231            this.loopNum++;
232            delta = 500;
233            }
234
235            setTimeout(function() {
236            that.tick();
237            }, delta);
238        };
239
240        window.onload = function() {
241            var elements = document.getElementsByClassName('typewrite');
242            for (var i=0; i<elements.length; i++) {
243                var toRotate = elements[i].getAttribute('data-type');
244                var period = elements[i].getAttribute('data-period');
245                if (toRotate) {
246                  new TxtType(elements[i], JSON.parse(toRotate), period);
247                }
248            }
249        };
250});
251
252/* -----------------------------------------------
253LIGHTBOX
254----------------------------------------------- */
255
256/*!
257 * Lightbox v2.11.3
258 * by Lokesh Dhakar
259 *
260 * More info:
261 * http://lokeshdhakar.com/projects/lightbox2/
262 *
263 * Copyright Lokesh Dhakar
264 * Released under the MIT license
265 * https://github.com/lokesh/lightbox2/blob/master/LICENSE
266 *
267 * @preserve
268 */
269
270// Uses Node, AMD or browser globals to create a module.
271(function (root, factory) {
272    if (typeof define === 'function' && define.amd) {
273        // AMD. Register as an anonymous module.
274        define(['jquery'], factory);
275    } else if (typeof exports === 'object') {
276        // Node. Does not work with strict CommonJS, but
277        // only CommonJS-like environments that support module.exports,
278        // like Node.
279        module.exports = factory(require('jquery'));
280    } else {
281        // Browser globals (root is window)
282        root.lightbox = factory(root.jQuery);
283    }
284}(this, function ($) {
285
286  function Lightbox(options) {
287    this.album = [];
288    this.currentImageIndex = void 0;
289    this.init();
290
291    // options
292    this.options = $.extend({}, this.constructor.defaults);
293    this.option(options);
294  }
295
296  // Descriptions of all options available on the demo site:
297  // http://lokeshdhakar.com/projects/lightbox2/index.html#options
298  Lightbox.defaults = {
299    albumLabel: 'Bild %1 von %2',
300    alwaysShowNavOnTouchDevices: false,
301    fadeDuration: 600,
302    fitImagesInViewport: true,
303    imageFadeDuration: 600,
304    // maxWidth: 800,
305    // maxHeight: 600,
306    positionFromTop: 50,
307    resizeDuration: 700,
308    showImageNumberLabel: true,
309    wrapAround: false,
310    disableScrolling: false,
311    /*
312    Sanitize Title
313    If the caption data is trusted, for example you are hardcoding it in, then leave this to false.
314    This will free you to add html tags, such as links, in the caption.
315
316    If the caption data is user submitted or from some other untrusted source, then set this to true
317    to prevent xss and other injection attacks.
318     */
319    sanitizeTitle: false
320  };
321
322  Lightbox.prototype.option = function(options) {
323    $.extend(this.options, options);
324  };
325
326  Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) {
327    return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages);
328  };
329
330  Lightbox.prototype.init = function() {
331    var self = this;
332    // Both enable and build methods require the body tag to be in the DOM.
333    $(document).ready(function() {
334      self.enable();
335      self.build();
336    });
337  };
338
339  // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
340  // that contain 'lightbox'. When these are clicked, start lightbox.
341  Lightbox.prototype.enable = function() {
342    var self = this;
343    $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) {
344      self.start($(event.currentTarget));
345      return false;
vendor: 4,134 bytes, lines 346-420
346    });
347  };
348
349  // Build html for the lightbox and the overlay.
350  // Attach event handlers to the new DOM elements. click click click
351  Lightbox.prototype.build = function() {
352    if ($('#lightbox').length > 0) {
353        return;
354    }
355
356    var self = this;
357
358    // The two root notes generated, #lightboxOverlay and #lightbox are given
359    // tabindex attrs so they are focusable. We attach our keyboard event
360    // listeners to these two elements, and not the document. Clicking anywhere
361    // while Lightbox is opened will keep the focus on or inside one of these
362    // two elements.
363    //
364    // We do this so we can prevent propogation of the Esc keypress when
365    // Lightbox is open. This prevents it from intefering with other components
366    // on the page below.
367    //
368    // Github issue: https://github.com/lokesh/lightbox2/issues/663
369   // $('<div id="lightboxOverlay" tabindex="-1" class="lightboxOverlay"></div><div id="lightbox" tabindex="-1" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
370   $('<div id="lightboxOverlay" tabindex="-1" class="lightboxOverlay"></div><div id="lightbox" tabindex="-1" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-copyright"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
371
372    // Cache jQuery objects
373    this.$lightbox       = $('#lightbox');
374    this.$overlay        = $('#lightboxOverlay');
375    this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
376    this.$container      = this.$lightbox.find('.lb-container');
377    this.$image          = this.$lightbox.find('.lb-image');
378    this.$nav            = this.$lightbox.find('.lb-nav');
379
380    // Store css values for future lookup
381    this.containerPadding = {
382      top: parseInt(this.$container.css('padding-top'), 10),
383      right: parseInt(this.$container.css('padding-right'), 10),
384      bottom: parseInt(this.$container.css('padding-bottom'), 10),
385      left: parseInt(this.$container.css('padding-left'), 10)
386    };
387
388    this.imageBorderWidth = {
389      top: parseInt(this.$image.css('border-top-width'), 10),
390      right: parseInt(this.$image.css('border-right-width'), 10),
391      bottom: parseInt(this.$image.css('border-bottom-width'), 10),
392      left: parseInt(this.$image.css('border-left-width'), 10)
393    };
394
395    // Attach event handlers to the newly minted DOM elements
396    this.$overlay.hide().on('click', function() {
397      self.end();
398      return false;
399    });
400
401    this.$lightbox.hide().on('click', function(event) {
402      if ($(event.target).attr('id') === 'lightbox') {
403        self.end();
404      }
405    });
406
407    this.$outerContainer.on('click', function(event) {
408      if ($(event.target).attr('id') === 'lightbox') {
409        self.end();
410      }
411      return false;
412    });
413
414    this.$lightbox.find('.lb-prev').on('click', function() {
415      if (self.currentImageIndex === 0) {
416        self.changeImage(self.album.length - 1);
417      } else {
418        self.changeImage(self.currentImageIndex - 1);
419      }
420      return false;
421    });
422
423    this.$lightbox.find('.lb-next').on('click', function() {
424      if (self.currentImageIndex === self.album.length - 1) {
425        self.changeImage(0);
426      } else {
427        self.changeImage(self.currentImageIndex + 1);
428      }
429      return false;
430    });
431
432    /*
433      Show context menu for image on right-click
434
435      There is a div containing the navigation that spans the entire image and lives above of it. If
436      you right-click, you are right clicking this div and not the image. This prevents users from
437      saving the image or using other context menu actions with the image.
438
439      To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
440      set pointer-events to none on the nav div. This is so that the upcoming right-click event on
441      the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs
442      we set the pointer events back to auto for the nav div so it can capture hover and left-click
443      events as usual.
444     */
445    this.$nav.on('mousedown', function(event) {
446      if (event.which === 3) {
447        self.$nav.css('pointer-events', 'none');
448
449        self.$lightbox.one('contextmenu', function() {
450          setTimeout(function() {
451              this.$nav.css('pointer-events', 'auto');
452          }.bind(self), 0);
453        });
454      }
455    });
456
457
458    this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
459      self.end();
460      return false;
461    });
462  };
463
464  // Show overlay and lightbox. If the image is part of a set, add siblings to album array.
465  Lightbox.prototype.start = function($link) {
466    var self    = this;
467    var $window = $(window);
468
469    $window.on('resize', $.proxy(this.sizeOverlay, this));
470
471    this.sizeOverlay();
472
473    this.album = [];
474    var imageNumber = 0;
475
476    function addToAlbum($link) {
477      self.album.push({
478        alt: $link.attr('data-alt'),
479        link: $link.attr('href'),
480        title: $link.attr('data-title') || $link.attr('title'),
481        copyright: $link.attr('data-copyright') || $link.attr('copyright')
482      });
483    }
484
485    // Support both data-lightbox attribute and rel attribute implementations
486    var dataLightboxValue = $link.attr('data-lightbox');
487    var $links;
488
489    if (dataLightboxValue) {
490      $links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]');
491      for (var i = 0; i < $links.length; i = ++i) {
492        addToAlbum($($links[i]));
493        if ($links[i] === $link[0]) {
494          imageNumber = i;
495        }
496      }
497    } else {
498      if ($link.attr('rel') === 'lightbox') {
499        // If image is not part of a set
500        addToAlbum($link);
501      } else {
502        // If image is part of a set
503        $links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
504        for (var j = 0; j < $links.length; j = ++j) {
505          addToAlbum($($links[j]));
506          if ($links[j] === $link[0]) {
507            imageNumber = j;
508          }
509        }
510      }
511    }
512
513    // Position Lightbox
514    var top  = $window.scrollTop() + this.options.positionFromTop;
515    var left = $window.scrollLeft();
516    this.$lightbox.css({
517      top: top + 'px',
518      left: left + 'px'
519    }).fadeIn(this.options.fadeDuration);
520
521    // Disable scrolling of the page while open
522    if (this.options.disableScrolling) {
523      $('body').addClass('lb-disable-scrolling');
524    }
525
526    this.changeImage(imageNumber);
527  };
528
529  // Hide most UI elements in preparation for the animated resizing of the lightbox.
530  Lightbox.prototype.changeImage = function(imageNumber) {
531    var self = this;
532    var filename = this.album[imageNumber].link;
533    var filetype = filename.split('.').slice(-1)[0];
534    var $image = this.$lightbox.find('.lb-image');
535
536    // Disable keyboard nav during transitions
537    this.disableKeyboardNav();
538
539    // Show loading state
540    this.$overlay.fadeIn(this.options.fadeDuration);
541    $('.lb-loader').fadeIn('slow');
542    this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption, .lb-copyright').hide();   
543    this.$outerContainer.addClass('animating');
544
545    // When image to show is preloaded, we send the width and height to sizeContainer()
546    var preloader = new Image();
547    preloader.onload = function() {
548      var $preloader;
549      var imageHeight;
550      var imageWidth;
551      var maxImageHeight;
552      var maxImageWidth;
553      var windowHeight;
554      var windowWidth;
555
556      $image.attr({
557        'alt': self.album[imageNumber].alt,
558        'src': filename
559      });
560
561      $preloader = $(preloader);
562
563      $image.width(preloader.width);
564      $image.height(preloader.height);
565      windowWidth = $(window).width();
566      windowHeight = $(window).height();
567
568      // Calculate the max image dimensions for the current viewport.
569      // Take into account the border around the image and an additional 10px gutter on each side.
570      maxImageWidth  = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
571      maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - self.options.positionFromTop - 70;
572
573      /*
574      Since many SVGs have small intrinsic dimensions, but they support scaling
575      up without quality loss because of their vector format, max out their
576      size.
577      */
578      if (filetype === 'svg') {
579        $image.width(maxImageWidth);
580        $image.height(maxImageHeight);
581      }
582
583      // Fit image inside the viewport.
584      if (self.options.fitImagesInViewport) {
585
586        // Check if image size is larger then maxWidth|maxHeight in settings
587        if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
588          maxImageWidth = self.options.maxWidth;
589        }
590        if (self.options.maxHeight && self.options.maxHeight < maxImageHeight) {
591          maxImageHeight = self.options.maxHeight;
592        }
593
594      } else {
595        maxImageWidth = self.options.maxWidth || preloader.width || maxImageWidth;
596        maxImageHeight = self.options.maxHeight || preloader.height || maxImageHeight;
597      }
598
599      // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
600      // option than we need to size down while maintaining the aspect ratio.
601      if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
602        if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
603          imageWidth  = maxImageWidth;
604          imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
605          $image.width(imageWidth);
606          $image.height(imageHeight);
607        } else {
608          imageHeight = maxImageHeight;
609          imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
610          $image.width(imageWidth);
611          $image.height(imageHeight);
612        }
613      }
614      self.sizeContainer($image.width(), $image.height());
615    };
616
617    // Preload image before showing
618    preloader.src = this.album[imageNumber].link;
619    this.currentImageIndex = imageNumber;
620  };
621
622  // Stretch overlay to fit the viewport
623  Lightbox.prototype.sizeOverlay = function() {
624    var self = this;
625    /*
626    We use a setTimeout 0 to pause JS execution and let the rendering catch-up.
627    Why do this? If the `disableScrolling` option is set to true, a class is added to the body
628    tag that disables scrolling and hides the scrollbar. We want to make sure the scrollbar is
629    hidden before we measure the document width, as the presence of the scrollbar will affect the
630    number.
631    */
632    setTimeout(function() {
633      self.$overlay
634        .width($(document).width())
635        .height($(document).height());
636
637    }, 0);
638  };
639
640  // Animate the size of the lightbox to fit the image we are showing
641  // This method also shows the the image.
642  Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
643    var self = this;
644
645    var oldWidth  = this.$outerContainer.outerWidth();
646    var oldHeight = this.$outerContainer.outerHeight();
647    var newWidth  = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
648    var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
649
650    function postResize() {
651      self.$lightbox.find('.lb-dataContainer').width(newWidth);
652      self.$lightbox.find('.lb-prevLink').height(newHeight);
653      self.$lightbox.find('.lb-nextLink').height(newHeight);
654
655      // Set focus on one of the two root nodes so keyboard events are captured.
656      self.$overlay.focus();
657
658      self.showImage();
659    }
660
661    if (oldWidth !== newWidth || oldHeight !== newHeight) {
662      this.$outerContainer.animate({
663        width: newWidth,
664        height: newHeight
665      }, this.options.resizeDuration, 'swing', function() {
666        postResize();
667      });
668    } else {
669      postResize();
670    }
671  };
672
673  // Display the image and its details and begin preload neighboring images.
674  Lightbox.prototype.showImage = function() {
675    this.$lightbox.find('.lb-loader').stop(true).hide();
676    this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
677
678    this.updateNav();
679    this.updateDetails();
680    this.preloadNeighboringImages();
681    this.enableKeyboardNav();
682  };
683
684  // Display previous and next navigation if appropriate.
685  Lightbox.prototype.updateNav = function() {
686    // Check to see if the browser supports touch events. If so, we take the conservative approach
687    // and assume that mouse hover events are not supported and always show prev/next navigation
688    // arrows in image sets.
689    var alwaysShowNav = false;
690    try {
691      document.createEvent('TouchEvent');
692      alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false;
693    } catch (e) {}
694
695    this.$lightbox.find('.lb-nav').show();
696
697    if (this.album.length > 1) {
698      if (this.options.wrapAround) {
699        if (alwaysShowNav) {
700          this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
701        }
702        this.$lightbox.find('.lb-prev, .lb-next').show();
703      } else {
704        if (this.currentImageIndex > 0) {
705          this.$lightbox.find('.lb-prev').show();
706          if (alwaysShowNav) {
707            this.$lightbox.find('.lb-prev').css('opacity', '1');
708          }
709        }
710        if (this.currentImageIndex < this.album.length - 1) {
711          this.$lightbox.find('.lb-next').show();
712          if (alwaysShowNav) {
713            this.$lightbox.find('.lb-next').css('opacity', '1');
714          }
715        }
716      }
717    }
718  };
719
720  // Display caption, image number, and closing button.
721  Lightbox.prototype.updateDetails = function() {
722    var self = this;
723
724    // Enable anchor clicks in the injected caption html.
725    // Thanks Nate Wright for the fix. @https://github.com/NateWr
726    if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
727      this.album[this.currentImageIndex].title !== '') {
728      var $caption = this.$lightbox.find('.lb-caption');
729      if (this.options.sanitizeTitle) {
730        $caption.text(this.album[this.currentImageIndex].title);
731      } else {
732        $caption.html(this.album[this.currentImageIndex].title + ' &ndash; <span style="font-weight:normal;">' + this.album[this.currentImageIndex].alt + '</span>');
733      }
734      $caption.fadeIn('fast');
735    }
736
737    if (this.album.length > 1 && this.options.showImageNumberLabel) {
738      var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
739      this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
740    } else {
741      this.$lightbox.find('.lb-number').hide();
742    }
743
744    if (typeof this.album[this.currentImageIndex].copyright !== 'undefined' &&
745      this.album[this.currentImageIndex].copyright !== '') {  
746      var $copyright = this.$lightbox.find('.lb-copyright'); 
747      if (this.options.sanitizeTitle) {
748        $copyright.text(this.album[this.currentImageIndex].copyright);
749      } else {
750        $copyright.html(this.album[this.currentImageIndex].copyright);  
751      }
752      $copyright.fadeIn('fast');
753    }  
754
755    this.$outerContainer.removeClass('animating');
756
757    this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
758      return self.sizeOverlay();
759    });
760  };
761
762  // Preload previous and next images in set.
763  Lightbox.prototype.preloadNeighboringImages = function() {
764    if (this.album.length > this.currentImageIndex + 1) {
765      var preloadNext = new Image();
766      preloadNext.src = this.album[this.currentImageIndex + 1].link;
767    }
768    if (this.currentImageIndex > 0) {
769      var preloadPrev = new Image();
770      preloadPrev.src = this.album[this.currentImageIndex - 1].link;
771    }
772  };
773
774  Lightbox.prototype.enableKeyboardNav = function() {
775    this.$lightbox.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
776    this.$overlay.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
777  };
778
779  Lightbox.prototype.disableKeyboardNav = function() {
780    this.$lightbox.off('.keyboard');
781    this.$overlay.off('.keyboard');
782  };
783
784  Lightbox.prototype.keyboardAction = function(event) {
785    var KEYCODE_ESC        = 27;
786    var KEYCODE_LEFTARROW  = 37;
787    var KEYCODE_RIGHTARROW = 39;
788
789    var keycode = event.keyCode;
790    if (keycode === KEYCODE_ESC) {
791      // Prevent bubbling so as to not affect other components on the page.
792      event.stopPropagation();
793      this.end();
794    } else if (keycode === KEYCODE_LEFTARROW) {
795      if (this.currentImageIndex !== 0) {
796        this.changeImage(this.currentImageIndex - 1);
797      } else if (this.options.wrapAround && this.album.length > 1) {
798        this.changeImage(this.album.length - 1);
799      }
800    } else if (keycode === KEYCODE_RIGHTARROW) {
801      if (this.currentImageIndex !== this.album.length - 1) {
802        this.changeImage(this.currentImageIndex + 1);
803      } else if (this.options.wrapAround && this.album.length > 1) {
804        this.changeImage(0);
805      }
806    }
807  };
808
809  // Closing time. :-(
810  Lightbox.prototype.end = function() {
811    this.disableKeyboardNav();
812    $(window).off('resize', this.sizeOverlay);
813    this.$lightbox.fadeOut(this.options.fadeDuration);
814    this.$overlay.fadeOut(this.options.fadeDuration);
815
816    if (this.options.disableScrolling) {
817      $('body').removeClass('lb-disable-scrolling');
818    }
819  };
820
821  return new Lightbox();
822}));
823
824/* -----------------------------------------------
825MATCHHEIGHT
826----------------------------------------------- */
827
vendor: 11,896 bytes, lines 828-1219
828/**
829* jquery-match-height master by @liabru
830* http://brm.io/jquery-match-height/
831* License: MIT
832*/
833
834;(function(factory) { // eslint-disable-line no-extra-semi
835    'use strict';
836    if (typeof define === 'function' && define.amd) {
837        // AMD
838        define(['jquery'], factory);
839    } else if (typeof module !== 'undefined' && module.exports) {
840        // CommonJS
841        module.exports = factory(require('jquery'));
842    } else {
843        // Global
844        factory(jQuery);
845    }
846})(function($) {
847    /*
848    *  internal
849    */
850
851    var _previousResizeWidth = -1,
852        _updateTimeout = -1;
853
854    /*
855    *  _parse
856    *  value parse utility function
857    */
858
859    var _parse = function(value) {
860        // parse value and convert NaN to 0
861        return parseFloat(value) || 0;
862    };
863
864    /*
865    *  _rows
866    *  utility function returns array of jQuery selections representing each row
867    *  (as displayed after float wrapping applied by browser)
868    */
869
870    var _rows = function(elements) {
871        var tolerance = 1,
872            $elements = $(elements),
873            lastTop = null,
874            rows = [];
875
876        // group elements by their top position
877        $elements.each(function(){
878            var $that = $(this),
879                top = $that.offset().top - _parse($that.css('margin-top')),
880                lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
881
882            if (lastRow === null) {
883                // first item on the row, so just push it
884                rows.push($that);
885            } else {
886                // if the row top is the same, add to the row group
887                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
888                    rows[rows.length - 1] = lastRow.add($that);
889                } else {
890                    // otherwise start a new row group
891                    rows.push($that);
892                }
893            }
894
895            // keep track of the last row top
896            lastTop = top;
897        });
898
899        return rows;
900    };
901
902    /*
903    *  _parseOptions
904    *  handle plugin options
905    */
906
907    var _parseOptions = function(options) {
908        var opts = {
909            byRow: true,
910            property: 'height',
911            target: null,
912            remove: false
913        };
914
915        if (typeof options === 'object') {
916            return $.extend(opts, options);
917        }
918
919        if (typeof options === 'boolean') {
920            opts.byRow = options;
921        } else if (options === 'remove') {
922            opts.remove = true;
923        }
924
925        return opts;
926    };
927
928    /*
929    *  matchHeight
930    *  plugin definition
931    */
932
933    var matchHeight = $.fn.matchHeight = function(options) {
934        var opts = _parseOptions(options);
935
936        // handle remove
937        if (opts.remove) {
938            var that = this;
939
940            // remove fixed height from all selected elements
941            this.css(opts.property, '');
942
943            // remove selected elements from all groups
944            $.each(matchHeight._groups, function(key, group) {
945                group.elements = group.elements.not(that);
946            });
947
948            // TODO: cleanup empty groups
949
950            return this;
951        }
952
953        if (this.length <= 1 && !opts.target) {
954            return this;
955        }
956
957        // keep track of this group so we can re-apply later on load and resize events
958        matchHeight._groups.push({
959            elements: this,
960            options: opts
961        });
962
963        // match each element's height to the tallest element in the selection
964        matchHeight._apply(this, opts);
965
966        return this;
967    };
968
969    /*
970    *  plugin global options
971    */
972
973    matchHeight.version = 'master';
974    matchHeight._groups = [];
975    matchHeight._throttle = 80;
976    matchHeight._maintainScroll = false;
977    matchHeight._beforeUpdate = null;
978    matchHeight._afterUpdate = null;
979    matchHeight._rows = _rows;
980    matchHeight._parse = _parse;
981    matchHeight._parseOptions = _parseOptions;
982
983    /*
984    *  matchHeight._apply
985    *  apply matchHeight to given elements
986    */
987
988    matchHeight._apply = function(elements, options) {
989        var opts = _parseOptions(options),
990            $elements = $(elements),
991            rows = [$elements];
992
993        // take note of scroll position
994        var scrollTop = $(window).scrollTop(),
995            htmlHeight = $('html').outerHeight(true);
996
997        // get hidden parents
998        var $hiddenParents = $elements.parents().filter(':hidden');
999
1000        // cache the original inline style
1001        $hiddenParents.each(function() {
1002            var $that = $(this);
1003            $that.data('style-cache', $that.attr('style'));
1004        });
1005
1006        // temporarily must force hidden parents visible
1007        $hiddenParents.css('display', 'block');
1008
1009        // get rows if using byRow, otherwise assume one row
1010        if (opts.byRow && !opts.target) {
1011
1012            // must first force an arbitrary equal height so floating elements break evenly
1013            $elements.each(function() {
1014                var $that = $(this),
1015                    display = $that.css('display');
1016
1017                // temporarily force a usable display value
1018                if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
1019                    display = 'block';
1020                }
1021
1022                // cache the original inline style
1023                $that.data('style-cache', $that.attr('style'));
1024
1025                $that.css({
1026                    'display': display,
1027                    'padding-top': '0',
1028                    'padding-bottom': '0',
1029                    'margin-top': '0',
1030                    'margin-bottom': '0',
1031                    'border-top-width': '0',
1032                    'border-bottom-width': '0',
1033                    'height': '100px',
1034                    'overflow': 'hidden'
1035                });
1036            });
1037
1038            // get the array of rows (based on element top position)
1039            rows = _rows($elements);
1040
1041            // revert original inline styles
1042            $elements.each(function() {
1043                var $that = $(this);
1044                $that.attr('style', $that.data('style-cache') || '');
1045            });
1046        }
1047
1048        $.each(rows, function(key, row) {
1049            var $row = $(row),
1050                targetHeight = 0;
1051
1052            if (!opts.target) {
1053                // skip apply to rows with only one item
1054                if (opts.byRow && $row.length <= 1) {
1055                    $row.css(opts.property, '');
1056                    return;
1057                }
1058
1059                // iterate the row and find the max height
1060                $row.each(function(){
1061                    var $that = $(this),
1062                        style = $that.attr('style'),
1063                        display = $that.css('display');
1064
1065                    // temporarily force a usable display value
1066                    if (display !== 'inline-block' && display !== 'flex' && display !== 'inline-flex') {
1067                        display = 'block';
1068                    }
1069
1070                    // ensure we get the correct actual height (and not a previously set height value)
1071                    var css = { 'display': display };
1072                    css[opts.property] = '';
1073                    $that.css(css);
1074
1075                    // find the max height (including padding, but not margin)
1076                    if ($that.outerHeight(false) > targetHeight) {
1077                        targetHeight = $that.outerHeight(false);
1078                    }
1079
1080                    // revert styles
1081                    if (style) {
1082                        $that.attr('style', style);
1083                    } else {
1084                        $that.css('display', '');
1085                    }
1086                });
1087            } else {
1088                // if target set, use the height of the target element
1089                targetHeight = opts.target.outerHeight(false);
1090            }
1091
1092            // iterate the row and apply the height to all elements
1093            $row.each(function(){
1094                var $that = $(this),
1095                    verticalPadding = 0;
1096
1097                // don't apply to a target
1098                if (opts.target && $that.is(opts.target)) {
1099                    return;
1100                }
1101
1102                // handle padding and border correctly (required when not using border-box)
1103                if ($that.css('box-sizing') !== 'border-box') {
1104                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
1105                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
1106                }
1107
1108                // set the height (accounting for padding and border)
1109                $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
1110            });
1111        });
1112
1113        // revert hidden parents
1114        $hiddenParents.each(function() {
1115            var $that = $(this);
1116            $that.attr('style', $that.data('style-cache') || null);
1117        });
1118
1119        // restore scroll position if enabled
1120        if (matchHeight._maintainScroll) {
1121            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
1122        }
1123
1124        return this;
1125    };
1126
1127    /*
1128    *  matchHeight._applyDataApi
1129    *  applies matchHeight to all elements with a data-match-height attribute
1130    */
1131
1132    matchHeight._applyDataApi = function() {
1133        var groups = {};
1134
1135        // generate groups by their groupId set by elements using data-match-height
1136        $('[data-match-height], [data-mh]').each(function() {
1137            var $this = $(this),
1138                groupId = $this.attr('data-mh') || $this.attr('data-match-height');
1139
1140            if (groupId in groups) {
1141                groups[groupId] = groups[groupId].add($this);
1142            } else {
1143                groups[groupId] = $this;
1144            }
1145        });
1146
1147        // apply matchHeight to each group
1148        $.each(groups, function() {
1149            this.matchHeight(true);
1150        });
1151    };
1152
1153    /*
1154    *  matchHeight._update
1155    *  updates matchHeight on all current groups with their correct options
1156    */
1157
1158    var _update = function(event) {
1159        if (matchHeight._beforeUpdate) {
1160            matchHeight._beforeUpdate(event, matchHeight._groups);
1161        }
1162
1163        $.each(matchHeight._groups, function() {
1164            matchHeight._apply(this.elements, this.options);
1165        });
1166
1167        if (matchHeight._afterUpdate) {
1168            matchHeight._afterUpdate(event, matchHeight._groups);
1169        }
1170    };
1171
1172    matchHeight._update = function(throttle, event) {
1173        // prevent update if fired from a resize event
1174        // where the viewport width hasn't actually changed
1175        // fixes an event looping bug in IE8
1176        if (event && event.type === 'resize') {
1177            var windowWidth = $(window).width();
1178            if (windowWidth === _previousResizeWidth) {
1179                return;
1180            }
1181            _previousResizeWidth = windowWidth;
1182        }
1183
1184        // throttle updates
1185        if (!throttle) {
1186            _update(event);
1187        } else if (_updateTimeout === -1) {
1188            _updateTimeout = setTimeout(function() {
1189                _update(event);
1190                _updateTimeout = -1;
1191            }, matchHeight._throttle);
1192        }
1193    };
1194
1195    /*
1196    *  bind events
1197    */
1198
1199    // apply on DOM ready event
1200    $(matchHeight._applyDataApi);
1201
1202    // use on or bind where supported
1203    var on = $.fn.on ? 'on' : 'bind';
1204
1205    // update heights on load and resize events
1206    $(window)[on]('load', function(event) {
1207        matchHeight._update(false, event);
1208    });
1209
1210    // throttled update heights on resize events
1211    $(window)[on]('resize orientationchange', function(event) {
1212        matchHeight._update(true, event);
1213    });
1214
1215});
1216
1217jQuery(window).load(function() {
1218  jQuery('.mehrspalter-content > .neos-contentcollection > div').matchHeight();
1219});

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.