$(function(){
    $("#gadget_1").each(function(){
	$(this).hover(function(){
		$(this).animate({width: "250px"}, {queue:false, duration:450});
      },function() {
		  $(this).animate({width: "30px"}, {queue:false, duration:450});
	  });
    });
});

$(function(){
    $("#gadget_2").each(function(){
	$(this).hover(function(){
		$(this).animate({width: "250px"}, {queue:false, duration:450});
      },function() {
		  $(this).animate({width: "30px"}, {queue:false, duration:450});
	  });
    });
});

$(function(){
	var initWidth = $(window).width();
	if(initWidth > 1600) {
		$('.background_center>img').css('width', initWidth);
	}
	$(window).resize(function() {
	   var newWidth = $(window).width();
	   if (newWidth > 1600) {
		   $('.background_center>img').css('width', newWidth);
	   }
	   if (newWidth <= 1600) {
		   $('.background_center>img').css('width', '');
	   }
	});
});


$(document).ready(function() {
	$('.slide_content').hide().end();
	$('.slide_header').click(function() {
	var currClass = $(this).attr('class').split(' ')[0];
		$(this).toggleClass(currClass + '_open');
		$(this).next().slideToggle('slow');
	});
	$('.home').find('#maerchen').mouseenter(function() {
		$('#header_bild1').stop(true,true).fadeOut("200");
	});
	$('.home').find('#maerchen').mouseleave(function() {
		$('.home').find('#header_bild1').fadeIn("200");
	});
});




