/* 
	init.js
	===============================================================
	Wellington on a Plate
	Calls Functions
	
	Last Updated: See SVN	
	
	#t-* used to apply template level override of shared styles
	#st-* used to apply sub template level override of shared styles	
	
	To sort, search for '@'		
	Debugging is via the Firebug console: console.debug
  ===============================================================
*/

/*	
	@ $(document).ready
  ---------------------------------------------------------------
	Functions to initialise when the DOM has loaded
	_______________________________________________________________
*/	

	var isHiFi = false;
	var platform = '';

	$(document).ready(
		function() 
		{						
			// variables					
		
			$.globals = {};		
			
			$.globals.isHiFi = false;		
			$.globals.isFirefox15up = false;		
			$.globals.isFirefox2 = false;
			$.globals.isFirefox3up = false;
			$.globals.isIE6 = false;				
			$.globals.isIE6up = false;		
			$.globals.isSafari3down = false;
			$.globals.isSafari3up = false;		
			$.globals.isSafari4up = false;
	
			$.globals.isHiFi = detect_browser();
			platform = detect_platform();
			
			if ($.globals.isHiFi)
			{						
				// variables										
				
				$.globals.template_id = $('body').attr('id');			
				
				// function calls		
					
				// non-template-specific function calls		
				
				hover_states_incl_preload( $('#plate-nav').find('img') );	
								
				if ( ( $.globals.isSafari3up ) && (platform == 'win') )
				{
					load_stylesheet('/resources/ui/styles/imported/browser/screen-win-safari.css');
				}
				if ( ( $.globals.isSafari3up ) && (platform == 'mac') )
				{
					load_stylesheet('/resources/ui/styles/imported/browser/screen-mac-safari.css');
				}												
				
			} // end isHiFi
		}
	);