if (!$(document)) {
	alert("jquery fehlt");
}

$(document).ready(function() {

        $("#news1").click(function() {
            l = $("#news1 a").attr("href");
            window.location.href = l;
        });
        $("#news2").click(function() {
            l = $("#news2 a").attr("href");
            window.location.href = l;
        });
        $("#news3").click(function() {
            l = $("#news3 a").attr("href");
            window.location.href = l;
        });
        $("#news4").click(function() {
            l = $("#news4 a").attr("href");
            window.location.href = l;
        });

	var changetime = 10000;
	setInterval("newscat_flasher()", changetime);
			
})

newscat_flasher = function(i) {
	n1_title 	= $("#news1_title").html();
	n1_content 	= $("#news1_content").html();
	
	n2_title 	= $("#news2_title").html();
	n2_content 	= $("#news2_content").html();
	
	n3_title 	= $("#news3_title").html();
	n3_content 	= $("#news3_content").html();
	
	n4_title 	= $("#news4_title").html();
	n4_content 	= $("#news4_content").html();
	
	$('#news1').fadeOut('slow', function() {
		$("#news1_title").html(n4_title);
		$("#news1_content").html(n4_content);
		// Animation complete.
	});
	
	$('#news2').fadeOut('slow', function() {
		$("#news2_title").html(n1_title);
		$("#news2_content").html(n1_content);
		// Animation complete.
	});
	
	$('#news3').fadeOut('slow', function() {
		$("#news3_title").html(n2_title);
		$("#news3_content").html(n2_content);
		// Animation complete.
	});
	
	$('#news4').fadeOut('slow', function() {
		$("#news4_title").html(n3_title);
		$("#news4_content").html(n3_content);
		// Animation complete.
	});
	
	$('#news1').fadeIn('slow');
	$('#news2').fadeIn('slow');
	$('#news3').fadeIn('slow');
	$('#news4').fadeIn('slow');
}