$(document).ready(function(){
	
	$(".buttonLeft.phone img").mouseover(function() {
		if($('.buttonRightA.phone').css('display') == 'none') 
			$('.buttonRightB.phone').animate({width: "15px"}, 100);
  	}).mouseout(function(){ $('.buttonRightB.phone').animate({width: "11px"}, 100); });
  
	$(".buttonLeft.facebook img").mouseover(function() {
		if($('.buttonRightA.facebook').css('display') == 'none') 
			$('.buttonRightB.facebook').animate({width: "15px"}, 100);
  	}).mouseout(function(){ $('.buttonRightB.facebook').animate({width: "11px"}, 100); });
	
	$(".buttonLeft.email img").mouseover(function() {
		if($('.buttonRightA.email').css('display') == 'none') 
			$('.buttonRightB.email').animate({width: "15px"}, 100);
  	}).mouseout(function(){ $('.buttonRightB.email').animate({width: "11px"}, 100); });

	$(".buttonLeft.xing img").mouseover(function() {
		if($('.buttonRightA.xing').css('display') == 'none') 
			$('.buttonRightB.xing').animate({width: "15px"}, 100);
  	}).mouseout(function(){ $('.buttonRightB.xing').animate({width: "11px"}, 100); });



	$(".buttonLeftBig.peter").click(function(){
		$(".buttonRightBigA.peter").toggle();
	});

	$(".buttonLeft.phone").click(function(){
		$('.buttonRightB.phone').css("width", "11px");
		$(".buttonRightA.phone").toggle();
		if ($(this).hasClass("close")) $(this).removeClass("close").addClass("open");
		else $(this).removeClass("open").addClass("close");
	});
	
	$(".buttonLeft.email").click(function(){
		$('.buttonRightB.email').css("width", "11px");
		$(".buttonRightA.email").toggle();
		if ($(this).hasClass("close")) $(this).removeClass("close").addClass("open");
		else $(this).removeClass("open").addClass("close");		
	});
		
	$(".buttonLeft.xing").click(function(){
		$('.buttonRightB.xing').css("width", "11px");
		$(".buttonRightA.xing").toggle();
		if ($(this).hasClass("close")) $(this).removeClass("close").addClass("open");
		else $(this).removeClass("open").addClass("close");					
	});
	
	$(".buttonLeft.facebook").click(function(){
		$('.buttonRightB.facebook').css("width", "11px");
		$(".buttonRightA.facebook").toggle();
		if ($(this).hasClass("close")) $(this).removeClass("close").addClass("open");
		else $(this).removeClass("open").addClass("close");			
	});
	
	$("p.impressum").click(function(){
		$(".layer").fadeIn("slow");	
	});	

	$(".layerClose").click(function(){
		$(".layer").fadeOut("slow");	
	});	
	
	
});

$(window).load(function() {
	$("body").fadeIn();
});
