(function(){
	var importSrcJs = function(e){
		return '<script type="text/javascript" src="'+ e +'"></script>' + "\n";
	}
	var importSrcCss = function(f){
		return '<link rel="stylesheet" type="text/css" href="'+ f +'" />' + "\n";
	}
	// jsの格納場所
	var jspath = '/global/scripts/';
	// css の格納場所
	var csspath = '/global/styles/';
	
	//jQuery
	document.write( importSrcJs( jspath + 'jquery-1.4.2.min.js' ) );
	//jQuery
	document.write( importSrcJs( jspath + 'css_browser_selector.js' ) );
	//biggerlink
	document.write( importSrcJs( jspath + 'jquery.biggerlink.min.js' ) );
	//smooth page scrolling
	document.write( importSrcJs( jspath + 'pagescrolling.js' ) );
	//tools
	document.write( importSrcJs( jspath + 'jquery.tools.min.js' ) );
	//overlay
	document.write( importSrcJs( jspath + 'jquery.colorbox.js' ) );
	//ファイルサイズ自動表記
	document.write( importSrcJs( jspath + 'filesizegetter.js' ) );
	//グラフ描画
	document.write( importSrcJs( jspath + 'jquery.jqplot.js' ) );
	//日付取得
	document.write( importSrcJs( jspath + 'exdate.js' ) );
	//テーブルソート
	//document.write( importSrcJs( jspath + 'jquery.tablesorter.min.js' ) );
	//default settings
	document.write( importSrcJs( jspath + 'default.js' ) );
	//heightLine
	//document.write( importSrcJs( jspath + 'heightLine.js' ) );	
	
	var win = (navigator.userAgent.indexOf("Win")>=0) ? true : false;
	var IE8 = (navigator.userAgent.indexOf("MSIE")>=0) ? true : false;
	var IE7 = (navigator.userAgent.indexOf("MSIE 7")>=0) ? true : false;
	var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false;
	
	var iphone = (navigator.userAgent.indexOf("iPhone")>=0) ? true : false;
	var ipad = (navigator.userAgent.indexOf("iPad")>=0) ? true : false;

	//Windows用CSS読み込み
	if (win) {
		document.write( importSrcCss( csspath + 'win.css' ) );
	}
	if (IE6 || IE7 || IE8) {
		document.write( importSrcJs( jspath + 'html5.js' ) );
		document.write( importSrcJs( jspath + 'iepp.1-4-0.min.js' ) );
		//グラフ描画用canvas
		document.write( importSrcJs( jspath + 'excanvas.min.js' ) );
	}
	if(IE6) {
		document.write( importSrcJs( jspath + 'DD_belatedPNG_0.0.8a-min.js' ) );
		document.write( importSrcJs( jspath + 'pngon.js' ) );
		document.write( importSrcJs( jspath + 'minmax.js' ) );
	}
	if(iphone || ipad ) {
		document.write( importSrcCss( csspath + 'iphone.css' ) );
	}
	
})();

