_satellite.pushAsyncScript(function(event, target, $variables){
if(document.getElementById('date')){
// Set the date & time we're counting down to
var getDate = document.getElementById('date').innerHTML;
var countDownDate = new Date(getDate),
countDownTime = countDownDate.getTime();
function showRemaining() {
var thisDate = new Date(), // Get todays date
now = thisDate.getTime(), // Get todays time
distance = countDownTime - now, // Time calculations for days, hours, minutes and seconds
days = Math.floor(distance / (1000 * 60 * 60 * 24)),
hours = Math.floor(distance / (1000 * 60 * 60 )), //set this to ignore day and count over 24 hours
minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)),
seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Display the result in the element with id="countdown"
if (hours < '1') {
document.getElementById("countdown").innerHTML = ""
+ minutes + " mins " + seconds + " secs";
}
else {
document.getElementById("countdown").innerHTML = "" + hours + " hours "
+ minutes + " mins " + seconds + " secs";
}
}
// run function ASAP
showRemaining();
// run function once a second
var timer = setInterval(showRemaining, 1000); //Check every second
// after two hours stop timer and clear timer html
setTimeout(function(){
clearInterval(timer);
document.getElementById("countdown").innerHTML = "";
}, 72000000)
}
});