function slideSwitch() {
    var $active = $('#beeld img.active');

    if ( $active.length == 0 ) $active = $('#beeld img:last');

    var $next =  $active.next().length ? $active.next() : $('#beeld img:first');

    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 2500, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
	$('#top').click(function(){
		location.href = $('base:first').attr('href');
	});
	
	if($('#beeld img').length > 1)
	{
		setInterval( "slideSwitch()", 5000 );
	}
	/*
	$('ul.sf-menu').supersubs({
		minWidth: 12,
		maxWidth: 27,
		extraWidth: 1
	}).superfish({
		animation: { opacity:'show',height:'show' },
		speed: 'fast',
		delay: 0,
		disableHI: false
	});
	*/

});
