jQuery.preloadImages = function(){for(var i = 0; i<arguments.length; i++) {jQuery("#rotation").attr("src", arguments[i]);}}

/*** EDIT ***/

// Insert here the path to the images (separated by commas, no comma for the last entry)
var Images = [
	
	"ads/images/krumlandauto.jpg",
	"ads/images/valleybank.jpg"
	
	];

// Insert here the same images you entered above.
$.preloadImages(

	"ads/images/krumlandauto.jpg",
	"ads/images/valleybank.jpg"

	);

// Set the timeout
var TIMEOUT = 3000; // It's in milliseconds, so 1000 ms = 1 second.


/*** END EDIT ***/




/*********************/
var idx=0;

$(document).ready(function() { setTimeout(SwitchImg, TIMEOUT); }); 

function SwitchImg() {
       
	idx++; if ( idx >= Images.length ) idx = 0;

	$('#rotation').attr("src", Images[idx]);

	setTimeout( SwitchImg, TIMEOUT);
};

