
	$(document).ready(function(){	
		//default usage
		$("text").charCount();
		//custom usage
		$("#message2").charCount({
			allowed: 160,		
			warning: 20,
			counterText: 'Verbleibende Zeichen: '	
		});
		$("#message3").charCount({
			allowed: 160,		
			warning: 20,
			counterText: 'Verbleibende Zeichen: '	
		});
		$("#message4").charCount({
			allowed: 160,		
			warning: 20,
			counterText: 'Verbleibende Zeichen: '	
		});
	});
	
	$(document).ready(function() {
			$(".checklist .checkbox-select").click(
				function(event) {
					event.preventDefault();
					$(this).parent().addClass("selected");
					$(this).parent().find(":checkbox").attr("checked","checked");
					
				}
			);
			
			$(".checklist .checkbox-deselect").click(
				function(event) {
					event.preventDefault();
					$(this).parent().removeClass("selected");
					$(this).parent().find(":checkbox").removeAttr("checked");
					
				}
			);
			
		});
	

		$(function () {
			var $alert = $('#alert');
			if($alert.length)
			{
				var alerttimer = window.setTimeout(function () {
					$alert.trigger('click');
				}, 5000);
				$alert.animate({height: $alert.css('line-height') || '50px'}, 200)
				.click(function () {
					window.clearTimeout(alerttimer);
					$alert.animate({height: '0'}, 200);
				});
			}
		});


$(document).ready(function() {

	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});

});

