$(function(){
		
			/*
			$("#bogennadel-bt25").css({
				opacity: 1
			});
			*/
			$("#magnet-bt").css({
				opacity: 0.25
			});
			$("#magnet-bt span").css({
				opacity: 1.0
			});
			$("#bogennadel-bt").css({
				opacity: 0.25
			});
			$("#clip-bt").css({
				opacity: 0.25
			});
			$("#spiegel-bt").css({
				opacity: 0.25
			});
			$("#sicherheitsnadel1-bt").css({
				opacity: 0.25
			});
			$("#sicherheitsnadel1-bt span").css({
				opacity: 1.0
			});
		
			$("div.button").click(function(){
				
				$clicked = $(this);
				
				// if the button is not already "transformed" AND is not animated
				if ($clicked.css("opacity") != "1" && $clicked.is(":not(animated)")) {
					
					$clicked.animate({
						opacity: 1,
						borderWidth: 5
					}, 600 );
					
					// each button div MUST have a "xx-button" and the target div must have an id "xx" 
					var idToLoad = $clicked.attr("id").split('-');
					
					//we search trough the content for the visible div and we fade it out
					$("#fertigbutton").find("div:visible").fadeOut("fast", function(){
						//once the fade out is completed, we start to fade in the right div
						$(this).parent().find("#"+idToLoad[0]).fadeIn();
					})
				}
				
				//we reset the other buttons to default style
				$clicked.siblings(".button").animate({
					opacity: 0.25
					/* borderWidth: 1*/
				}, 600 );
				
				$clicked.siblings("span").animate({
					opacity: 1.0
					/* borderWidth: 1*/
				}, 600 );
				
			});
		});
