jQuery(document).ready(function($){



	// ie < 7.0 kann kein li:hover

	if ($.browser.msie && +$.browser.version < 7) {
	
		// if ie6 add hover support to elements
		$('.iehover').live('mouseover', function(e){
			if ($(this).hasClass('iehover')) {
				$(this).addClass('hover');
			}
		}).live('mouseout', function(e){
			if ($(this).hasClass('iehover')) {
				$(this).removeClass('hover');
			}
		});
	
	}
	
	// Zeichen zählen in textarea
	function limitChars(textid, limit, infodiv)
	{
		var text = $('#'+textid).val();	
		var textlength = text.length;
		if(textlength > limit)
		{
			$('#' + infodiv).html('Sie können nicht mehr als '+limit+' Zeichen schreiben!');
			$('#'+textid).val(text.substr(0,limit));
			return false;
		}
		else
		{
			$('#' + infodiv).html('Noch '+ (limit - textlength) +' Zeichen übrig.');
			return true;
		}
	}
	
	$(function(){
	 	$('#field_6').keyup(function(){
	 		limitChars('field_6', 1000, 'charlimitinfo');
	 	})
	});
	
	// Stylish Select
	$('#groupform select').sSelect({ddMaxHeight: '300px'});



	
});
