/*
#####################################################
# 
# The Sisterhood
# JavaScript setup routines
#
# Hand-crafted by Phenotype (phenotype.net)
#
#####################################################
*/

	////////////////////////////////////////////////////////////////////
	//	Initialise setup routines
	////////////////////////////////////////////////////////////////////
	
	// Called when DOM is ready
	$(document).ready(domSetup);
	
	// Called when entire page is loaded
	$(window).load(pageSetup);
	
	// Called when DOM is unloaded
	$(window).unload(domUnload);
	
	////////////////////////////////////////////////////////////////////
	//	Define setup routines
	////////////////////////////////////////////////////////////////////
	
	/* 
	domSetup()
	
	All JavaScript requiring initialisation on DOM LOAD should be called
	from this routine.
	-----------------------------------------------------------------------
	*/
	
	function domSetup() {
		
		////////////////////////////////////////////////////////////////////
		//	Navigation
		////////////////////////////////////////////////////////////////////
			
			// Superfish menu
			$('#navigation').superfish({
				delay: 1000,
				dropShadows: false,
				autoArrows: false,
				animation: {'height' : 'show'},
				speed: 200
			});
			
			// Fix IE6 <select> z-index interference
			if($.browser == 'msie' && $.browser.version == '6.0'){
				$('#navigation').find('ul').bgIframe({
					opacity: false
				});
			}
			
			/*
			Setup external links (target attribute not allowed by XHTML 1.1)
			(see http://www.sitepoint.com/article/standards-compliant-world/)
			*/
			$('a[rel="external"]').attr('target','blank');
		
		////////////////////////////////////////////////////////////////////
		//	/Navigation
		////////////////////////////////////////////////////////////////////

		
	} // End domSetup()
	
	/* 
	pageSetup()
	
	All JavaScript requiring initialisation on PAGE LOAD should be called
	from this routine (all images and elements should be loaded and ready to
	manipulate by this point)
	-----------------------------------------------------------------------
	*/
	
	function pageSetup() {
	
	
	} // End pageSetup()
	
	/* 
	domUnload()
	
	Called when page/DOM is unloaded
	-----------------------------------------------------------------------
	*/
	
	function domUnload() {

	} // End domUnload()
