function checkVideoVote(){

	var errorMsg = "";

	if($("input#name").val() == ""){
		errorMsg += 'Naam niet ingevuld!\r\n';
	}

	if($("input#email").val() == ""){
		errorMsg += 'E-mailadres niet ingevuld!\r\n';
	}
	/*
	if($("input#notify:checked").length == 0){
		errorMsg += 'Hou mij op de hoogte is niet aangevinkt!\r\n';
	}*/

	if(errorMsg != ""){
		alert(errorMsg);
		return false;
	} else {
		return true;
	}

}

$( function() {

	$("td.topmenu_item").not(".selected").hover( function() {
		$(this).css({"background-color": "#C11F27", "cursor": "pointer"});
		$("td.topmenu_item").filter(".selected").css("background-color","transparent");
	}, function() {
		$(this).css({"background-color": "transparent", "cursor": "default"});
		if ( $("table.submenu").filter("[@rel="+$(this).attr("rel")+"]").css("display") != "block" ) {
			$("td.topmenu_item").filter(".selected").css("background-color","#C11F27");
		}
	});

	$("td.topmenu_item").hover( function() {
		$("table.submenu").hide();
		$("table.submenu").filter("[@rel="+$(this).attr("rel")+"]").show();
	}, function() {
		$("td.topmenu_item").filter(".selected").css("background-color","#C11F27");
		$("table.submenu").hide();
	});

	$("td.topmenu_item").not(".selected").click( function() {
		document.location.href = $(this).find("a").attr("href");
	});

	$("table.submenu").hover( function() {
		$("td.topmenu_item").filter("[@rel="+$(this).attr("rel")+"]").css("background-color","#C11F27");
		$("td.topmenu_item").filter(".selected").css("background-color","transparent");
		$(this).show();
	}, function() {
		$("td.topmenu_item").filter("[@rel="+$(this).attr("rel")+"]").css("background-color","transparent");
		$("td.topmenu_item").filter(".selected").css("background-color","#C11F27");
		$(this).hide();
	});

	$("table#sidemenu tr").not(".selected").hover( function() {
		$(this).find("img:first").attr("src", "/site/vnf/design/graphics/bullet_sidemenu.gif");
	}, function() {
		$(this).find("img:first").attr("src", "/site/vnf/design/graphics/transp.gif");
	});

	$("form#videovote").submit(function(){
		return checkVideoVote();
	});

});
