

υσι

hatsune = {
	load : null
	
};

function IA()
{
	this.hrefRequest = function(href, type = 'GET')
	{
		if (!hatsune.load)
		{
			
			hatsune.load = $.ajax({
				'url': href,
				'type': type,
				'beforeSend': function()
				{
				},
				'success' : function(data)
				{
					$('#main').html(data);
					hatsune.load = null;
				},
				'error' : function(err)
				{

				}				
				
			});
			
		}
	}
}

$(function(){
	
	miku = new IA();
	
	$(document).ready(function(){
		
		$(document).on('click', 'a[href][prevent!="true"]', function(event)
		{
			var t = $(this);
			if(!event.isDefaultPrevented())
			{
				event.preventDefault();
				miku.hrefRequest(t.attr('href'));
			}

		});
	});
});