// JavaScript Document
menu = function() {
	var path = window.location.href.split("/");
	var path = path[path.length-1];
	$('#navigatie-ul a[@href="' + path + '"]').addClass("current");
	
	var dash = path.indexOf("_");
	if(dash != -1) {
		var path2 = path.substring(0,dash);
		path2 = path2 + '.htm';
		$('#navigatie-ul a[@href="' + path2 + '"]').addClass("current");
	};
	$(".animated").show("slow");
};
thumbnails = function() {
	$("a.thumb").thumbs(); // the wrapping function
	$("a.thumb-small").thumbssmall(); // the wrapping function
	$("a.thumb img, a.thumb-small img").thumbsImg(); // the img positioning function (optional)
};
lightbox = function() {
	// Use this example, or...
	$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel
};
fixpng = function() {
	// apply to all png images 
	$('img[@src$=.png], h1#title').ifixpng(); 
};
validateform = function() {
	// validate the comment form when it is submitted
	// validate signup form on keyup and submit
	$("#contactform").validate({
		rules: {
			naam: "required",
			adres: "required",
			postcode: {
				required: true,
				minlength: 4
			},
			plaats: "required",
			telefoon: "required",
			email: {
				required: true,
				email: true
			}
		},
		messages: {
			naam: "Gelieve uw naam in te vullen.",
			adres: "Gelieve uw adres in te vullen.",
			postcode: {
				required: "Gelieve uw postcode in te vullen.",
				minlength: "Uw postcode moet minstens 4 karakters bevatten."
			},
			plaats: "Gelieve uw woonplaats in te vullen.",
			telefoon: "Gelieve een telefoonnummer in te vullen.",
			email: "Gelieve een geldig e-mailadres in te vullen"
		}
	});
};
