// JavaScript Document
var contentleft;
var contentmiddle;
var contentright;

$(document).ready(function(){
	hoofdmenu();
	
//	contentleft = $("#contentleft").height();
//	contentmiddle = $("#contentmiddle").height();
//	contentright = $("#contentright").height();
//	pos(contentleft,contentmiddle,contentright);
});

//$(window).resize(function(){pos(contentleft,contentmiddle,contentright)});

function hoofdmenu(){
	$("#menunav ul").css({display: "none"}); // Opera Fix
	$("#menunav li").hover(function(){
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(100);
//				$(this).find('ul:first').css({visibility: "visible",display: "none"}).show();
	},function(){
		$(this).find('ul:first').css({visibility: "hidden"});
	});
}

function pos(ot,on,oa){

	var windowheight = $(window).height()-150;
	var maxheight;
	
	maxheight = ot;
	if(on > maxheight){
		maxheight = on;
	}
	if(oa > maxheight){
		maxheight = oa;
	}
	if(windowheight > maxheight){
		maxheight = windowheight;
	}
	
	$("#contentleft").height(maxheight);
	$("#contentmiddle").height(maxheight);
	$("#contentright").height(maxheight);
	
}