//<html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript">

$(function() {
			
	$('.clickfarbaktion').click(function() {
	
		$('#newsList').animate({ "left" : -newWidth*2 });
		$('#container').css({ "background" : "url(switch/raster_12.gif) repeat" });
	
	});
	
	$('.clickthomasvolgmann').click(function() {
	
		$('#newsList').animate({ "left" : -newWidth });
		$('#container').css({ "background" : "#fff" });
		$("#farbaktion").hide(300);
	
	});
			
	$('.clickmakrele').click(function() {
	
		$('#newsList').animate({ "left" : 0 });
		$('#container').css({ "background" : "#fff" });
		$("#farbaktion").hide(300);
	
	});
	
	
	
	$('#volgmannList .hidden').hide();
	$('#volgmannList h4').click(function() {
	
		var currListitem = $(this).parent('li').attr('id');
		
		$('.hidden').not('#' + currListitem + ' .hidden').slideUp();
		
		$('#' + currListitem + ' .hidden').slideDown();
			
	});
	
	
	

	$('#newsSlide').css({ "overflow" : "hidden" });
	
	var newWidth = $(window).width();
	
	$('#newsList').css({ "width" : newWidth*3 });
	$('#newsList li.newsList').css({ "margin-right" : newWidth -764 });
	
	$('.newsImage').each(function() {
	
		var idName = $(this).attr('id');
		var id = '#' + idName;
	
		var firstImage = $(id + ' img:first');
		$(firstImage).css({ "z-index" : 101 });
		$(id + ' img').not(firstImage).hide();
		
		$(id + ' img').each(function() {
		
			var imageName = $(this).attr('alt');
			var div = $('<div id="' + idName + imageName + '" class="inactive" />');
			$(this).addClass(idName + imageName);
			$(id + ' .change').append(div);
			
			$(id + ' .change div.inactive:first').addClass('active');
		
	  	$(div).click(function() {
	  		
	  		var divClicked = $(this).attr('id');
	  		
	  		$(id + ' .active').not(this).removeClass('active');
	  		$(this).addClass('active');
	  		
	  		var currImg = 'img.' + divClicked;
	  		$(id + ' img').not(currImg).fadeOut(function() {
	  			
	  			$('img.' + divClicked).fadeIn();
	  		
	  		});
	  	
	  	});
		
		});
	
	});
	
});

//</script></head><body></body></html>