$(document).ready(
	function() {

		// BEGIN configuring superfish menu
		$("#nav").superfish({
			hoverClass: 'sfhover',			// the class applied to hovered list items
			pathClass: 'overideThisToUse',	// the class you have applied to list items that lead to the current page
			pathLevels: 1,					// the number of levels of submenus that remain open or are restored using pathClass
			delay: 250,						// the delay in milliseconds that the mouse can remain outside a submenu without it closing 
			animation: {opacity:'show'},	// an object equivalent to first parameter of jQuery's .animate() method
			speed: 'fast',					// speed of the animation. Equivalent to second parameter of jQuery's .animate() method 
			autoArrows: false,				// if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance
			dropShadows: false				// disable drop shadows
		});
		// END configuring superfish menu
		
		//
		// BEGIN handling "prev/next month" links for calendar
		calendar_nav_links();
		// END handling "prev/next month" links for calendar
		//

		//
		// BEGIN lightbox gallery
		$('a.lightbox').lightBox({
			imageLoading: '/themes/2010/graphics/lightbox/loading.gif',
			imageBtnClose: '/themes/2010/graphics/lightbox/close.gif',
			imageBtnNext: '/themes/2010/graphics/lightbox/next.gif',
			imageBtnPrev: '/themes/2010/graphics/lightbox/prev.gif'
		});
		// BEGIN lightbox gallery
		//

	}
);

calendar_nav_links = function() {

	$('#prev-month a').click(
		function() {
			$('#events-nav').load(this.href, calendar_nav_links);
			return false;
		}
	);

	$('#next-month a').click(
		function() {
			$('#events-nav').load(this.href, calendar_nav_links);
			return false;
		}
	);
	
};
