$(document).ready(function() {
	//initalize variables
	var images = new Array();
	var i = 0;
	
	//Get the filepath for all images in the leftColumn div
	//Add the filepaths into images array
	$('#leftColumn img').each(function(index) {
	    var img = $(this).attr("src");
		images[i] = img;
	    i++;
	  });
	  
    var imageCount = images.length;

    var $image = $('#leftColumn img#hero');
    
    // set the image control to the last image
    $image.attr('src', images[imageCount - 1]);

    setInterval(Slider, 5000);

    function Slider() {
        $image.fadeOut("slow", function() {
            $(this).attr('src', images[(images.length++) % imageCount])
            .fadeIn("slow");
        });
    }
            
});            
