var timer = null;

$(document).ready(function() {
	
	$("#menu").hide();
	
	$("#carousel").flash({
		swf: "static/swf/Carousel.swf",
		width: 944,
		height: 500
	});
	
	$(".trigger").mouseover(function(i) {
		clearTimeout(timer);
		$("#menu").slideDown();
	});
	
	$(".trigger").mouseout(function(i) {
		timer = setTimeout("restoreMenu()", 500);
	});
	
	$("#select-project").change(function() {
		var v = $(this).val();
		if(v !== "") {
			location.href = "werk/"+v;
		}
	});
	
});

function restoreMenu() {
	$("#menu").slideUp();
}