$(document).ready(function() {
	if(!(parseInt($('#Seconds').html()) == 0 && parseInt($('#Minutes').html()) == 0 && parseInt($('#Hours').html()) == 0 && parseInt($('#Days').html()) == 0)){
	interval = setInterval('seconds()', 1000);
	}
    //setInterval('minutes()', 60000);
});

function seconds() {
	if(parseInt($('#Seconds').html()) - 1 < 0) {
    	
			 if(minutes()){
			  $('#Seconds').html(59);
			 } else {
				 $('#Seconds').html(59);
			 }
    	
    } else {
    	
	$('#Seconds').html(parseInt($('#Seconds').html()) - 1);
    }
}

function minutes() {
	if(parseInt($('#Minutes').html()) - 1 < 0) {
		 if(hours()){
    		$('#Minutes').html(59);
		 } else {
			 $('#Minutes').html(59);
		 }
        return false;
    } else {
    	
	$('#Minutes').html(parseInt($('#Minutes').html()) - 1);
    }
	return true;
}

function hours() {
	if(parseInt($('#Hours').html()) - 1 < 0) {
		if(days()) {
    		$('#Hours').html(23);
		} else {
			$('#Hours').html(23);
		}
        return false;
    } else {
    	
	$('#Hours').html(parseInt($('#Hours').html()) - 1);
    }
	return true;
}

function days() {
	if(parseInt($('#Days').html()) - 1 < 0) {
 
        clearInterval(interval);
		return false;
    } else {
    	
	$('#Days').html(parseInt($('#Days').html()) - 1);
    }
	return true;
}