PageSourceSearch

https://www.amth.gr/sites/amth.gr/files/js/js_aaexey4oL2plImKGmVXETTkfPtklmeSbfbs8ohXGS50.js

js amth.gr collected 2026-10-02 03:30:29 UTC 16,952 bytes, 599 lines download raw bytes

1/**
2 * @file
3 * A JavaScript file for the theme.
4 *
5 * In order for this JavaScript to be loaded on pages, see the instructions in
6 * the README.txt next to this file.
7 */
8
9// JavaScript should be made compatible with libraries other than jQuery by
10// wrapping it with an "anonymous closure". See:
11// - https://drupal.org/node/1446420
12// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
13(function ($, Drupal, window, document, undefined) {
14
15$(window).load(function() {
16
17
18
19	var socialVertical = $('.js-social-vertical').waypoint({
20	  handler: function(direction) {
21		  	if(direction == 'down') {
22			  	$(this.element).removeClass('js-sticky');
23			  	$(this.element).addClass('js-sticky');
24		  	}
25				else {
26			  	$(this.element).removeClass('js-sticky');
27				}
28
29
30	  },
31	  offset: 60
32
33	})
34
35	var stickyBreadcrumb = $('#content').waypoint({
36	  handler: function(direction) {
37		  	if(direction == 'down') {
38			  	$('.js-breadcrumb').removeClass('js-sticky');
39			  	$('.js-breadcrumb').addClass('js-sticky');
40		  	}
41				else {
42			  	$('.js-breadcrumb').removeClass('js-sticky');
43				}
44
45
46	  },
47	  offset: 60
48
49	})
50
51	var navigation = $('.region-navigation').waypoint({
52	  handler: function(direction) {
53		  	if(direction == 'down') {
54			  	$('.mm__trigger-wrapper').removeClass('js-sticky');
55			  	$('.mm__trigger-wrapper').addClass('js-sticky');
56
57			  	$('.block-custom-language-block').removeClass('js-sticky');
58			  	$('.block-custom-language-block').addClass('js-sticky');
59
60		  	}
61				else {
62			  	$('.mm__trigger-wrapper').removeClass('js-sticky');
63			  	$('.block-custom-language-block').removeClass('js-sticky');
64				}
65
66
67	  },
68	  offset: -10
69
70	})
71
72});
73
74// To understand behaviors, see https://drupal.org/node/756722#behaviors
75Drupal.behaviors.amth_waypoints_behavior = {
76  attach: function(context, settings) {
77
78
79
80
81  }
82};
83
84
85})(jQuery, Drupal, this, this.document);;
86/**
87 * @file
88 * A JavaScript file for the theme.
89 *
90 * In order for this JavaScript to be loaded on pages, see the instructions in
91 * the README.txt next to this file.
92 */
93
94// JavaScript should be made compatible with libraries other than jQuery by
95// wrapping it with an "anonymous closure". See:
96// - https://drupal.org/node/1446420
97// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
98(function ($, Drupal, window, document, undefined) {
99
100$(document).ready(function() {
101    var map;
102    var myLatlng = new google.maps.LatLng(40.625232,22.953868);
103
104    function initMap() {
105      map = new google.maps.Map(document.getElementById('gmap'), {
106        center: myLatlng,
107        zoom: 17,
108        scrollwheel: false,
109      });
110    }
111
112    initMap();
113
114    // Add marker
115
116    var markerImage = Drupal.settings.basePath + Drupal.settings.pathToTheme + '/images/amth-marker.png';
117
118    var marker = new google.maps.Marker({
119        position: myLatlng,
120        title:"Archaiological Museum of Thessaloniki",
121        icon: markerImage
122    });
123
124    // To add the marker to the map, call setMap();
125    marker.setMap(map);
126
127    // Add style
128    var styleArray = [
129      {
130        featureType: "all",
131        stylers: [
132          { saturation: -100 }
133        ]
134      },{
135        featureType: "poi.business",
136        elementType: "labels",
137        stylers: [
138          { visibility: "off" }
139        ]
140      }
141    ];
142
143    map.setOptions({styles: styleArray});
144
145    // Center marker on resize.
146    // Re-center map on window resize event.
147    if ($('body').hasClass('page-visit-how-to-find-us')) {
148      // This is our gem.
149      // http://hsmoore.com/blog/keep-google-map-v3-centered-when-browser-is-resized/
150      google.maps.event.addDomListener(window, "resize", function() {
151          var center = map.getCenter();
152          google.maps.event.trigger(map, "resize");
153          map.setCenter(center);
154      });
155    }
156    // -- End Gmap resize.
157
158
159    });
160
161// To understand behaviors, see https://drupal.org/node/756722#behaviors
162Drupal.behaviors.amth_gmap_behavior = {
163  attach: function(context, settings) {
164
165
166
167  }
168};
169
170
171})(jQuery, Drupal, this, this.document);;
172/**
173* jquery.matchHeight.js master
174* http://brm.io/jquery-match-height/
175* License: MIT
176*/
177
178;(function($) {
179    /*
180    *  internal
181    */
182
183    var _previousResizeWidth = -1,
184        _updateTimeout = -1;
185
186    /*
187    *  _parse
188    *  value parse utility function
189    */
190
191    var _parse = function(value) {
192        // parse value and convert NaN to 0
193        return parseFloat(value) || 0;
194    };
195
196    /*
197    *  _rows
198    *  utility function returns array of jQuery selections representing each row
199    *  (as displayed after float wrapping applied by browser)
200    */
201
202    var _rows = function(elements) {
203        var tolerance = 1,
204            $elements = $(elements),
205            lastTop = null,
206            rows = [];
207
208        // group elements by their top position
209        $elements.each(function(){
210            var $that = $(this),
211                top = $that.offset().top - _parse($that.css('margin-top')),
212                lastRow = rows.length > 0 ? rows[rows.length - 1] : null;
213
214            if (lastRow === null) {
215                // first item on the row, so just push it
216                rows.push($that);
217            } else {
218                // if the row top is the same, add to the row group
219                if (Math.floor(Math.abs(lastTop - top)) <= tolerance) {
220                    rows[rows.length - 1] = lastRow.add($that);
221                } else {
222                    // otherwise start a new row group
223                    rows.push($that);
224                }
225            }
226
227            // keep track of the last row top
228            lastTop = top;
229        });
230
231        return rows;
232    };
233
234    /*
235    *  _parseOptions
236    *  handle plugin options
237    */
238
239    var _parseOptions = function(options) {
240        var opts = {
241            byRow: true,
242            property: 'height',
243            target: null,
244            remove: false
245        };
246
247        if (typeof options === 'object') {
248            return $.extend(opts, options);
249        }
250
251        if (typeof options === 'boolean') {
252            opts.byRow = options;
253        } else if (options === 'remove') {
254            opts.remove = true;
255        }
256
257        return opts;
258    };
259
260    /*
261    *  matchHeight
262    *  plugin definition
263    */
264
265    var matchHeight = $.fn.matchHeight = function(options) {
266        var opts = _parseOptions(options);
267
268        // handle remove
269        if (opts.remove) {
270            var that = this;
271
272            // remove fixed height from all selected elements
273            this.css(opts.property, '');
274
275            // remove selected elements from all groups
276            $.each(matchHeight._groups, function(key, group) {
277                group.elements = group.elements.not(that);
278            });
279
280            // TODO: cleanup empty groups
281
282            return this;
283        }
284
285        if (this.length <= 1 && !opts.target) {
286            return this;
287        }
288
289        // keep track of this group so we can re-apply later on load and resize events
290        matchHeight._groups.push({
291            elements: this,
292            options: opts
293        });
294
295        // match each element's height to the tallest element in the selection
296        matchHeight._apply(this, opts);
297
298        return this;
299    };
300
301    /*
302    *  plugin global options
303    */
304
305    matchHeight._groups = [];
306    matchHeight._throttle = 80;
307    matchHeight._maintainScroll = false;
308    matchHeight._beforeUpdate = null;
309    matchHeight._afterUpdate = null;
310
311    /*
312    *  matchHeight._apply
313    *  apply matchHeight to given elements
314    */
315
316    matchHeight._apply = function(elements, options) {
317        var opts = _parseOptions(options),
318            $elements = $(elements),
319            rows = [$elements];
320
321        // take note of scroll position
322        var scrollTop = $(window).scrollTop(),
323            htmlHeight = $('html').outerHeight(true);
324
325        // get hidden parents
326        var $hiddenParents = $elements.parents().filter(':hidden');
327
328        // cache the original inline style
329        $hiddenParents.each(function() {
330            var $that = $(this);
331            $that.data('style-cache', $that.attr('style'));
332        });
333
334        // temporarily must force hidden parents visible
335        $hiddenParents.css('display', 'block');
336
337        // get rows if using byRow, otherwise assume one row
338        if (opts.byRow && !opts.target) {
339
340            // must first force an arbitrary equal height so floating elements break evenly
341            $elements.each(function() {
342                var $that = $(this),
343                    display = $that.css('display');
344
345                // temporarily force a usable display value
346                if (display !== 'inline-block' && display !== 'inline-flex') {
347                    display = 'block';
348                }
349
350                // cache the original inline style
351                $that.data('style-cache', $that.attr('style'));
352
353                $that.css({
354                    'display': display,
355                    'padding-top': '0',
356                    'padding-bottom': '0',
357                    'margin-top': '0',
358                    'margin-bottom': '0',
359                    'border-top-width': '0',
360                    'border-bottom-width': '0',
361                    'height': '100px'
362                });
363            });
364
365            // get the array of rows (based on element top position)
366            rows = _rows($elements);
367
368            // revert original inline styles
369            $elements.each(function() {
370                var $that = $(this);
371                $that.attr('style', $that.data('style-cache') || '');
372            });
373        }
374
375        $.each(rows, function(key, row) {
376            var $row = $(row),
377                targetHeight = 0;
378
379            if (!opts.target) {
380                // skip apply to rows with only one item
381                if (opts.byRow && $row.length <= 1) {
382                    $row.css(opts.property, '');
383                    return;
384                }
385
386                // iterate the row and find the max height
387                $row.each(function(){
388                    var $that = $(this),
389                        display = $that.css('display');
390
391                    // temporarily force a usable display value
392                    if (display !== 'inline-block' && display !== 'inline-flex') {
393                        display = 'block';
394                    }
395
396                    // ensure we get the correct actual height (and not a previously set height value)
397                    var css = { 'display': display };
398                    css[opts.property] = '';
399                    $that.css(css);
400
401                    // find the max height (including padding, but not margin)
402                    if ($that.outerHeight(false) > targetHeight) {
403                        targetHeight = $that.outerHeight(false);
404                    }
405
406                    // revert display block
407                    $that.css('display', '');
408                });
409            } else {
410                // if target set, use the height of the target element
411                targetHeight = opts.target.outerHeight(false);
412            }
413
414            // iterate the row and apply the height to all elements
415            $row.each(function(){
416                var $that = $(this),
417                    verticalPadding = 0;
418
419                // don't apply to a target
420                if (opts.target && $that.is(opts.target)) {
421                    return;
422                }
423
424                // handle padding and border correctly (required when not using border-box)
425                if ($that.css('box-sizing') !== 'border-box') {
426                    verticalPadding += _parse($that.css('border-top-width')) + _parse($that.css('border-bottom-width'));
427                    verticalPadding += _parse($that.css('padding-top')) + _parse($that.css('padding-bottom'));
428                }
429
430                // set the height (accounting for padding and border)
431                $that.css(opts.property, (targetHeight - verticalPadding) + 'px');
432            });
433        });
434
435        // revert hidden parents
436        $hiddenParents.each(function() {
437            var $that = $(this);
438            $that.attr('style', $that.data('style-cache') || null);
439        });
440
441        // restore scroll position if enabled
442        if (matchHeight._maintainScroll) {
443            $(window).scrollTop((scrollTop / htmlHeight) * $('html').outerHeight(true));
444        }
445
446        return this;
447    };
448
449    /*
450    *  matchHeight._applyDataApi
451    *  applies matchHeight to all elements with a data-match-height attribute
452    */
453
454    matchHeight._applyDataApi = function() {
455        var groups = {};
456
457        // generate groups by their groupId set by elements using data-match-height
458        $('[data-match-height], [data-mh]').each(function() {
459            var $this = $(this),
460                groupId = $this.attr('data-mh') || $this.attr('data-match-height');
461
462            if (groupId in groups) {
463                groups[groupId] = groups[groupId].add($this);
464            } else {
465                groups[groupId] = $this;
466            }
467        });
468
469        // apply matchHeight to each group
470        $.each(groups, function() {
471            this.matchHeight(true);
472        });
473    };
474
475    /*
476    *  matchHeight._update
477    *  updates matchHeight on all current groups with their correct options
478    */
479
480    var _update = function(event) {
481        if (matchHeight._beforeUpdate) {
482            matchHeight._beforeUpdate(event, matchHeight._groups);
483        }
484
485        $.each(matchHeight._groups, function() {
486            matchHeight._apply(this.elements, this.options);
487        });
488
489        if (matchHeight._afterUpdate) {
490            matchHeight._afterUpdate(event, matchHeight._groups);
491        }
492    };
493
494    matchHeight._update = function(throttle, event) {
495        // prevent update if fired from a resize event
496        // where the viewport width hasn't actually changed
497        // fixes an event looping bug in IE8
498        if (event && event.type === 'resize') {
499            var windowWidth = $(window).width();
500            if (windowWidth === _previousResizeWidth) {
501                return;
502            }
503            _previousResizeWidth = windowWidth;
504        }
505
506        // throttle updates
507        if (!throttle) {
508            _update(event);
509        } else if (_updateTimeout === -1) {
510            _updateTimeout = setTimeout(function() {
511                _update(event);
512                _updateTimeout = -1;
513            }, matchHeight._throttle);
514        }
515    };
516
517    /*
518    *  bind events
519    */
520
521    // apply on DOM ready event
522    $(matchHeight._applyDataApi);
523
524    // update heights on load and resize events
525    $(window).bind('load', function(event) {
526        matchHeight._update(false, event);
527    });
528
529    // throttled update heights on resize events
530    $(window).bind('resize orientationchange', function(event) {
531        matchHeight._update(true, event);
532    });
533
534})(jQuery);
535;
536/**
537 * @file
538 * A JavaScript file for the theme.
539 *
540 * In order for this JavaScript to be loaded on pages, see the instructions in
541 * the README.txt next to this file.
542 */
543
544// JavaScript should be made compatible with libraries other than jQuery by
545// wrapping it with an "anonymous closure". See:
546// - https://drupal.org/node/1446420
547// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth
548(function ($, Drupal, window, document, undefined) {
549
550
551// To understand behaviors, see https://drupal.org/node/756722#behaviors
552Drupal.behaviors.amth_matchHeight_behavior = {
553  attach: function(context, settings) {
554
555    // Place your code here.
556    $('.matchheight', context).matchHeight({
557        byRow: false,
558        property: 'height',
559        target: null,
560        remove: false
561    });
562    $('.matchheight-box', context).matchHeight({
563        byRow: false,
564        property: 'height',
565        target: null,
566        remove: false
567    });
568    $('.matchheight-row', context).matchHeight({
569        byRow: true,
570        property: 'height',
571        target: null,
572        remove: false
573    });
574    $('.matchheight-content', context).matchHeight({
575        byRow: true,
576        property: 'height',
577        target: null,
578        remove: false
579    });
580    // Front page promoted boxes.
581    $('.matchheight-promoted', context).matchHeight({
582        byRow: false,
583        property: 'height',
584        target: null,
585        remove: false
586    });
587
588
589  //Web fonts
590  Drupal.settings.google_webfont_loader_api_setting.active = function() {
591		$.fn.matchHeight._update();
592
593  };
594
595  }
596};
597
598
599})(jQuery, Drupal, this, this.document);;

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.