$(function() {
    var dt = new Date();
    var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
    var countDownDate = new Date(months[dt.getMonth()] + " " + dt.getDate() + ", " + dt.getFullYear() + " " + (parseInt(dt.getHours()) + 1) + ":00:00").getTime();
    var interval = setInterval(function() {
        var now = new Date().getTime();
        var distance = countDownDate - now;
        var days = Math.floor(distance / (1000 * 60 * 60 * 24));
        var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
        var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
        var seconds = Math.floor((distance % (1000 * 60)) / 1000);
        $('.timer').html('<div class="se_field"><div class="se_top">' + hours + '</div><div class="se_bottom">Hours</div></div><div class="se_field"><div class="se_top">' + minutes + '</div><div class="se_bottom">Minutes</div></div><div class="se_field"><div class="se_top">' + seconds + '</div><div class="se_bottom">Seconds</div></div>');
        if (distance < 0) {
            clearInterval(interval);
            $('.timer').html("Offer Expired");
        }
    }, 1000);
});