// When the DOM is ready
$(function() {
	
	$("nav a, .date").append("<span>&nbsp</span>");
	
	$("nav a").hover(function(e) {
	
		$(this)
			.hoverFlow(e.type, { width: 230 }, 200)
			.css('overflow', 'visible')
			.find('span')
			.hoverFlow(e.type, { width: 15 }, 200)
		
	}, function(e) {
		
		$(this)
			.hoverFlow(e.type, { width: 215 }, 200)
			.css('overflow', 'visible')
			.find('span')
			.hoverFlow(e.type, { width: 20 }, 200)
		
	});
	
})


	$(function() {
		// set up the news accordion on the lower page
		$("#newsSection").accordion({ header: "h4" });

		// create the image rotator
		setInterval("rotateImages()", 3000);
	});

	function rotateImages() {
		var oCurPhoto = $('#photoShow div.current');
		var oNxtPhoto = oCurPhoto.next();
		if (oNxtPhoto.length == 0)
			oNxtPhoto = $('#photoShow div:first');

		oCurPhoto.removeClass('current').addClass('previous');
		oNxtPhoto.css({ opacity: 0.0 }).addClass('current').animate({ opacity: 1.0 }, 750,
			function() {
				oCurPhoto.removeClass('previous');
			});
	}

