(function($){
// our first jquery enhanced slideshow 12-3-08

$.fn.simpleshow = function(callSettings) {

	settings = $.extend({ }, callSettings);
	
	//var imageBullet ="images/bullet_blue.gif";
	
	return this.each(function() {
	
	// let's define the default start image as the first from the list
	var imageDefault = $("#default a").attr("href");
	// set the focus
	$("#default a").focus();
	// run showImage
	showImage(imageDefault);


// now we assign the bullet graphic as defined in the first/default image

var imageBullet = $("#default a").children("img").attr("src");
// to each li's a tag since we are not using thumbnails
	$("#imageOptions a").each(function() { 
		$(this).children("img").attr("src",imageBullet);
	});

// next we determine what clicking on the Thumb/Bullet does
		$("#imageOptions a").click(function() {
       /* var imageSource = $(this).children("img").attr("src");*/
       	var imageThumb = $(this).children("img");
       	var imageSource = $(this).attr("href");
        var imageTitle = $(this).children("img").attr("title");
       
        $("#imgPlaceholder").addClass("loading");
 
        showImage(imageSource);
		// bring on the caption based on the image title tag
        $("p.caption").text(imageTitle);
        
        return false;
        });

	// make the large image load have some efx
function showImage(src) {
	$("#imgPlaceholder img").fadeOut("normal").remove();

	var largeImage = new Image();

	$(largeImage).load(function() {
    $(this).hide();
    $("#imgPlaceholder").append(this).removeClass("loading");
    $(this).fadeIn("slow");
    });
    
	$(largeImage).attr("src", src);
	}

});	





}

// end of closure, bind to jQuery Object
})(jQuery);