var globalSecound = 0 , mintue = 61 , clearId = '';
function mintueCoverSecound(mintue){
return mintue * 60;
}
globalSecound = mintueCoverSecound(mintue);
function secoundCoverMinute(){
globalSecound --;
var hours = Math.floor(globalSecound / (60 * 60)) + '';
if(hours.length == 1){
hours = '0' + hours;
}
var mins = (Math.floor((globalSecound / 60) % 60)) + '';
if(mins.length == 1){
mins = '0' + mins;
}
var secs = Math.floor(globalSecound % 60) + '';
if(secs.length == 1){
secs = '0' + secs;
}
$('.time').html(hours + ':' + mins + ':' + secs);
if(globalSecound == 0){
clearInterval(clearId);
return;
}
}
clearId = setInterval('secoundCoverMinute()' , 1000);