PageSourceSearch

https://www.emma.de/sites/default/files/js/js_xBaUIBzWPQ_dhpSlEq0yarsDRMF_FkUZjbiDVJVYKXQ.js

js emma.de collected 2026-09-24 08:59:31 UTC 5,107 bytes, 150 lines download raw bytes

1/**
2 * @author Kim-Christian Meyer <[email protected]>
3 * @modified 2013-10-08
4 */
5;window.emm = window.emm || {};
6
7(function ($, Drupal, window, document, undefined) {
8"use strict";
9
10// some variables for drupal ad code blocks
11window.viewport_width     = document.documentElement.clientWidth;
12window.desktop_breakpoint = 1200;
13if ( location.hostname === 'www.aliceschwarzer.de' || location.hostname === 'alice.local') {
14    window.is_aliceschwarzer  = true;
15    window.is_emma            = false;
16} else {
17    window.is_aliceschwarzer  = false;
18    window.is_emma            = true;
19}
20
21// define where ads should be displayed and where not. there will be no ad JS output if false.
22window.emm_show_ads       = false; // path conditions should be made in ad management module
23
24if (emm_show_ads) {
25  $('html').addClass('emm-show-ads');
26}
27else {
28  $('html').addClass('emm-hide-ads');
29}
30
31/********* Subscription ad box #1249 **********/
32setInterval( function(event) {
33  if( window.pageYOffset > 640 ) {
34    var closing_date = localStorage.getItem('emm-subscription-ad-cookie-date');
35    var today = new Date();
36    today = today.getTime();
37    var show = false;
38    if( !closing_date )  {
39      show = true;
40    } else {
41      closing_date = new Date(closing_date);
42      closing_date = closing_date.getTime();
43    }
44    var expiration_time = closing_date + 1000*60;//*60*24; // one day in milliseconds
45    if( show || expiration_time <= today ) {
46      var $body = $('body');
47      var $emmSubscriptionAd = $body.find('.emm-subscription-ad');
48      $emmSubscriptionAd.addClass('is-expanded');
49      $body.find('.emm-subscription-ad-close').on('click', function() {
50        localStorage.setItem('emm-subscription-ad-cookie-date', new Date());
51        $emmSubscriptionAd.removeClass('is-expanded');
52      });
53    }
54  }
55}, 300);
56
57$(document).ready(function() {
58
59  // header search field
60  var $search_field_toggler = $('body').find('.emm-search-field-toggler');
61  $search_field_toggler.on( 'click', function(e) {
62    e.preventDefault();
63    $('body').toggleClass( 'search-field-expanded' );
64  });
65
66  /* ###### COOL FOOTER-SLIDE-IN ANIMATION, WHEN SCROLLING DOWN ###### */
67  var scroll_menu_animator = function() {
68    var menu_html = '<div class="region region-header">' + $('#page .region-header:first').html() + '</div>';
69    $('.emm-nav-fixed-container .container_nav').append(menu_html);
70    new emm.ScrollHandler('.emm-nav-fixed-container', '#header');
71  };
72  scroll_menu_animator();
73
74  /* ###### APPLY FANCYBOX TO ALL LINKS LINKING TO AN IMAGE ###### */
75  var ahrefs = "a[href$='.jpg'], a[href$='.jpeg'], a[href$='.png'], a[href$='.gif'], " +
76    "a[href$='.JPG'], a[href$='.JPEG'], a[href$='.PNG'], a[href$='.GIF']";
77  $(ahrefs).fancybox({
78    beforeShow : function() {
79      // Fetch title attribute from image and attach it to the a-link
80      var alt = this.element.find('img').attr('title');
81      // this.inner.find('img').attr('alt', alt);
82      this.title = alt;
83    },
84    openEffect  : 'elastic',
85    closeEffect : 'elastic',
86    padding     : 0,
87    nextClick   : true,
88    helpers: {
89      title: {
90        type : 'over'
91      }
92    }
93  });
94
95  /**
96   * Do it several times
97   */
98  var times = 10;
99  function fitvid(){
100    // Fit video to box maximum sizes
101    jQuery("#content, .grid-box-advanced_video").fitVids();
102    times--;
103    if(times>0){
104      setTimeout(fitvid,1000);
105    }
106  }
107  fitvid();
108
109  // Make all article sidebar pictures loopable
110  $('.grid-box-article-pictures').find(ahrefs).attr('rel', 'gallery');
111
112  // Form Validations
113  $("div").removeClass('validate[required]');
114  $('.form-item-teckellover > input[type=checkbox]').addClass('validate[required]');
115  $("#emma-shop-checkout, #emma-shop-laststep, #emma-petitions-petition-form, .comment-form, .node-guestbook-form")
116    .validationEngine('attach', {
117      // promptPosition : 'topRight',
118      promptPosition: 'inline',
119      validationEventTrigger: 'keyup',
120      scroll: false,
121      showArrow: false,
122      addSuccessCssClassToField: 'is-success',
123      addFailureCssClassToField: 'is-error'
124    });
125
126  /** CLICKDUMMY ENHANCEMENT **/
127  $('body').find('.booklet-nav-prev').addClass('is-hidden');
128
129  /**
130   * NEW ARTICLE DESIGN FOR EMMA:
131   * provide the correct floating of images inside of articles ([email protected])
132   * Ticket: https://github.com/palasthotel/emma/issues/1303#issuecomment-262557672
133   */
134  // loop thru all images inside of the article-body
135  $('.node-article figure.emm-article-body-image img').each(function (i, imageobject) {
136    // check the floating of the image and transfer it to it's parent <figure>-element
137    if ($(this).css('float') == 'left') {
138      $(this).css("float", "");
139      $(this).parents( "figure" ).addClass('alignleft');
140      $(this).parents( "figure" ).removeClass('aligncenter alignright');
141    } else if ($(this).css('float') == 'right') {
142      $(this).css("float", "");
143      $(this).parents( "figure" ).addClass('alignright');
144      $(this).parents( "figure" ).removeClass('aligncenter alignleft');
145    }
146  });
147});
148
149})(jq191, Drupal, this, this.document);
150;

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.