var asahi = asahi || new Object();
/**************************************************************************
 * ¢£ContentsLoader - v2
 **************************************************************************/
asahi.ContentsLoader = function()
{
	this.initialize.apply(this, arguments);
}

asahi.ContentsLoader.prototype =
{
	initialize: function()
	{
	},
	
	load: function(xml, id)
	{
		var url = xml + '?' + Math.floor((new Date()).getTime() / 30000);
		var self = this;
		jQuery.get(url,
			function(xml, status)
			{
				if(status != 'success') return;
				var content = jQuery('content', xml).text();
				jQuery('#' + id).html(content);
			});
	},
	
	loadRandom: function(list, id)
	{
		var url = list[Math.floor(Math.random() * list.length)];
		this.load(url, id);
	},
	
	loadScrl: function(xml, id)
	{
		var url = xml + '?' + Math.floor((new Date()).getTime() / 30000);
		var self = this;
		jQuery.get(url,
			function(xml, status)
			{
				if(status != 'success') return;
				var content = jQuery('content', xml).text();
				jQuery('#' + id).html(content);
				asahi.scroll = new asahi.Scroll();
			});
	}
}




if(asahi.agent.getTarget())
{
	asahi.contentsLoader = new asahi.ContentsLoader();
	jQuery(function()
	{
	});
}



