$(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: 0,						// 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 text resizer
		if($.cookie('TEXT_SIZE')) {
			$('body').addClass($.cookie('TEXT_SIZE')); 
		}

		$('.resizer a').click(function() {
			var textSize = $(this).attr('id');
			$('body').removeClass('default big bigger').addClass(textSize);
			$.cookie('TEXT_SIZE',textSize, { path: '/', expires: 10000 });
			return false;
		});
		// END text resizer

		// BEGIN homepage slideshow
		$('#spotlight div.column_l')
			.before('<div id="spotlight_nav">')
			.cycle({
				fx: 'fade',
				timeout: 10000,
				pager: '#spotlight_nav'
			}
		);
		// END homepage slideshow
	
	}
);
