$("#sb-container").ready(function(){
	$("#slideshow a").hide();
	$("#sb-container").parent().height(250);
	$("#sb-container").parent().parent().css("padding","0");
	$("#sb-loading").html('');
	$("#slideshow .start").click(function(){
		//var playThis = 'http://www.richmond.edu'+$(this).attr("src");
		var playThis = $("#slideshow a.slide:first").attr("href");
		Shadowbox.open({
			content: playThis,
			gallery: "slideshow"
		});		
	});
});	
Shadowbox.init({
	skipSetp: true,
	slideshowDelay: 2,
	autoDimensions: true,
	continuous: true,
	displayCounter: false,
	overlayOpacity: 1.0,
	overlayColor: '#000000',
	players: ['img'],
	useSizzle: false,
	viewportPadding: 4
});

/* Note: I edited the contents of shadowbox.js to include three if statements that prevent 
shadowbox from setting anything classed "youtube" to a hidden visibility. Shadowbox is greedy --
it probably should be rewritten for our specific needs.
I also changed the default action if Shadowbox doesn't figure out what player to use. It picks img by default.
I also changed the target destination of sb-container so it goes into an element with id="slideshow"
Changed player/shadowbox-img.js to use relative positioning, and added styles to align the img object center.
*/