function updateClock() {
	  var currentTime = new Date ();
	 
	  var currentHours = currentTime.getHours();
	  var currentMinutes = currentTime.getMinutes();
	  var currentSeconds = currentTime.getSeconds();
	 
	  // Pad the minutes and seconds with leading zeros, if required
	  currentHours = ( currentHours < 10 ? "0" : "" ) + currentHours;
	  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
	  currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
	 
	  // Compose the string for display
	  var currentTimeString = currentHours + ":" + currentMinutes;// + ":" + currentSeconds + " " + timeOfDay;
	 
	  // Update the time display
	  $(document).find('#time').text(currentTimeString);
}

$(document).ready(function() {
	
	updateClock();
	
	setInterval('updateClock()', 1000);
	
});
