var include = function(){
	//対象のディレクトリ
	var targetDirName = 'common/';

	//JSのディレクトリ
	var jsDir = 'js/';
	
	var escapeRegex = function(str){
		return str.replace(/([\\$^*+?(){}\[\].|])/g,"\\$1");
	};

	//ベースディレクトリ
	var baseDir = function(){
		if(!document.getElementsByTagName) return;
		var scripts = document.getElementsByTagName("script");
		var regexp = new RegExp('^(.*/?' + escapeRegex(targetDirName) + ').*?$');
		for(var i = 0;i < scripts.length;i++){
			if( scripts[i].src.match(regexp) ){
				return scripts[i].src.match(regexp)[1];
			}
		}
	}();

	//include関数
	var pub = function(file){
		document.write('<script type="text/javascript" src="' + baseDir + jsDir + file + '"><\/script>');
	};

	//ベースディレクトリの属性を追加
	pub.baseDir = baseDir;

	return pub;
}();

include('jquery-1.4.1.min.js');
include('jquery.cycle.all.pack.js');
include('jquery.featureCarousel.js');
include('jquery.cross-slide.js');
include('jquery.easing.js');
include('jquery.prettyPhoto.js');
include('jquery.galleryview-1.1.js');
include('jquery.timers-1.2.js');
