
//dummy
var popInfo = function(){}

//emulate popup function...
var popWindow = function(u,w,h){
	e = u.substring(u.lastIndexOf('.')+1).toLowerCase();
	if(e == 'png' || e == 'gif' || e == 'jpg')
		popEl = $("<div class=\"popWindowDiv clear\" style=\"display:block;\"><img src=\""+ u +"\" width=\"" + w + "\" height=\"" + h + "\" border=\"0\" /></div>",{overlay:20});
	else
		popEl = $("<div class=\"popWindowDiv clear\" style=\"display:block;\"><iframe src=\""+ u +"\"  width=\"" + w + "\" height=\"" + h + "\" border=\"0\" frameborder=\"0\"></iframe></div>",{overlay:20});
	popEl.modal({
		onOpen: function (dialog) {
					dialog.overlay.fadeIn('slow', function () {
						dialog.container.slideDown('slow', function () {
							dialog.data.fadeIn('slow'); // See Other Notes below regarding
													   // data display property and
													   // iframe details
						});
					});
				},
		onClose: function (dialog) {
					dialog.data.fadeOut('slow', function () {
					  dialog.container.slideUp('slow', function () {
						dialog.overlay.fadeOut('slow', function () {
						  $.modal.close(); // must call this to have SimpleModal
										   // re-insert the data correctly and
										   // clean up the dialog elements
						});
					  });
					});
				}
	});
	$("#modalContainer").css('height',h).css('width',w).css('margin-left',(w / 2) * -1); 
}



$(document).ready(function(){

	//fix right column height
	m = $("#middle").height();
	r = $("#right").height();
	l = $("#left").height();
	if(r < m && m > l)
		$("#right").height(m);
	else if(r < l && m < l)
		$("#right").height(l);
	

	//clear search val?
	$("#site_search input:eq(0)").focus(function(){
		if($(this).val() == 'search' || $(this).val() == 'zoek')
			$(this).val('');
	});

	
	//menu
	$(".menu ul li,#menu ul li").hover(
		 function(){
			 if($(this).children('ul:eq(0)').is(':hidden'))
				 $(this).children('ul:eq(0)').slideDown('normal');
		 },
		 function(){
			 if($(this).children('ul:eq(0)').is(':visible'))
				 $(this).children('ul:eq(0)').slideUp('normal');
		 }
	 );

});