/*
	--------------------------------
	Created: 2008.01.10
	Last Modified: 2008.09.18 by ryuko@commons.co.jp
	--------------------------------
	- Table of Contents -

	インクルード
	--------------------------------
*/



/* --------------------------------
	インクルード
-------------------------------- */

$(function() {
	var include = new Include();
	include.write('sidebar', 'common/tpl/sidebar.tmpl', function() { rollover_imp.setToggle('#sidebar .rollover_imp', '_on'); });
});

function Include() {
	this.path = $('script[src$=common/js/include.js]').attr('src').replace('common/js/include.js', './');

	this.write = function(id, file, callback) {
		var self = this;
		$.ajax({
			url: this.path + file,
			type: 'get',
			dataType: 'html',
			success: function(src) {
				while (src.match(/__path__/)) {
					src = src.replace('__path__', self.path);
				}
				$('#' + id).html('\n' + src);
				if (callback) callback();
			}
		});
	}
}








