sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
//window.onload = sfHover;
if (window.attachEvent) window.attachEvent("onload", sfHover);

$(document).ready(function() {
	var dove = 0;
	$("#nav>li").hover(
		function () {
			if ($(this).children("a:first").hasClass("evid")) {
				dove = 1;
			} else {
				$(this).children("a:first").addClass("evid");
			}
		},
		function () {
			if (dove != 1) {
				$(this).children("a:first").removeClass("evid");
			}
			dove = 0;
		}
	);
});

// funzione per far aprire un pop up
function gowindow(str, titolo,w,h) {
	openwin = window.open(str,titolo,'width='+ w +',height='+ h +',status=no,scrollbars=no,resizable=no,location=no,toolbar=no');
}


// richiama calendario
$(function() {
	$('.date-pick').datePicker();
	
});