function updatePage(id) {
	if (!id) {
		id = window.location.hash ? window.location.hash : '';
	}
	if (id) {
		$.ajax({
			url: "index.php",
			type: "GET",
			data: ({content : id}),
			success: function(xml){
				var title, keywords, description, html;
				title = $('title', xml).text();
				keywords = $('keywords', xml).text();
				description = $('description', xml).text();
				html = $('html', xml).text();
				document.title = title;
				$('meta[name=description]').attr('content', description);
				$('meta[name=keywords]').attr('content', keywords);
				$('#plaincontent').html(html);
				// bind 'em all
				$('#ajaxmenu li a, #ajaxsubmenu li a')
					.unbind('click')
					.click(function(){
						updatePage(this.getAttribute('id'));
					}
				);
			}
		});
	}
}
$(function(){
	updatePage();
})
