882 lines
No EOL
26 KiB
JavaScript
882 lines
No EOL
26 KiB
JavaScript
'use strict';
|
|
//@prepros-append polyfills/console-polyfill.js
|
|
//@prepros-append helpers/equalHeight.js
|
|
//@prepros-append elements/sticky-header.js
|
|
//@prepros-append elements/nav.js
|
|
//@prepros-append elements/picturebook.js
|
|
//@prepros-append elements/image-slider.js
|
|
//@prepros-append elements/video-teaser.js
|
|
//@prepros-append elements/big-teaser-tiles.js
|
|
//@prepros-append elements/teaser-tiles.js
|
|
//@prepros-append elements/toggles.js
|
|
//@prepros-append elements/tab-navigation-variable-height.js
|
|
//@prepros-append elements/tab-navigation-auto-height.js
|
|
//@prepros-append elements/locations-map.js
|
|
//disabled: elements/maps.js
|
|
//@prepros-append elements/meta-footer.js
|
|
//@prepros-append elements/waypoints.js
|
|
//@prepros-append elements/searchResultsMore.js
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
(function () {
|
|
var noop = function noop() {};
|
|
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
|
|
var length = methods.length;
|
|
var console = window.console = window.console || {};
|
|
|
|
while (length--) {
|
|
var method = methods[length];
|
|
|
|
if (console[method] == null) {
|
|
console[method] = noop;
|
|
}
|
|
}
|
|
})();
|
|
|
|
/**
|
|
*
|
|
* Plugin by Jan-Gerke Salomon
|
|
* Released under MIT License
|
|
* http://en.wikipedia.org/wiki/MIT_License
|
|
*
|
|
**/
|
|
(function ($) {
|
|
$.fn.eqHeight = function (removeHeight) {
|
|
if ($(this).length == 1) return this;
|
|
|
|
if (removeHeight) {
|
|
$(this).each(function () {
|
|
var style = $(this).attr('style');
|
|
|
|
if (style) {
|
|
style = style.replace(/height:[^;]*;/, '');
|
|
$(this).attr('style', style);
|
|
}
|
|
});
|
|
} else {
|
|
$(this).css('height', 'auto');
|
|
}
|
|
|
|
var els = $(this);
|
|
var startIndex = 0;
|
|
var endIndex = -1;
|
|
var maxH = 0;
|
|
|
|
for (var i = 0; i < $(this).length; ++i) {
|
|
|
|
var cur = $(this[i]);
|
|
var nxt = $(this[i + 1]);
|
|
var off1 = cur.offset().top;
|
|
var off2 = nxt.length ? nxt.offset().top : false;
|
|
|
|
if (cur.outerHeight() > maxH) {
|
|
maxH = cur.outerHeight();
|
|
}
|
|
|
|
endIndex++;
|
|
|
|
//end of row: equalize current row
|
|
if (off1 !== off2) {
|
|
for (var a = startIndex; a <= endIndex; ++a) {
|
|
els.eq(a).css('height', maxH);
|
|
}
|
|
|
|
//reset for next row
|
|
maxH = 0;
|
|
startIndex = endIndex + 1;
|
|
}
|
|
}
|
|
|
|
return this;
|
|
};
|
|
})(jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var BREAKPOINT_MEDIUM_PLUS = 960;
|
|
var SCROLL_OFFSET = 30;
|
|
var STICKY_CLASS = 'sticky-header';
|
|
var header = document.getElementsByTagName('header')[0];
|
|
|
|
function isDesktop() {
|
|
return window.innerWidth > BREAKPOINT_MEDIUM_PLUS;
|
|
}
|
|
|
|
function isScrolled() {
|
|
return window.pageYOffset >= SCROLL_OFFSET;
|
|
}
|
|
|
|
if (isDesktop()) {
|
|
if (isScrolled()) {
|
|
header.classList.add(STICKY_CLASS);
|
|
} else {
|
|
header.classList.remove(STICKY_CLASS);
|
|
}
|
|
} else {
|
|
header.classList.remove(STICKY_CLASS);
|
|
}
|
|
|
|
$(window).on('resize scroll', function () {
|
|
if (isDesktop()) {
|
|
if (isScrolled()) {
|
|
header.classList.add(STICKY_CLASS);
|
|
} else {
|
|
header.classList.remove(STICKY_CLASS);
|
|
}
|
|
} else {
|
|
header.classList.remove(STICKY_CLASS);
|
|
}
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var BREAKPOINT_MEDIUM_PLUS = 960;
|
|
var OPENED_CLASS = 'opened';
|
|
var SLIDE_DURATION = 300;
|
|
|
|
function isMobile() {
|
|
return window.innerWidth <= BREAKPOINT_MEDIUM_PLUS;
|
|
}
|
|
|
|
if (isMobile()) {
|
|
$('nav ul li').removeClass(OPENED_CLASS);
|
|
$('nav ul li .nav-second-level').hide();
|
|
}
|
|
|
|
$(window).resize(function () {
|
|
if (isMobile()) {
|
|
$('nav ul li:not(.opened) .nav-second-level').hide();
|
|
} else {
|
|
$('nav ul li .nav-second-level').show();
|
|
}
|
|
});
|
|
|
|
$('nav ul li .nav-first-level-opener').click(function () {
|
|
var navFirstLevelOpener = $(this);
|
|
var navFirstLevelElement = navFirstLevelOpener.parent();
|
|
var navSecondLevel = navFirstLevelElement.find('.nav-second-level');
|
|
|
|
if (isMobile()) {
|
|
if (navFirstLevelElement.hasClass(OPENED_CLASS)) {
|
|
navFirstLevelElement.removeClass(OPENED_CLASS);
|
|
navSecondLevel.stop().slideUp(SLIDE_DURATION);
|
|
} else {
|
|
navFirstLevelElement.addClass(OPENED_CLASS);
|
|
navSecondLevel.stop().slideDown(SLIDE_DURATION);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var BREAKPOINT_MEDIUM_PLUS = 960;
|
|
var OPENED_CLASS = 'opened';
|
|
var SLIDE_DURATION = 300;
|
|
|
|
function isMobile() {
|
|
return window.innerWidth <= BREAKPOINT_MEDIUM_PLUS;
|
|
}
|
|
|
|
if (isMobile()) {
|
|
$('nav ul li .nav-second-level').removeClass(OPENED_CLASS);
|
|
$('nav ul li .nav-second-level ul').hide();
|
|
}
|
|
|
|
$(window).resize(function () {
|
|
if (isMobile()) {
|
|
$('nav ul li .nav-second-level:not(.opened) ul').hide();
|
|
} else {
|
|
$('nav ul li .nav-second-level ul').show();
|
|
}
|
|
});
|
|
|
|
$('nav ul li .nav-second-level-opener').click(function () {
|
|
var navSecondLevelOpener = $(this);
|
|
var navSecondLevelElement = navSecondLevelOpener.parent();
|
|
var navSecondLevelUl = navSecondLevelElement.find('ul');
|
|
|
|
if (isMobile()) {
|
|
if (navSecondLevelElement.hasClass(OPENED_CLASS)) {
|
|
navSecondLevelElement.removeClass(OPENED_CLASS);
|
|
navSecondLevelUl.stop().slideUp(SLIDE_DURATION);
|
|
} else {
|
|
navSecondLevelElement.addClass(OPENED_CLASS);
|
|
navSecondLevelUl.stop().slideDown(SLIDE_DURATION);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
$(document).ready(function () {
|
|
// eslint-disable-next-line no-undef
|
|
var picturebookSwiper = new Swiper('.picturebook', {
|
|
direction: 'horizontal',
|
|
loop: false,
|
|
simulateTouch: false,
|
|
|
|
navigation: {
|
|
nextEl: '.swiper-button-next',
|
|
prevEl: '.swiper-button-prev'
|
|
}
|
|
});
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
// eslint-disable-next-line no-undef, no-unused-vars
|
|
var imageSlider = new Swiper('.image-slider', {
|
|
direction: 'horizontal',
|
|
loop: false,
|
|
|
|
navigation: {
|
|
nextEl: '.swiper-button-next',
|
|
prevEl: '.swiper-button-prev'
|
|
},
|
|
|
|
pagination: {
|
|
el: '.swiper-pagination',
|
|
type: 'bullets',
|
|
clickable: true
|
|
}
|
|
});
|
|
});
|
|
|
|
$(document).ready(function () {
|
|
$('.video-teaser-youtube').magnificPopup({
|
|
delegate: '.play-button',
|
|
type: 'iframe'
|
|
});
|
|
|
|
$('.video-teaser-local').each(function () {
|
|
var aTag = $(this).find('.play-button').get(0);
|
|
var videoPath = aTag.href;
|
|
|
|
$(this).magnificPopup({
|
|
delegate: '.play-button',
|
|
type: 'iframe',
|
|
|
|
iframe: {
|
|
markup: '<div><video src="' + videoPath + '" controls autoplay playsinline></video></div>'
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
function equalizeBigTeaserTilesHeights() {
|
|
var bigTeaserTiles = document.getElementsByClassName('big-teaser-tiles');
|
|
|
|
for (var bigTeaserTile = 0; bigTeaserTile < bigTeaserTiles.length; bigTeaserTile++) {
|
|
var highestBigTeaserTilesHeight = 0;
|
|
var tiles = bigTeaserTiles[bigTeaserTile].getElementsByClassName('big-teaser-tile');
|
|
|
|
for (var tile = 0; tile < tiles.length; tile++) {
|
|
tiles[tile].style.height = 'auto';
|
|
}
|
|
|
|
for (var _tile = 0; _tile < tiles.length; _tile++) {
|
|
if (tiles[_tile].offsetHeight > highestBigTeaserTilesHeight) {
|
|
highestBigTeaserTilesHeight = tiles[_tile].offsetHeight;
|
|
}
|
|
}
|
|
|
|
if (highestBigTeaserTilesHeight > 0) {
|
|
for (var _tile2 = 0; _tile2 < tiles.length; _tile2++) {
|
|
tiles[_tile2].style.height = highestBigTeaserTilesHeight + 'px';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$(window).on('load', function () {
|
|
equalizeBigTeaserTilesHeights();
|
|
});
|
|
|
|
$(window).on('resize', function () {
|
|
equalizeBigTeaserTilesHeights();
|
|
});
|
|
|
|
$(window).on('load resize', function () {
|
|
$('.teaser-tile').sort(function (a, b) {
|
|
return a.offsetTop - b.offsetTop;
|
|
}).eqHeight();
|
|
});
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var OPENED_CLASS = 'opened';
|
|
var SLIDE_DURATION = 300;
|
|
|
|
$('.toggle').removeClass(OPENED_CLASS);
|
|
$('.toggle-body').hide();
|
|
|
|
$('.toggle-head').click(function () {
|
|
var toggleHead = $(this);
|
|
var toggle = toggleHead.parent();
|
|
var toggleBody = toggle.find('.toggle-body');
|
|
|
|
if (toggle.hasClass(OPENED_CLASS)) {
|
|
toggle.removeClass(OPENED_CLASS);
|
|
toggleBody.stop().slideUp(SLIDE_DURATION);
|
|
} else {
|
|
toggle.addClass(OPENED_CLASS);
|
|
toggleBody.stop().slideDown(SLIDE_DURATION);
|
|
}
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
var TabNavigation = function TabNavigation(node, tabItems, CLASS_ACTIVE) {
|
|
_classCallCheck(this, TabNavigation);
|
|
|
|
_initialiseProps.call(this);
|
|
|
|
this.node = node;
|
|
this.$node = $(this.node);
|
|
this.$nodeParent = this.$node.parent();
|
|
this.tabItems = tabItems;
|
|
this.CLASS_ACTIVE = CLASS_ACTIVE;
|
|
this.$mobileTrigger = $('.tab-navigation-mobile-head', this.$nodeParent);
|
|
this.mobileStateVisible = false;
|
|
|
|
this.hashChange();
|
|
|
|
this.setInitialState();
|
|
window.addEventListener('hashchange', this.onHashChange);
|
|
this.$mobileTrigger.get(0).addEventListener('click', this.mobileTabMenu);
|
|
};
|
|
|
|
var _initialiseProps = function _initialiseProps() {
|
|
var _this = this;
|
|
|
|
this.setInitialState = function () {
|
|
var hash = window.location.hash;
|
|
|
|
var parsedHash = void 0;
|
|
|
|
var $tabItems = $(_this.node).children();
|
|
var $tabWrapper = _this.$nodeParent.parents('.tabs.tabs-variable-height');
|
|
var $tabContent = $('[data-tab]', $tabWrapper);
|
|
|
|
if (hash === '') {
|
|
if (!$tabItems.length && !$tabContent.length) {
|
|
return false;
|
|
}
|
|
|
|
var $firstActiveItem = $tabItems.first();
|
|
var $firstActiveItemText = $firstActiveItem.text();
|
|
|
|
_this.setClassNames($tabItems, _this.CLASS_ACTIVE, true);
|
|
_this.setDisplayProps($tabContent, true);
|
|
_this.populateMobileTrigger($firstActiveItemText);
|
|
|
|
return false;
|
|
} else {
|
|
parsedHash = hash.replace('#', '');
|
|
var $content = $('[data-tab=' + parsedHash + ']', $tabWrapper);
|
|
var $anchor = $('div[data-hash="' + hash + '"]', $tabWrapper);
|
|
var _$firstActiveItem = $tabItems.first();
|
|
var _$firstActiveItemText = _$firstActiveItem.text();
|
|
|
|
if ($anchor.length) {
|
|
_this.populateMobileTrigger($anchor.text());
|
|
} else {
|
|
_this.populateMobileTrigger(_$firstActiveItemText);
|
|
}
|
|
|
|
if (!$content.length) {
|
|
_this.setClassNames($tabItems, _this.CLASS_ACTIVE, true);
|
|
_this.setDisplayProps($tabContent, false);
|
|
}
|
|
}
|
|
|
|
_this.onHashChange();
|
|
};
|
|
|
|
this.hashChange = function () {
|
|
var $tabWrapper = _this.$nodeParent.parents('.tabs.tabs-variable-height');
|
|
var $anchor = $('div[data-hash]', $tabWrapper);
|
|
|
|
$anchor.on('click', function () {
|
|
var $self = $(this);
|
|
var dataHash = $self.attr('data-hash');
|
|
|
|
window.location.hash = dataHash;
|
|
});
|
|
};
|
|
|
|
this.onHashChange = function () {
|
|
var hash = window.location.hash;
|
|
|
|
if (!hash) {
|
|
return false;
|
|
}
|
|
|
|
var $anchor = $('[data-hash$="' + hash + '"]', _this.$node);
|
|
|
|
if ($anchor.length) {
|
|
_this.populateMobileTrigger($anchor.text());
|
|
}
|
|
|
|
_this.hideMobileTabMenu();
|
|
return _this.setActiveState(hash, $anchor);
|
|
};
|
|
|
|
this.setClassNames = function ($element, CLASS_ACTIVE) {
|
|
var initial = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
|
if (!initial) {
|
|
return $element.addClass(CLASS_ACTIVE).siblings().removeClass(CLASS_ACTIVE);
|
|
}
|
|
|
|
return $element.first().addClass(CLASS_ACTIVE).siblings().removeClass(CLASS_ACTIVE);
|
|
};
|
|
|
|
this.setDisplayProps = function ($element) {
|
|
var initial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
|
if ($element.parents('.tabs').hasClass('tabs-variable-height')) {
|
|
if (!initial) {
|
|
$element.css({ 'display': 'block' }).siblings().css({ 'display': 'none' });
|
|
}
|
|
|
|
$element.first().css({ 'display': 'block' }).siblings().css({ 'display': 'none' });
|
|
}
|
|
};
|
|
|
|
this.populateMobileTrigger = function (value) {
|
|
var $span = _this.$mobileTrigger.find('span');
|
|
var delay = 150;
|
|
var CLASS_TRANSITION = 'transitioning';
|
|
|
|
$span.addClass(CLASS_TRANSITION).delay(delay).queue(function (next) {
|
|
$(this).text(value);
|
|
next();
|
|
}).queue(function (next) {
|
|
$(this).removeClass(CLASS_TRANSITION);
|
|
next();
|
|
});
|
|
};
|
|
|
|
this.setActiveState = function (hash, $anchor) {
|
|
var dataHash = hash.replace('#', '');
|
|
var $tabItem = $anchor.parent();
|
|
var $tabContent = $('[data-tab=' + dataHash + ']');
|
|
|
|
_this.setClassNames($tabItem, _this.CLASS_ACTIVE);
|
|
_this.setDisplayProps($tabContent, false);
|
|
};
|
|
|
|
this.mobileTabMenu = function () {
|
|
var breakpointWidth = 1024;
|
|
var breakpoint = window.matchMedia('(max-width: ' + breakpointWidth + 'px)');
|
|
var slideToggleDuration = 300;
|
|
|
|
if (breakpoint.matches) {
|
|
_this.mobileStateVisible = !_this.mobileStateVisible;
|
|
|
|
switch (_this.mobileStateVisible) {
|
|
case true:
|
|
_this.$mobileTrigger.addClass(_this.CLASS_ACTIVE);
|
|
_this.$node.slideDown(slideToggleDuration);
|
|
break;
|
|
case false:
|
|
_this.$mobileTrigger.removeClass(_this.CLASS_ACTIVE);
|
|
_this.$node.slideUp(slideToggleDuration);
|
|
break;
|
|
}
|
|
}
|
|
|
|
window.addEventListener('resize', function () {
|
|
var windowWidth = window.innerWidth;
|
|
|
|
if (windowWidth > breakpointWidth) {
|
|
_this.$mobileTrigger.removeClass(_this.CLASS_ACTIVE);
|
|
_this.$node.removeAttr('style');
|
|
}
|
|
});
|
|
};
|
|
|
|
this.hideMobileTabMenu = function () {
|
|
var breakpointWidth = 1024;
|
|
var breakpoint = window.matchMedia('(max-width: ' + breakpointWidth + 'px)');
|
|
var slideToggleDuration = 300;
|
|
|
|
if (breakpoint.matches && _this.mobileStateVisible === true) {
|
|
_this.$node.slideUp(slideToggleDuration);
|
|
_this.$mobileTrigger.removeClass(_this.CLASS_ACTIVE);
|
|
_this.mobileStateVisible = false;
|
|
}
|
|
};
|
|
};
|
|
|
|
var tabsItem = document.querySelectorAll('.tab-navigation .tab-navigation-items');
|
|
|
|
$(tabsItem).each(function () {
|
|
var $children = $(this).children();
|
|
var CLASS_ACTIVE = 'active';
|
|
|
|
new TabNavigation($(this).get(0), $children, CLASS_ACTIVE);
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
var TabNavigation = function TabNavigation(node, tabItems, CLASS_ACTIVE) {
|
|
_classCallCheck(this, TabNavigation);
|
|
|
|
_initialiseProps2.call(this);
|
|
|
|
this.node = node;
|
|
this.$node = $(this.node);
|
|
this.$nodeParent = this.$node.parent();
|
|
this.tabItems = tabItems;
|
|
this.CLASS_ACTIVE = CLASS_ACTIVE;
|
|
this.$mobileTrigger = $('.tab-navigation-mobile-head', this.$nodeParent);
|
|
this.mobileStateVisible = false;
|
|
|
|
this.hashChange();
|
|
|
|
this.setInitialState();
|
|
window.addEventListener('hashchange', this.onHashChange);
|
|
this.$mobileTrigger.get(0).addEventListener('click', this.mobileTabMenu);
|
|
};
|
|
|
|
var _initialiseProps2 = function _initialiseProps2() {
|
|
var _this2 = this;
|
|
|
|
this.setInitialState = function () {
|
|
var hash = window.location.hash;
|
|
|
|
var parsedHash = void 0;
|
|
|
|
var $tabItems = $(_this2.node).children();
|
|
var $tabWrapper = _this2.$nodeParent.parents('.tabs.tabs-auto-height');
|
|
var $tabContent = $('[data-tab]', $tabWrapper);
|
|
|
|
if (hash === '') {
|
|
if (!$tabItems.length && !$tabContent.length) {
|
|
return false;
|
|
}
|
|
|
|
var $firstActiveItem = $tabItems.first();
|
|
var $firstActiveItemText = $firstActiveItem.text();
|
|
|
|
_this2.setClassNames($tabItems, _this2.CLASS_ACTIVE, true);
|
|
_this2.setDisplayProps($tabContent, true);
|
|
_this2.populateMobileTrigger($firstActiveItemText);
|
|
|
|
return false;
|
|
} else {
|
|
parsedHash = hash.replace('#', '');
|
|
var $content = $('[data-tab=' + parsedHash + ']', $tabWrapper);
|
|
var $anchor = $('div[data-hash="' + hash + '"]', $tabWrapper);
|
|
var _$firstActiveItem2 = $tabItems.first();
|
|
var _$firstActiveItemText2 = _$firstActiveItem2.text();
|
|
|
|
if ($anchor.length) {
|
|
_this2.populateMobileTrigger($anchor.text());
|
|
} else {
|
|
_this2.populateMobileTrigger(_$firstActiveItemText2);
|
|
}
|
|
|
|
if (!$content.length) {
|
|
_this2.setClassNames($tabItems, _this2.CLASS_ACTIVE, true);
|
|
_this2.setDisplayProps($tabContent, false);
|
|
}
|
|
}
|
|
|
|
_this2.onHashChange();
|
|
};
|
|
|
|
this.hashChange = function () {
|
|
var $tabWrapper = _this2.$nodeParent.parents('.tabs.tabs-auto-height');
|
|
var $anchor = $('div[data-hash]', $tabWrapper);
|
|
|
|
$anchor.on('click', function () {
|
|
var $self = $(this);
|
|
var dataHash = $self.attr('data-hash');
|
|
|
|
window.location.hash = dataHash;
|
|
});
|
|
};
|
|
|
|
this.onHashChange = function () {
|
|
var hash = window.location.hash;
|
|
|
|
if (!hash) {
|
|
return false;
|
|
}
|
|
|
|
var $anchor = $('[data-hash$="' + hash + '"]', _this2.$node);
|
|
|
|
if ($anchor.length) {
|
|
_this2.populateMobileTrigger($anchor.text());
|
|
}
|
|
|
|
_this2.hideMobileTabMenu();
|
|
return _this2.setActiveState(hash, $anchor);
|
|
};
|
|
|
|
this.setClassNames = function ($element, CLASS_ACTIVE) {
|
|
var initial = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
|
if (!initial) {
|
|
return $element.addClass(CLASS_ACTIVE).siblings().removeClass(CLASS_ACTIVE);
|
|
}
|
|
|
|
return $element.first().addClass(CLASS_ACTIVE).siblings().removeClass(CLASS_ACTIVE);
|
|
};
|
|
|
|
this.setDisplayProps = function ($element) {
|
|
var initial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
|
|
if ($element.parents('.tabs').hasClass('tabs-auto-height')) {
|
|
if (!initial) {
|
|
$element.css({ 'visibility': '' }).siblings().css({ 'visibility': 'hidden' });
|
|
}
|
|
|
|
$element.first().css({ 'visibility': '' }).siblings().css({ 'visibility': 'hidden' });
|
|
}
|
|
};
|
|
|
|
this.populateMobileTrigger = function (value) {
|
|
var $span = _this2.$mobileTrigger.find('span');
|
|
var delay = 150;
|
|
var CLASS_TRANSITION = 'transitioning';
|
|
|
|
$span.addClass(CLASS_TRANSITION).delay(delay).queue(function (next) {
|
|
$(this).text(value);
|
|
next();
|
|
}).queue(function (next) {
|
|
$(this).removeClass(CLASS_TRANSITION);
|
|
next();
|
|
});
|
|
};
|
|
|
|
this.setActiveState = function (hash, $anchor) {
|
|
var dataHash = hash.replace('#', '');
|
|
var $tabItem = $anchor.parent();
|
|
var $tabContent = $('[data-tab=' + dataHash + ']');
|
|
|
|
_this2.setClassNames($tabItem, _this2.CLASS_ACTIVE);
|
|
_this2.setDisplayProps($tabContent, false);
|
|
};
|
|
|
|
this.mobileTabMenu = function () {
|
|
var breakpointWidth = 1024;
|
|
var breakpoint = window.matchMedia('(max-width: ' + breakpointWidth + 'px)');
|
|
var slideToggleDuration = 300;
|
|
|
|
if (breakpoint.matches) {
|
|
_this2.mobileStateVisible = !_this2.mobileStateVisible;
|
|
|
|
switch (_this2.mobileStateVisible) {
|
|
case true:
|
|
_this2.$mobileTrigger.addClass(_this2.CLASS_ACTIVE);
|
|
_this2.$node.slideDown(slideToggleDuration);
|
|
break;
|
|
case false:
|
|
_this2.$mobileTrigger.removeClass(_this2.CLASS_ACTIVE);
|
|
_this2.$node.slideUp(slideToggleDuration);
|
|
break;
|
|
}
|
|
}
|
|
|
|
window.addEventListener('resize', function () {
|
|
var windowWidth = window.innerWidth;
|
|
|
|
if (windowWidth > breakpointWidth) {
|
|
_this2.$mobileTrigger.removeClass(_this2.CLASS_ACTIVE);
|
|
_this2.$node.removeAttr('style');
|
|
}
|
|
});
|
|
};
|
|
|
|
this.hideMobileTabMenu = function () {
|
|
var breakpointWidth = 1024;
|
|
var breakpoint = window.matchMedia('(max-width: ' + breakpointWidth + 'px)');
|
|
var slideToggleDuration = 300;
|
|
|
|
if (breakpoint.matches && _this2.mobileStateVisible === true) {
|
|
_this2.$node.slideUp(slideToggleDuration);
|
|
_this2.$mobileTrigger.removeClass(_this2.CLASS_ACTIVE);
|
|
_this2.mobileStateVisible = false;
|
|
}
|
|
};
|
|
};
|
|
|
|
var tabsItem = document.querySelectorAll('.tab-navigation .tab-navigation-items');
|
|
|
|
$(tabsItem).each(function () {
|
|
var $children = $(this).children();
|
|
var CLASS_ACTIVE = 'active';
|
|
|
|
new TabNavigation($(this).get(0), $children, CLASS_ACTIVE);
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var BREAKPOINT_SMALL = 560;
|
|
var OPENED_CLASS = 'opened';
|
|
var SLIDE_DURATION = 300;
|
|
|
|
function isMobile() {
|
|
return window.innerWidth <= BREAKPOINT_SMALL;
|
|
}
|
|
|
|
if (isMobile()) {
|
|
$('.location-address').removeClass(OPENED_CLASS);
|
|
$('.location-address-body').hide();
|
|
}
|
|
|
|
$(window).resize(function () {
|
|
if (isMobile()) {
|
|
$('.location-address:not(.opened) .location-address-body').hide();
|
|
} else {
|
|
$('.location-address-body').show();
|
|
}
|
|
});
|
|
|
|
$('.location-address-head').click(function () {
|
|
var locationAddressHead = $(this);
|
|
var locationAddress = locationAddressHead.parent();
|
|
var locationAddressBody = locationAddress.find('.location-address-body');
|
|
|
|
if (isMobile()) {
|
|
if (locationAddress.hasClass(OPENED_CLASS)) {
|
|
locationAddress.removeClass(OPENED_CLASS);
|
|
locationAddressBody.stop().slideUp(SLIDE_DURATION);
|
|
} else {
|
|
locationAddress.addClass(OPENED_CLASS);
|
|
locationAddressBody.stop().slideDown(SLIDE_DURATION);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var BREAKPOINT_SMALL = 560;
|
|
var OPENED_CLASS = 'opened';
|
|
var SLIDE_DURATION = 300;
|
|
|
|
function isMobile() {
|
|
return window.innerWidth <= BREAKPOINT_SMALL;
|
|
}
|
|
|
|
if (isMobile()) {
|
|
$('.meta-footer-contact-entity').removeClass(OPENED_CLASS);
|
|
$('.meta-footer-contact-entity-body').hide();
|
|
}
|
|
|
|
$(window).resize(function () {
|
|
if (isMobile()) {
|
|
$('.meta-footer-contact-entity:not(.opened) .meta-footer-contact-entity-body').hide();
|
|
} else {
|
|
$('.meta-footer-contact-entity-body').show();
|
|
}
|
|
});
|
|
|
|
$('.meta-footer-contact-entity-head').click(function () {
|
|
var metaFooterContactEntityHead = $(this);
|
|
var metaFooterContactEntity = metaFooterContactEntityHead.parent();
|
|
var metaFooterContactEntityBody = metaFooterContactEntity.find('.meta-footer-contact-entity-body');
|
|
|
|
if (isMobile()) {
|
|
if (metaFooterContactEntity.hasClass(OPENED_CLASS)) {
|
|
metaFooterContactEntity.removeClass(OPENED_CLASS);
|
|
metaFooterContactEntityBody.stop().slideUp(SLIDE_DURATION);
|
|
} else {
|
|
metaFooterContactEntity.addClass(OPENED_CLASS);
|
|
metaFooterContactEntityBody.stop().slideDown(SLIDE_DURATION);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
|
|
var waypointsHeadline = $('h2, .h2');
|
|
waypointsHeadline.each(function () {
|
|
var element = $(this);
|
|
element.addClass('waypoint');
|
|
|
|
element.waypoint({
|
|
handler: function handler(direction) {
|
|
if (direction == 'down') {
|
|
element.addClass('waypoint-triggered');
|
|
}
|
|
},
|
|
offset: '65%'
|
|
});
|
|
});
|
|
|
|
var waypointsList = $('.icon-headline-text');
|
|
waypointsList.each(function () {
|
|
var element = void 0;
|
|
|
|
if ($(this).parents('.container-2-cols').find('.icon-headline-text').length > 1) {
|
|
element = $(this).parents('.container-2-cols');
|
|
} else {
|
|
element = $(this);
|
|
}
|
|
|
|
element.addClass('waypoint');
|
|
|
|
var listItems = element.find('li');
|
|
listItems.addClass('waypoint');
|
|
|
|
element.waypoint({
|
|
handler: function handler(direction) {
|
|
if (direction == 'down') {
|
|
fadeInElements(listItems, 200, 'waypoint-triggered');
|
|
}
|
|
},
|
|
offset: '85%'
|
|
});
|
|
});
|
|
|
|
function fadeInElements(element, duration, customClass) {
|
|
element.each(function (n) {
|
|
var _this3 = this;
|
|
|
|
setTimeout(function () {
|
|
$(_this3).addClass(customClass);
|
|
}, duration * n);
|
|
});
|
|
}
|
|
});
|
|
})(window, jQuery);
|
|
|
|
(function (window, $) {
|
|
$(function () {
|
|
if ($('.tx-indexedsearch-res').length) {
|
|
$('.tx-indexedsearch-res').each(function () {
|
|
var $this = $(this);
|
|
var linkHref = $this.find('.tx-indexedsearch-title a').attr('href');
|
|
$this.find('.link-more').attr('href', linkHref);
|
|
var linkText = $this.find('.tx-indexedsearch-title a').html();
|
|
$this.find('.link-more span').html(linkText);
|
|
});
|
|
}
|
|
});
|
|
})(window, jQuery); |