$(document).ready(function(){
	
	$.history.init(callback);
	
	page_prep();
	
	$('div#flash').flash({
		src: 'public/swf/header.swf',
		width: 800,
		height: 361
	});
	
});

function loadSection(href)
{
	$.history.load(href.replace(/^.*#/, ''));
}

function page_prep()
{
	$('div.left h3:first').css("font-size", "14px");
	$('#loader').hide();
	
	$("a[@rel='history']").click(function(){
		loadSection(this.href);
		return false;
	});
}

function callback(href)
{
	/*
	
	if(href)
	{
		//alert(escape("index.php/lite/"+url));
		goto = escape(href);
		
		if(jQuery.browser.msie && jQuery.browser.version < 7)
		{
			window.location = "http://astro-man.com/index.php/lite/"+escape(goto);
		}
		else
		{
			$('div#ajax').show();
			$('div#showreel').hide();
			$('div#showreel2').hide();
			
			$("div#ajax").load("index.php/lite/"+goto+"/ #right", null, function(){
				page_prep();
			});
			
		}
	}
	
	*/
	
	
	
	
	if(href)
	{
		$('#content').hide();
		$('#loader').show();
		
		$('#content_area').load("index.php/"+href+" #content", false, function(){
			page_prep();
		});
	}
	
}
