/* ========================================================================
 * @license	The MIT License
 * 		http://www.opensource.org/licenses/mit-license.php
 * @author	Yoshiaki Sugimoto <neo.yoshiaki.sugimoto@gmail.com>
 * @copyright	Neo,Inc <http://neo-navi.net/>
 * @version    ,v 0.9.0
 * ======================================================================== 
 */
var loadLibs = ['jquery-1.3.2.min' , 'jquery-ui-1.7.1.custom.min' , 'jquery.tools.min' , 'jquery.scrollfollow' , 'jquery.exfixed' , 'swfobject-2.2' , 'heightLine' , 'scrollsmoothly'];

var Autoloader = {
	getpath : function()
	{
		var scriptTag = document.getElementsByTagName('script');
		if (scriptTag[0].getAttribute('src').match(/autoloader\.js/))
		{
			var src = scriptTag[0].getAttribute('src');
			var path = src.replace('autoloader.js', '');
			return path;
		}
		else
		{
			return false;
		}
	},
	loadLib : function(LibName)
	{
		document.write('<script type="text/javascript" src="' + LibName + '"></script>');
	},
	load : function()
	{
		var timerID;
		var path = Autoloader.getpath();
		if( path === false )
		{
			alert('failed to get path.');
			return;
		}		
		for ( i = 0; i < loadLibs.length; i++ )
		{	
			Autoloader.loadLib(path + loadLibs[i] + '.js');
		}
	}
}
Autoloader.load();
	

