$(document).ready(function(){
	// hoofdmenu 
	$('div#menu > ul:not(.menu_add) > li > a').bind('mouseenter', function() {
		$(this).addClass('selected');
		$(this).parent().siblings().children('a').removeClass('selected');
		$(this).parent().siblings().children('ul:not(.menu_add)').hide();
		$(this).siblings('ul').show();
	});
	
	$('div#menu > ul:not(.menu_add) > li').bind('mouseleave',function() {
		$(this).children('ul:not(.menu_add)').hide();
		$(this).children('a').removeClass('selected');
	});
	
	$('div#menu > ul > li:has(ul:not(.menu_add)) > a').addClass('hassubs');
	
	// hoofdmenu li item topnode class active geven
	$('div#menu > ul > li:has(a.is_context) > ul').addClass('menu_add');

	// hoofdmenu a item topnode class active geven
	$('div#menu > ul > li:has(a.is_context) > a').addClass('active');
	
	//visit website div tonen wanneer er op word geklikt
	$('div#visit > p').click(function() {
		$(this).siblings().toggle();
	});
	
	$(document).click(function(e) {
		if($(e.target).parents('div#visit').length == 0) {
			$('div#visit > p').siblings().hide();
		}
	});
		
	// a tag met de class new-window openen in een nieuw venster
	$('a.new-window').click(function(){
	   window.open(this.href);
	   return false;
	});
	
	// PrettyPhoto (lightbox)
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', 				/* fast/slow/normal */
		padding: 40, 							/* padding for each side of the picture */
		opacity: 0.9, 							/* Value between 0 and 1 */
		showTitle: true, 						/* true/false */
		allowresize: true, 						/* true/false */
		counter_separator_label: ' van de ', 	/* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_square', 					/* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){}
	});

});
