$(document).ready(function() {
	$('#slideshow a:first').fadeIn(500, function() {
        $('#slideshow').cycle({
	        speed: 500,
			autostop: 1,
			sync: 1,
			startingSlide: 0,
			fx: 'fade', 
		    timeoutFn: calculateTimeout
		    //cssAfter: '.slideshowbackground'
		});
	});
});


// timeouts per slide (in seconds) 
var timeouts = [3,3,3,.5,.5,.5]; 
function calculateTimeout(currElement, nextElement, opts, isForward) { 
    var index = opts.currSlide; 
    return timeouts[index] * 1000; 
}
