// rotate images
$(function()
{
    $("ul#mycarousel a").click(function()
        {
        var imageSource = $(this).children("img").attr("src");
		var imageTitle = $(this).children("img").attr("title");
		$("p#caption").html(imageTitle);
        $("#image_content_loader").addClass("loading");
        $("#image_content_loader img").remove();
          showImage(imageSource);
          return false;
        });
});

/* captions */

function showCaption(title)
{
	/* make sure everything is hidden inside div#captions */
		//$("p#caption").fadeOut("slow");
	/* grab title from the current image */
	/* show title as caption in the div#captions */
	//	$("p#caption").html(imageTitle);
	
}

function showImage(src)
{
	$("#image_content_loader img").fadeOut("slow").remove();
	var largeImage = new Image();
	$(largeImage).load(function()
	      {
	      	$(this).hide();
	      	$("#image_content_loader").append(this).removeClass("loading");
	      	
	      	$(this).fadeIn("slow");              
	      });    
	$(largeImage).attr("src", src).addClass("photo");                                                                               
}


// Oh yeah, the map stuff goes here. 

$(document).ready(function(){
	$("#map_link").click(function(){
		 $('#map_tip').toggle(0);
	});
	$("#map_close").click(function(){
		$('#map_tip').hide(0);
	});
});



