$(document).ready(function(){
	$("#menu li.hoofdmenuitem").mouseover(function(){
		var $kids = $(this).children();
		var len = $kids.length;
		if(len>1)
		{
			//$(this).addClass("hover");
			$(this).css('background-repeat','repeat-y');
			$(this).children(".submenu").show();
		}
	});

	$("#menu li.hoofdmenuitem").mouseout(function(){
		$(this).css('background-repeat','no-repeat');
		$(this).children("ul.submenu").hide();
	});

	// flash inladen
	// als een div aangemaakt wordt met als class "flash",
	// en als inhoud het absolute pad naar de flash en de variable
	// wordt deze automatisch ingeladen
	$('.flash').each(function(){
		slideshowvars = $(this).html();
		slideshowheight = $(this).css('height');
		slideshowwidth = $(this).css('width');
		$(this).html("");
		$(this).flash({
	    	src: slideshowvars,
	    	width: slideshowwidth,
	    	height: slideshowheight,
			bgColor: '#000000',
			wmode: 'transparent'
		});
	});

	// verzend links in formulieren maken
	$('.verzendlink').click(function(){
		$(this).parents('form').submit();
	});

	// links in "_blank" i.p.v. via HTML i.v.m. valid XHTML
	$('.blankwindow').attr('target','_blank');

	$('#next tr').click(function(){
		id = $(this).attr('id');
		document.location='/index.php?id=19&occid='+id;
	});

	$('#next_detail .thumb').mouseover(function(){
		pad = $(this).find('.foto_pad img').attr('src');
		$('#foto_groot').attr('src',pad);
	});
	
	$('.colorbox').colorbox({
		href:function(){
			url = $(this).attr('rel');
			return url;
		},
		transition:'elastic'
	});

});


function select_foto(f1,f2)
{
	document.getElementById('foto_groot').src = f1;
}
