$(document).ready(function(){
	
	$('#wrapper-character').find('.character-button').click(function(event){
		event.preventDefault();	
		$('#wrapper-character').find('.character-button').removeClass('active');
		$('#wrapper-character').find('.character-detail').fadeOut('slow');
		
		var target = $(event.target);
		
		target.addClass('active');
		
		var id = target.attr('id');
		
		var character = 'character-detail-' + id.split('-')[1];
		$('.' + character).fadeIn('slow');
	})
	
	/**$('#btn-jaeger').click(function(event){
		event.preventDefault();		
		$('.character-detail-jaeger').fadeIn("slow");
		$('.character-detail-magier').fadeOut("slow");
		$('#btn-jaeger').addClass("active");
		$('#btn-magier').removeClass("active");
	});**/
	
	$('#close-jaeger').click(function(event){
		event.preventDefault();
		$('.character-detail-jaeger').fadeOut("slow");
		$('#btn-jaeger').removeClass("active");
	});
	$('#close-magier').click(function(event){
		event.preventDefault();
		$('.character-detail-magier').fadeOut("slow");
		$('#btn-magier').removeClass("active");
	});
	$('#close-joker').click(function(event){
		event.preventDefault();
		$('.character-detail-joker').fadeOut("slow");
		$('#btn-joker').removeClass("active");
	});
	$('#close-priester').click(function(event){
		event.preventDefault();
		$('.character-detail-priester').fadeOut("slow");
		$('#btn-priester').removeClass("active");
	});
	$('#close-krieger').click(function(event){
		event.preventDefault();
		$('.character-detail-krieger').fadeOut("slow");
		$('#btn-krieger').removeClass("active");
	});
   
   
});// JavaScript Document