// call functions for the clock
function startTime(){
	var today=new Date();
	var h=today.getHours();
	var m=today.getMinutes();
	var s=today.getSeconds();
	// add a zero in front of numbers<10
	m=checkTime(m);
	s=checkTime(s);
	document.getElementById('clock').innerHTML=h+":"+m+":"+s;
	t=setTimeout('startTime()',500);
}
		
function checkTime(i){
	if (i<10){
	  i="0" + i;
	}
	return i;
}

// Call function for putting out multiple fields
$(document).ready(function(){
	$('#contact_options').EnableMultiField();
});

// Call for tabs in use of cookies
$(function(){
	// Make tab work with toggle effect and cookie
	$("#tabs").tabs({ fx: { opacity: "toggle" }, cookie: { expires: 30 } });
	// If a tab is clicked set the active state
	$("#tabs ul li a").click(function(){ 
		// Remove all active states from the tabs
		$("#tabs ul li").removeClass("active");
		// Add only the active class to the clicked tab
		$(this).parents("#tabs ul li").addClass("active");
	});
});

// Call function for the datepickers
$(function()
{
	$('.date-pick').datePicker();
});
