// NON-FLASH DIGIAL CLOCK
var clock;
setClock();

function setClock() {
	var weekday 	= new Array(7)
	weekday[0] 		= "DOM.";
	weekday[1] 		= "LUN.";
	weekday[2] 		= "MAR.";
	weekday[3] 		= "MI\311.";
	weekday[4] 		= "JUE.";
	weekday[5] 		= "VIE.";
	weekday[6] 		= "S\301B.";
	
	time=new Date(); // time object
	var minutes 	= time.getMinutes()
	var hours 		= time.getHours()
	
	ampm = ((hours >= 12) ? "PM" : "AM"); 
	hours = ((hours == 0) ? "12" : (hours > 12) ? hours - 12 : hours); 
	minutes = ((minutes < 10) ? "0" + minutes : minutes);
	
	clock = weekday[time.getDay()] + " " + hours + ":" + minutes + " "+ ampm;
}

// FUNCTION TO TOGGLE LABEL VALUES IN FORM FIELDS
jQuery.fn.toggleVal = function(focusClass) {
	this.each(function() {
		$(this).focus(function() {
			// clear value if current value is the default
			if($(this).val() == this.defaultValue) { $(this).val(""); }
			
			// if focusClass is set, add the class
			if(focusClass) { $(this).addClass(focusClass); }
		}).blur(function() {
			// restore to the default value if current value is empty
			if($(this).val() == "") { $(this).val(this.defaultValue); }
			
			// if focusClass is set, remove class
			if(focusClass) { $(this).removeClass(focusClass); }
		});
	});
}