/** add_page_load_event.js allows us to run one or multiple functions on page load
The advantage of this funtion is it won't override any previously set onload functions,
and also that it will trigger at the point of HTML being ready, rather than waiting for every image to load */

/** Code to run on page load, including image rollovers and anything else fancy */
function page_setup()
{
		
	/** vertical rollover menu */
	$('#fancymenu')
		/** add a class for superfish to identify with */
		.addClass('sf-menu')
		.addClass('sf-vertical')
		/** superfish it! */
		.superfish({
			hoverClass	: 'sfHover',          // the class applied to hovered list items 
			pathClass	: 'current_page_path', // 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		: 800,                // 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		: 'normal',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
			autoArrows	: true,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
			dropShadows	: true					// completely disable drop shadows by setting this to false 
		})
		.find('ul').bgIframe({opacity:false}); // Fix for IE6 so menus show up over select boxes;
}

$(document).ready( page_setup );

