var over = 0;
function fadeEngine(x) {
     var total_divs = $("#headerbild ul li").size();
     var y=x;
     if ( over != 1 ) {
          if(x==total_divs) y=1; else y++;
             $("#headerbild ul li:nth-child("+x+")").fadeOut(2500);
             $("#headerbild ul li:nth-child("+y+")").fadeIn(2500);
     }
     setTimeout("fadeEngine("+y+")",6000);
}
fadeEngine(0); 




$(document).ready(function() {
	

$("#sliderlink").html("<img src='/fileadmin/templates/images/auf.jpg'>&nbsp; mehr Informationen");
$("#text").removeClass("aktivelement");
$('#sliderlink'). toggle(function() {
$("#sliderlink").html("<img src='/fileadmin/templates/images/zu.jpg'>&nbsp; weniger Informationen");
$("#newstext").animate({'left':'-580px'}, "slow");

},
function() {

$("#text").addClass("aktivelement");
$("#sliderlink").html("<img src='/fileadmin/templates/images/auf.jpg'>&nbsp; mehr Informationen");
$("#newstext").animate({'left':'0px'}, "slow");

});


$(".no2 a").mouseover(function() {
    $(this).css("color","#FFCC34");
}).mouseout(function(){
   $(this).css("color","#ffffff");
});


$("#myTable").tablesorter( {sortList: [[0,0], [1,0]]} ); 
    
		
$(".csc-textpic-imagewrap a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000, theme:'dark_rounded'});


$("#commentForm").validate();

});

