function slideSwitch() {
	
	//Change pictures
	var active = $('#slideshow a.active').first();
	
	if(active.next().length != 0){
		var next = active.next();
	}else{
		var next = $('#slideshow a').first();
	}

	active.addClass('last-active');
	
	next.css('opacity', '0.0').addClass('active').animate({
		opacity: 1.0
	}, 1000, function(){
		active.css('opacity', '0.0').removeClass('active last-active');
	})
	
	//Change bullets
	var activeBullet = $('#slideshow_bullets div.activeBullet').first();
	
	if(activeBullet.next().length != 0){
		var nextBullet = activeBullet.next();
	}else{
		var nextBullet = $('#slideshow_bullets div').first();
	}

    activeBullet.removeClass('activeBullet')
    	.addClass('normalBullet');
    
    nextBullet.removeClass('normalBullet')
    	.addClass('activeBullet');

    //Change slideshow title and link
    $('#slideshow_title a').text(next.children('img').attr('title')+String.fromCharCode(160,187));
    $('#slideshow_title a').attr('href', next.attr('href'));
    
}	

$(function() {
	//Slideshow interval
    setInterval( "slideSwitch()", 5000 );
});
