function preloader(){
	var imageArray = new Array();
	//var imageObj = new Image();
	var imageObj;
	
	var images = new Array();
	images[0] = "/wp/wp-content/uploads/2011/08/center-image-2.png";
	images[1] = "/wp/wp-content/uploads/2011/08/center-image-3.png";
	images[2] = "/wp/wp-content/uploads/2011/12/center-image-4.png";
	images[3] =	"/wp/wp-content/uploads/2011/12/center-image-5.png";

	for(var i = 0; i < images.length; i++){
		imageObj = new Image();
		imageObj.src = images[i];
		imageArray[i] = imageObj;
	}
	
	get_image(imageArray);
}

function get_image(somethingElse){
	var max = 3;
	
	//set to 2nd image buffer, first image is being displayed
	var count = 1;
	var start = true;
	//var tick = 0;
	
	setInterval(function(){
		jQuery(function ($) {
			/* You can safely use $ in this code block to reference jQuery */
			if(start){
				$('#center-image-1').fadeOut(1000, function(){	
					//alert("first: "+i);	
					//$('#center-image-1').attr('src', somethingElse[i].src);
					this.src = somethingElse[count].src;
				});
				
				count++;
				
				if(count > max){
					count = 0;
				}
				
				start = false;
			}
			else{
				$('#center-image-1').fadeIn(1000, function(){
					//alert("second: "+i);	
					$('#center-image-2').attr('src', somethingElse[count].src);
				});
				
				count++;
				
				if(count > max){
					count = 0;
				}
				
				start = true;
			}
		});
		
		//$("#console").html("start: "+start+" count: "+count+" tick: "+tick+" somethingElse: "+somethingElse[count].src);
		//tick++;
	}, 8000);
}
