function reloadCenter (subpage) {
		var href = subpage.attr('href');
		$("#center").fadeOut("slow",function() {
			$("#center").empty();
			$("#center").load("subpage/"+href);
			$("#box").css("background-image","url(img/"+href.substr(0,href.length-4)+".jpg)");
			$("#center").fadeIn("slow");
		});
}

function initNavi() {
	$('#navigation li a').each(function(i) {
		$(this).bind('click',function() {
			if ($(this).attr('target') != '_blank') {
				reloadCenter($(this));
				return false;
			}
		})
	});
	$('#navigation>ul>li:not(.header)>a').each(function(i) {
		$(this).bind('mouseover',function() {
			subNavi($(this).parents('li'));
		});
	});
}

function subNavi(parentLI) {
	$('#navigation>ul>li:not(.header)>a').css('color','#777');
	$(parentLI).children('a').css('color','#000');	
	$('#navigation li ul').css('display','none');
	$(parentLI).children('ul').css('display','block');
}

$(document).ready(function() {
	initNavi();

}); 

