$(document).ready(function() {
	$('.gallery a').lightBox();
	$("#subnavigation li:last, .resultlist li:last").addClass("last");
	$("input.zoeken").hover(
		function(){
			$(this).addClass("zoeken_hover");
		},
		function(){
			$(this).removeClass("zoeken_hover");
		}	
	)
	$('#vind')
		.focus(function () {
			$(this).addClass("focused");
		})
		.blur(function () {
			$(this).removeClass("focused");
		});
	$(".ctr").each(function(){
    	$(this).find(".col:last").addClass("lastcol");
    });
    $("table.resultlist tr:last").addClass("lastrow");
    
    $("ul.columned").each(function(){
		aantalcols = 5
		aantal = $(this).find("li").length;
		itemspercol = Math.ceil(aantal / aantalcols);
		itemsinlastcol = (itemspercol * aantalcols) - aantal;
		for (var i=1; i<=aantalcols; i++) {
			$(this).find("li").slice( ((i*itemspercol)-itemspercol),i*itemspercol).wrapAll('<ul class="ul-col"></ul>');
		}
		var orgUL = $(this).contents()
		$(this).replaceWith(orgUL);
	});
}); // end document ready





