
	


function slideSwitch() {
	
	$('#beeld img').css('visibility', 'visible');
    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() {
	
	
	Cufon.replace('h2');
	Cufon.now();
	
	if($('#beeld img').length > 1)
	{
		setInterval( "slideSwitch()", 5000 );
	}
	

	
	$('#twitterFeed').liveTwitter('PlotsTheater', {limit: 3, refresh: false, mode: 'user_timeline', showAuthor: true}, function(container, newCount){
		$('#twitterFeed a').each(function(){
			$(this).attr('target', '_blank');
		});
	});
});



