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

image = Array('header_img.jpg',
			  'header_img2.jpg',
			  'header_img3.jpg',
			  'header_img4.jpg'
			  );

var timOut = 5000;

var imageArrayCount = image.length;

function placeImage(i) {
	
	$("#nav_left").css('background','url(images/'+image[i]+') no-repeat 0px 0px');
		
//	setTimeout(function () { $("#nav_left").css('background','url(images/'+image[i]+') no-repeat 0px 0px'); }, timOut/2);
	
	i++
	
	$.preloadImages(image[i]);
	
	if(i==imageArrayCount) {
		setTimeout("placeImage(0)", timOut);
	} else {
		setTimeout("placeImage("+i+")", timOut);
	}
	
}

$("#nav_left").before('<div id="rollingImages" style="height:218px; width:680px; position:absolute; top:0px: left:0px; background: none; z-index:0px;">&nbsp;</div>');

//$("#nav_left").before('<div id="rollingImages" style="height:218px; width:680px; position:absolute; top:0px: left:0px; background: none; z-index:0px;">&nbsp;</div>');


placeImage(0);
