2015-12-11 13:51:46 +01:00
|
|
|
|
2016-03-13 05:32:37 +01:00
|
|
|
//=include _dnt.js
|
2016-03-12 18:53:03 +01:00
|
|
|
//=include _faq.js
|
|
|
|
|
2015-09-24 08:24:34 +02:00
|
|
|
$(document).ready(function(){
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2016-03-13 05:32:37 +01:00
|
|
|
if ( $('.subtemplate--faq').length ) {
|
|
|
|
Faq.init();
|
|
|
|
}
|
2016-03-12 18:53:03 +01:00
|
|
|
|
2015-09-25 07:55:31 +02:00
|
|
|
slider();
|
2015-10-16 05:27:03 +02:00
|
|
|
marketplaces();
|
|
|
|
tourNav();
|
2015-10-17 02:32:29 +02:00
|
|
|
mobileNav();
|
|
|
|
stickyNav();
|
2015-09-17 01:26:48 +02:00
|
|
|
|
2015-10-16 05:27:03 +02:00
|
|
|
function tourNav() {
|
2015-11-02 11:18:22 +01:00
|
|
|
|
|
|
|
if ($('body').hasClass('page-template-template-tour')) {
|
|
|
|
$('.tour-switcher .menu').prepend($('.tour-switcher .current-menu-item'));
|
|
|
|
}
|
|
|
|
|
2015-10-16 05:27:03 +02:00
|
|
|
$('.current-menu-item a').click(function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
$('#menu-landing-page-menu').toggleClass('active');
|
|
|
|
});
|
|
|
|
}
|
2015-09-25 07:55:31 +02:00
|
|
|
function slider() {
|
|
|
|
$('.case-study:gt(0)').addClass('hidden');
|
2015-09-24 08:24:34 +02:00
|
|
|
|
2015-09-25 07:55:31 +02:00
|
|
|
$('.slider-action').click(function(){
|
2015-09-24 08:24:34 +02:00
|
|
|
|
2015-09-25 07:55:31 +02:00
|
|
|
var direction = $(this).attr('id');
|
2015-09-24 08:24:34 +02:00
|
|
|
|
2015-09-25 07:55:31 +02:00
|
|
|
if (direction === 'back') {
|
|
|
|
$('.case-study').addClass('hidden');
|
|
|
|
$('.case-study').last().prependTo('.slide-container').removeClass('hidden');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
displayed = $('.case-study').first();
|
|
|
|
displayed.addClass('hidden');
|
|
|
|
$('.case-study').eq(1).removeClass('hidden');
|
|
|
|
displayed.appendTo('.slide-container');
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
2016-03-12 16:12:07 +01:00
|
|
|
|
2015-10-16 05:27:03 +02:00
|
|
|
function marketplaces() {
|
|
|
|
$('.top-tab').click(function(){
|
|
|
|
$('.top-tab').removeClass('active');
|
|
|
|
$(this).addClass('active');
|
|
|
|
var contentToShow = $(this).data('tab');
|
|
|
|
$('.marketplace-info').removeClass('active');
|
|
|
|
$('#'+contentToShow).addClass('active');
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
2015-10-17 02:32:29 +02:00
|
|
|
|
2016-01-16 20:58:40 +01:00
|
|
|
});
|
|
|
|
|
2015-10-17 02:32:29 +02:00
|
|
|
|
|
|
|
|
2016-01-16 20:58:40 +01:00
|
|
|
function stickyNav() {
|
|
|
|
var sticky = $('.sticky');
|
|
|
|
|
|
|
|
$(window).on('load resize scroll', function() {
|
|
|
|
if ( $(window).width() > 768 ) {
|
|
|
|
if ( $(window).scrollTop() > 100 ) {
|
|
|
|
sticky.addClass('stuck');
|
|
|
|
} else {
|
|
|
|
sticky.removeClass('stuck');
|
2015-10-17 02:32:29 +02:00
|
|
|
}
|
2016-01-16 20:58:40 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2015-09-25 07:55:31 +02:00
|
|
|
|
2016-01-16 20:58:40 +01:00
|
|
|
|
|
|
|
function mobileNav() {
|
2016-02-02 22:12:40 +01:00
|
|
|
|
2016-02-02 22:54:20 +01:00
|
|
|
var hamburger = $('.hamburger'),
|
|
|
|
popup = $('.mobile-nav');
|
|
|
|
|
|
|
|
hamburger.click(function(e) {
|
|
|
|
e.preventDefault();
|
2016-02-02 22:12:40 +01:00
|
|
|
|
|
|
|
// toggle popup
|
|
|
|
popup.toggleClass('active');
|
2016-02-02 22:54:20 +01:00
|
|
|
hamburger.toggleClass('open');
|
2016-02-02 22:12:40 +01:00
|
|
|
|
|
|
|
// bind the hide controls
|
|
|
|
$(document).bind('click.hidepopup', function() {
|
|
|
|
// hide popup
|
|
|
|
popup.removeClass('active');
|
2016-02-02 22:54:20 +01:00
|
|
|
hamburger.removeClass('open');
|
2016-02-02 22:12:40 +01:00
|
|
|
// unbind the hide controls
|
|
|
|
$(document).unbind('click.hidepopup');
|
|
|
|
});
|
|
|
|
|
|
|
|
// dont close thepop when you click on thepop
|
|
|
|
popup.on('click', function(e) {
|
|
|
|
e.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
// and dont close thepop now
|
|
|
|
e.stopPropagation();
|
2016-01-16 20:58:40 +01:00
|
|
|
});
|
|
|
|
}
|