$(function(){
	$('#hauptnav > ul > li:not(:first) > a').click(function(){
		return false;
	});
	if($(window).width() > 1838){
		$('#headerbild img').width($(window).width());
	}
	function headerBildStart(){
		$width_window = $(window).width();
		$width_bild = $('#headerbild img').width();
		$minus = $width_window - $width_bild;
		$('#headerbild img').css({
			'margin-left':$minus/2
		});
	}
	function headerBild(){
		$width_window_a = $(window).width();
		$width_bild_a = $('#headerbild img').width();
		$minus_a = $width_window_a - $width_bild_a;
		$('#headerbild img').delay(400).stop(true).animate({
			'margin-left':$minus_a/2
		},1500,'easeOutExpo');
	}
	$(window).resize(function(){
		headerBild();
	});
	header = setTimeout(headerBildStart,100);
	$('#slideshow').cycle({
		prev:'#left',
		next:'#right',
		before:function(){
			$('#description').html($(this).attr('data-desc'));
		},
		timeout:0,
		autostop:1
	});
});
