$(document).ready(function() {
	/* fancybox */
	$('.fancybox img').mouseover(function() {
		$(this).addClass('hover');
	});
	
	$('.fancybox img').mouseout(function() {
		$(this).removeClass('hover');
	});
	
	$('a.fancybox').fancybox({
		'titleShow' : true,
		'titlePosition' : 'inside',
		'transitionIn' : 'elastic',
		'transitionOut' : 'elastic'
	});

	/* link in nieuw venster laten openen */
	$('a.extern')
		.attr('title','Deze link opent in een nieuw venster.')
		.click(function(e){
		window.open(this.href);
		e.preventDefault();
	});
	
	$('.hidden').hide();
	
	$('.leesverder').click(function() {
		$('#' + $(this).attr('id').replace('link_', '')).show();
		$('#link_' + $(this).attr('id').replace('link_', '')).hide();	
		return false;	
	});

	$('.inklappen').click(function() {
		$('#' + $(this).attr('id').replace('link_', '')).hide();
		$('#link_' + $(this).attr('id').replace('link_', '')).show();
		return false;		
	});
	
	$('#quickfacts img').mouseover(function() {
		$('#photo').attr('src', $(this).attr('src'));
		$('#photo').attr('alt', $(this).attr('alt'));
		$('#photo').attr('title', $(this).attr('title'));
		
		$('#url_photo').attr('href', $(this).attr('src'));
		$('#url_photo').attr('alt', $(this).attr('alt'));
		$('#url_photo').attr('title', $(this).attr('title'));
	});
});
