// initiate
$(document).ready(function() {

	$("#slideshow ul").after('<ul id="nav"></ul>').cycle({
		fx: "fade",
		timeout: 0,
		speed: 1000,
		pager: "#nav",
		height: "380px",
		next: "#slideshow ul img",
		pagerAnchorBuilder: function(idx, slide) {
			return '<li><a href="#">' + (idx + 1) + '</a></li>';
		}
	}).end().find("img").attr("title", "Click to view next image");
	
	$("#nav span a:not(:last)").after("&nbsp;");
	
	$("#masthead a").click(function() {
		window.close();
		return false;
	});
});