$(function() {

	// prettyphoto:
	$("a[rel^='cm-fotoblad']").prettyPhoto({
		animationSpeed: 'fast', 		/* fast/slow/normal */
		opacity: 0.80, 					/* Value between 0 and 1 */
		showTitle: true, 				/* true/false */
		allowresize: true, 				/* true/false */
		counter_separator_label: '/', 	/* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_square', 			/* light_rounded / dark_rounded / light_square / dark_square / facebook */
		hideflash: false, 				/* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */
		wmode: 'opaque', 				/* Set the flash wmode attribute */
		autoplay: true, 				/* Automatically start videos: True/False */
		modal: false
	});
	
	// de header foto en puzzel stuk opslaan in een variable
	var originalPuzzleImage = $('#puzzle > img').attr('src');
	var originalHeaderImage = $('#header_picture > img').attr('src');
	
	$('area').hover(function() { 
	    var url = $(this).attr('href'); 
	    var coords = $(this).attr('coords').split(','); 
	    var title = $(this).attr('title');
	    
		$('#puzzle > img').attr('src','img/puzzel_'+title+'.png');
	    $('#header_picture > img').attr('src','img/header_plaat_'+title+'.jpg');

	}, function() {
		$('#puzzle > img').attr('src',originalPuzzleImage);
		 $('#header_picture > img').attr('src',originalHeaderImage);
	});
	
	// hoofdmenu 
	$('div#menu > ul > li > a').bind('mouseenter', function() {
		$(this).addClass('selected');
		$(this).parent().siblings().children('a').removeClass('selected');
		$(this).parent().siblings().children('ul').hide();
		$(this).siblings('ul').show();
	});
	
	$('div#menu > ul > li').bind('mouseleave',function() {
		$(this).children('ul').hide();
		$(this).children('a').removeClass('selected');
	});
    
});
