/**
 * Javascript init process; load all necessary JS includes
 * for AMM live-side pages.
 *
 * @author Matt Gray <matt@clockwork.net>
 * @author Lloyd Dalton <lloyd@clockwork.net>
**/

/**
 * Clockwork JS namespace; used to contain all classes and functions.
**/

var Clockwork  =  {

	/**
	 * Load a JavaScript file by injecting a <script> tag into the DOM; note that
	 * this only works well when we're in the <head> tag.
	 *
	 * Based on Scriptaculous.require( ).
	 *
	 * @author Matt Gray <matt@clockwork.net>
	**/

	require:  function ( filename ) {
		// inserting via DOM fails in Safari 2.0, so brute force approach
		document.write('<script type="text/javascript" src="' + filename + '"><\/script>');
	}
};


