function determine_section() {
	var section = '';
	if (self.document.location.hash) {
		section = unescape(self.document.location.hash.substring(1))
	}
	return section;
}

function load_section(section, check_url) {
	var content = $("#main_content");
	var url_section = '';
	
	if (check_url) {
		url_section = determine_section();
		if (url_section.length > 0) {
			section = url_section;
		}
	}
	
	if (section.length == 0) {
		section = 'home';
	}
	
	content.empty();
	content.load('sections/' + section + '.inc.php');
    window.location.hash = section;
}

function parseTwitterDate(text) {
	var created_at = new Date(text);
	var date = created_at.toString('MMM d \'yy @ h:mmtt');
	return date;
}
