function formatText(index, panel)
{
  return panel[0].className;
}

jQuery(function () {
	/*
	if(jQuery('body.home').size() > 0)
	{
		jQuery('#splash').anythingSlider({
		    easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
		    autoPlay: false,                // This turns off the entire FUNCTIONALY, not just if it starts running or not.
		    delay: 15000,                   // How long between slide transitions in AutoPlay mode
		    startStopped: false,            // If autoPlay is on, this can force it to start stopped
		    animationTime: 600,             // How long the slide transition takes
		    hashTags: true,                 // Should links change the hashtag in the URL?
		    buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
		  	pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		  	startText: "Go",             		// Start text
		    stopText: "Stop",               // Stop text
		    navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
		});
		jQuery('#thumbNav a:eq(0)').addClass('third');
		jQuery('#thumbNav a:eq(1)').addClass('second');
		jQuery('#thumbNav a:eq(2)').addClass('first');		
	}
	*/
	jQuery('#thumbNav a').click(function(){

		if(jQuery(this).hasClass('cur')){ return false; }
		
		to_view = jQuery(this).text();
		currently = jQuery('.cur').text();
		jQuery('.photos li.' + to_view   ).hide().css('z-index', '20');
		jQuery('.photos li.'   + currently ).css('z-index', '15');
		jQuery('.photos li.' + to_view   ).fadeIn().css('display','block');

		// remove the cur class from the old thumbnav item
		jQuery('#thumbNav a.cur').removeClass('cur');
		// ... and add it to the clicked link
		jQuery(this).addClass('cur');
		

		setTimeout("jQuery('.photos li.'   + currently ).css('z-index', '10').hide();",500);
		
		return false;
	});
});
