$(document).ready(function(){

//var timeoutID = window.setTimeout(loadImage, 10000);

loadImage();


})

function loadImage(){
// getimage.php is the php file that gets my images from the images folder
$.post("/carousel/index", function(data){


if(data.length >0) {
// evaluate the string to a group of objects
myObject = eval(data);

// create a slideshow with the image objects and drop them in the placeholder
$('#main_image').crossSlide({sleep:4,fade:2},myObject);
}
});

}

