// JavaScript Document

$(document).ready(function() {
						   
   // do stuff when DOM is ready
   
   $("#subMenu a").each(function() {
		if(this.href == window.location) {
			var copyHtml = $(this).html();
			//$(this).append("<li class=\"actievePagina\" >" + copyHtml + "</li>");
			$(this).parent().addClass("actievePagina");
			$('#menuGuide').css('display','none');
			
		}
		
	}); 
   
   $("#menuItems").mousemove(function(e){
			var mouseX = e.pageX;
			mouseX = mouseX - 688;
			$('#menuGuide').animate({marginLeft: mouseX},0);
			//$('#menuGuide').animate({display: inherit}, 50);
			//$('#menuGuide').css('display','inherit');
								   
		
		});
  	
	//Aanpasbare lijn detail!
	var hoogteContent = $("#content").height();  
	if(hoogteContent > 530){
		
		$("#lijnDetail").css("height",hoogteContent-504);
		
		
	}else
	{
		
		$("#lijnDetail").css("height",130);
	
	}
	
	
	$("#menu a").each(function() {
		if(this.href == window.location) {
			var copyHtml = $(this).html();
			//$(this).append("<li class=\"actievePagina\" >" + copyHtml + "</li>");
			$(this).css("border-bottom","1px solid #f32b59");
			//$(this).css("border-top","1px solid #00AEEF");
			$('#menuGuide').css('display','none');
			
		}
		
	}); 
							




		//initiate validator on load
		$(function() {
		// validate contact form on keyup and submit
		$("#form1").validate({
		//set the rules for the field names
		rules: {
		naam: {
			required: true,
			minlength: 2
		},
		
		voornaam:{
			required: true,
			minlength: 2
		},
		
		email: {
			required: true,
			email: true
		},
		
		},
		
		//set messages to appear inline
		messages: {
		naam: "<br />Gelieve uw naam in te vullen.",
		email: "<br />Gelieve een geldig email in te vullen.",
		voornaam: "<br />Gelieve uw voornaam in te vullen."
		}
		});
		});






	
 });

