$(document).ready(function(){
	//rightcol height in hele blokken
	var height = $('td.rightCol').height();
	var col = 165;
	$('td.rightCol').css({'height' : (Math.ceil(height / col) * col) +'px'});
	
	//hover buttons
	$('table.buttons tr td img').css({'opacity' : 0.8}).hover(function(){
		$(this).fadeTo(150, 1);
	}, function(){
		$(this).fadeTo(150, 0.8);
	});
	
	//dropdown menu
	$('div.topmenu ul.topLevel li').hover(function(){
		$(this).addClass('hover');
		$('ul:first', this).css({'opacity' : 0, 'display' : 'block'}).fadeTo(150, 0.95);
	}, function(){
		$(this).removeClass('hover');
		$('ul:first', this).fadeTo(150, 0, function(){
			$(this).css({'display' : 'none'});
		});
	});
	
	//kopjes
	$('div.kopjes div.item a.head').click(function(){
		$(this).parent().children('div.cn').toggle(250);
	});
	
	//SLIMBOX
	$("a[rel^='slimbox']").slimbox({
		loop: false,
		overlayOpacity: 0.8,
		overlayFadeDuration: 0,
		resizeDuration: 250,
		resizeEasing: "swing",
		initialWidth: 250,
		initialHeight: 250,
		imageFadeDuration: 200,
		captionAnimationDuration: 200,
		counterText: "Afbeelding {x} van {y}"
	});
});