$(document).ready(function() {

$('textarea[maxlength]').keyup(function(){
		//get the limit from maxlength attribute
		var limit = parseInt($(this).attr('maxlength'));
		//get the current text inside the textarea
		var text = $(this).val();
		//count the number of characters in the text
		var chars = text.length;
		
		//check if there are more characters then allowed
		if(chars > limit){
			//and if there are use substr to get the text before the limit
			var new_text = text.substr(0, limit);
			
			//and change the current text with the new text
			$(this).val(new_text);
		}
	});


	
	$("#commentForm").validate();
	$("a[rel^='prettyPhoto']").prettyPhoto({animationSpeed:'fast',slideshow:10000, theme:'dark_rounded'});



if($("#header ul li").length > 1) {

$("#header ul").innerfade({
  speed: 3000,
  timeout: 5500,
  containerheight: '395px'
});
}

	
	$(".grauheader").click(function(){ 
		$(this).next(".boxinnen").slideToggle();
	});
	


});
