$(function() {
    $('#startgal').cycle({
        delay:  -2000,
        fx:     'fade',
        speed:  'slow',
        //speed:  1000,
		timeoutFn: calculateTimeout
    });
});    

// timeouts per slide (in seconds)
var timeouts = [2,1,3,8];
function calculateTimeout(currElement, nextElement, opts, isForward) {
	var index = opts.currSlide;
	return timeouts[index] * 500;
}


/*$(document).ready(function(){

	/*$('#startgal').cycle({ 
		fx:    'fade', 
		speed:  1000,
		//timeoutFn: calculateTimeout 
	 });
	 
	 
	$('#startgal').cycle({ 
			delay:  -2000, 
			fx:     'fade', 
			speed:  'fast', 
			timeoutFn: calculateTimeout 
		}); 
	 
	// timeouts per slide (in seconds) 
	var timeouts = [3,1,2,3]; 
	function calculateTimeout(currElement, nextElement, opts, isForward) { 
		var index = opts.currSlide; 
		return timeouts[index] * 1000; 
	}
	 
});*/
