$( document ).ready
( 
	function() 
	{
	  init();
	}
);

var init = function ()
{	
	$( '.no-js' ).hide();
	$( '.req-js' ).show();
	$.getScript( '/scripts/setCalc.js' );
	$.getScript( '/scripts/setQuoteForm.js', function ()
		{
			quoteFormSet();	
		}
	);
	$.getScript( '/scripts/flash/setFlash.js', function ()
		{
			var requiredMajorVersion = 9;		// Major version of Flash required
			var requiredMinorVersion = 0;		// Minor version of Flash required
			var requiredRevision = 28;			// Required revision of Flash required
			
			var mainHeader = document.getElementById("flashHead");
	
			if ( mainHeader )
			{
				flashVariables('swfLoc','/flash/computer.swf',
								'varsLoc','/flash/flashVars.xml',
								'styleLoc','/style/flashStyle.css');
				flashSet(mainHeader, '/flash/homeFlash.swf', mainHeader.id, 'transparent', '100%', '100%', requiredMajorVersion, requiredMinorVersion, requiredRevision);
			}
			
			var subPageDiv = document.getElementById('subFlashHead');
	
			if ( subPageDiv )
			{
				var pageName = subPageDiv.className;
				flashVariables('xmlLoc','/flash/headerAnims.xml',
								'styleLoc','/style/flashStyle.css',
								'pageTitle', pageName);
				flashSet(subPageDiv, '/flash/banner.swf', subPageDiv.id, 'transparent', '100%', '100%', requiredMajorVersion, requiredMinorVersion, requiredRevision);
			}
			
			if($('.video').length > 0)
			{
				$.getScript( '/scripts/flash/setVideo.js', function ()
					{
						setVideoMovies('video');
					}
				);
			}
		}
	);



}
