/*!
#####################################################
# 
# Myla Valentine's Girls
# 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 JavaScripts requiring initialisation on DOM LOAD should be called
	from this routine
	-----------------------------------------------------------------------
	*/
	function domSetup() {
		
		////////////////////////////////////////////////////////////////////
		//	Flash
		////////////////////////////////////////////////////////////////////
		
			// Check if we're allowing Flash (for debug)
			var version = $.query.get('version'); // 'full' or 'lite'
		
			if (swfobject.hasFlashPlayerVersion("9.0.0") && version != 'lite') {
				$('body').attr('class','flash-enabled');
				
				// Insert Flash
				// Configure
				var flashvars = {};
				var params = {};
					params.wmode = "transparent";
					params.scale = "showall";
					params.allowScriptAccess = "sameDomain";
					params.allowFullScreen = false;
				var attributes = {};
					attributes.id = "flash-content";
					
				// Embed
				swfobject.embedSWF("myla.swf", "content", "980", "630", "9.0.0", false, flashvars, params, attributes);
			}

		////////////////////////////////////////////////////////////////////
		//	/Flash
		////////////////////////////////////////////////////////////////////
		
		////////////////////////////////////////////////////////////////////
		//	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');
		
		////////////////////////////////////////////////////////////////////
		//	/Navigation
		////////////////////////////////////////////////////////////////////
		
	} // End domSetup()
	
	/* 
	pageSetup()
	
	All JavaScripts 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()