// JavaScript Document
$(document).ready(function(){
	var bodyClass = $('body').attr("class");
	var currentMenu = $('#navigation li a img.' + bodyClass);
	currentMenu.attr("src", "img/nav/" + currentMenu.attr("class") + "_over.jpg");
	
	//$("content").height($(document).height());
	$('content').css('height', '1500px');
	
	$('#navigation li a img').hover(
		function () {
			$(this).attr("src", "img/nav/" + $(this).attr("class") + "_over.jpg");
		},
		function () {
			if ($(this).attr("class") != $('body').attr("class"))
				$(this).attr("src", "img/nav/" + $(this).attr("class") + ".jpg");
		}
	);
	$("#email").focus(
		function () {
			$(this).val("");
		}
	);
	$("#email").blur(
		function () {
			if ($(this).val() == "")
				$(this).val("je email adres");
		}
	);
	$('#nieuwsbriefform').submit(
		function () {
			if ($("#email").val() == "je email adres" || $("#email").val().length < 6) {
				alert("Gelieve een geldig email adres in te vullen");
				return false;	
			}
		}
	);
	$('#contactform').submit(
		function () {
			if ($("#email").val().length < 6 ||
				$("#naam").val().length < 2 ||
				$("#opmerking").val().length < 2 ||
				$("#telefoon").val().length < 2) {
				alert("Gelieve alle verplichte velden in te vullen");
				return false;	
			}
		}
	);
});
