$(function() {
var header = $(".navbar");
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if (scroll >= 135) {
header.addClass("navbar-collapse");
} else {
header.removeClass("navbar-collapse");
}
});
});
var start_date = new Date("2020-09-15T19:00:00+02:00"),
countDown;
$(document).ready(function() {
waitForElementToDisplay('.release-campagne', 40, 200, removeArticles);
waitForElementToDisplay('#tb-days', 40, 200, startCountDown);
});
function waitForElementToDisplay(selector, time, tries, callFunc) {
if (document.querySelector(selector) !== null) {
callFunc();
} else {
if (tries >= 1) {
setTimeout(function() {
waitForElementToDisplay(selector, time, tries - 1, callFunc);
}, time);
} else {
return;
}
}
}
function removeArticles() {
if (new Date() <= start_date) {
$('.release-campagne').parent('article').remove();
}
}
function startCountDown() {
countDown = setInterval(function() {
countDownTimer((start_date - new Date()) / 1000);
}, 500);
}
var last_day,
last_hour,
last_minute,
last_second;
function countDownTimer(seconds) {
var rem_days = Math.floor((seconds / 86400) % 60),
days = (rem_days * 86400),
rem_hours = Math.floor(((seconds - days) / 3600) % 60),
hours = (rem_days * 86400) + (rem_hours * 3600),
rem_minutes = Math.floor((seconds - hours) / 60),
rem_seconds = Math.floor(seconds % 60);
$('#tb-days').text(pad(rem_days));
$('#tb-hours').text(pad(rem_hours));
$('#tb-minutes').text(pad(rem_minutes));
$('#tb-seconds').text(pad(rem_seconds));
countDownSet(pad(rem_days), pad(rem_hours), pad(rem_minutes), pad(rem_seconds));
if (seconds <= 0) {
clearInterval(countDown);
$('.top-promo>div').html('Unsere exklusiven WYSIWYG-Tiere sind nun online');
}
}
function countDownSet(days, hours, minutes, seconds) {
if (last_second != seconds) {
$('#tb-seconds').addClass('cd-pop');
last_second = seconds;
} else {
$('#tb-seconds').removeClass('cd-pop');
}
if (last_minute != minutes) {
$('#tb-minutes').addClass('cd-pop');
last_minute = minutes;
} else {
$('#tb-minutes').removeClass('cd-pop');
}
if (last_hour != hours) {
$('#tb-hours').addClass('cd-pop');
last_hour = hours;
} else {
$('#tb-hours').removeClass('cd-pop');
}
if (last_day != days) {
$('#tb-days').addClass('cd-pop');
last_day = days;
} else {
$('#tb-days').removeClass('cd-pop');
}
}
function pad(str) {
str = str.toString();
return str.length < 2 ? pad("0" + str, 2) : str;
}
Register first
Registration information
We offer the storage of your personal details in a password-protected customer account, in order for you not to have to enter your name and address during your next purchase.
Your address data will be saved by completing the registration.
You can delete your customer account at all times. To do so, please contact the operator of this page.
The next time you visit our online store all you need to view your personal details is your email address and password.
Log in
Register now
Registration information
We offer the storage of your personal details in a password-protected customer account, in order for you not to have to enter your name and address during your next purchase.
Your address data will be saved by completing the registration.
You can delete your customer account at all times. To do so, please contact the operator of this page.
The next time you visit our online store all you need to view your personal details is your email address and password.