$(document).ready(function(){

	$("#link_willkommen").click(function(){
		document.title = "Willkommen // Steffen Behn";
		$("#bg").fadeOut("slow", function() {$("#bg").css("background-image","url(gfx/bg_portobelo.jpg)")});
		$("#bg").fadeIn("slow");
	});
		
	$("#link_ueber_mich").click(function(){
		document.title = "Über mich // Steffen Behn";
		$("#bg").fadeOut("slow", function() {$("#bg").css("background-image","url(gfx/bg_sanblas.jpg)")});
		$("#bg").fadeIn("slow");
	});
	
	$("#link_impressionen").click(function(){
		document.title = "Impressionen // Steffen Behn";
		$("#bg").fadeOut("slow", function() {$("#bg").css("background-image","url(gfx/bg_city_bei_nacht.jpg)")});
		$("#bg").fadeIn("slow");
	});
	
	$("#link_studium_und_job").click(function(){
		document.title = "Studium & Job // Steffen Behn";
		$("#bg").fadeOut("slow", function() {$("#bg").css("background-image","url(gfx/bg_coiba_1.jpg)")});
		$("#bg").fadeIn("slow");
	});
	
	$("#link_kontakt").click(function(){
		document.title = "Kontakt // Steffen Behn";
		$("#bg").fadeOut("slow", function() {$("#bg").css("background-image","url(gfx/bg_coiba_2.jpg)")});
		$("#bg").fadeIn("slow");
	});
	
	$("#link_blog").click(function(){
		document.title = "Blog // Steffen Behn";
		$("#bg").fadeOut("slow", function() {$("#bg").css("background-image","url(gfx/bg_causeway.jpg)")});
		$("#bg").fadeIn("slow");
	});
		
	
	$("#menu a")
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate(
			{backgroundPosition:"(0 -400px)"}, 
			{duration:500})
		})
		.mouseout(function(){
			$(this).stop().animate(
			{backgroundPosition:"(0 0)"}, 
			{duration:300})
	})

});


