/*!
 #####################################################################
 # 
 # Factor 3
 # JavaScript setup routines
 #
 # Hand-crafted by Phenotype (phenotype.net)
 #
 #####################################################################
 */
	
	/* =Assign 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 );
	
	/* =Global variables
	------------------------------------------------------------------- */
	
		// Set site root
		//var siteRoot = '/carter/';
		var siteRoot = '/';
	
	/* =Declare setup routines
	------------------------------------------------------------------- */
	
	/**
	 * domSetup()
	 *
	 * All JavaScript requiring initialisation on DOM LOAD should be called
	 * from this routine.
	 */
	function domSetup() {

		/* =Enhancements
		------------------------------------------------------------------- */
		
			// Set JS enabled flag for CSS
			$('html').addClass('js-enabled');
			
			
			
			
					$(document).ready(function(){	
						$("#slider").easySlider({
							auto: true, 
							continuous: true,
							numeric: true
						})*

						jQuery('ul.sf-menu').superfish({
							autoArrows: true,
							dropShadows: false
						});
						
					
					});	
					
					
					
					
					//magic jscript to highlight the current page in the nav
					setPage();
				
				

		/* =Navigation
		------------------------------------------------------------------- */
			
			/*
			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');

	}
	
	/**
	 * 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() {
		

	}
	
	/**
	 * domUnload()
	 *
	 * Called when page/DOM is unloaded
	 */
	function domUnload() {

	}
