	$(document).ready(function()
		{
			// Message line
			$("#topGreenBox").cycle(
				{
					fx: 'scrollLeft',			// choose your transition type, ex: fade, scrollUp, shuffle, etc...
					timeout: 5000,
//					speed: null,			// speed of the transition (any valid fx speed value)
					speedIn: 1400,			// speed of the 'in' transition
					speedOut: 1000,			// speed of the 'out' transition
					sync: 0,				// true if in/out transitions should occur simultaneously
	    			easeIn: 'easeOutQuint',	// easing for "in" transition
					easeOut: 'easeInQuad',	// easing for "out" transition
					after: onAfter
				});

			function onAfter()
				{
    				$("#topGreenBox div").pulse({opacity: [1, 1], backgroundColor: ['#FFCC33', '#DEEBC8']}, 200, 1, 'easeOutQuad');
				}


			// Navigation highlight
			$("#navigationBox .navbar ul li a").hover(
				function()
					{
						$(this).parent().animate({ backgroundColor: "#E5E9BD" }, 400);

					},
				function()
					{
						$(this).parent().animate({ backgroundColor: "#78A22F" }, 800);
					});


			// ep-beratung.inc.php / Hide some elements 'till needed
			// Hide elements with JS, just in case JS is deactivated so the user couldn't use the textarea
			$("#sonstigesLabel").css("display", "none");
			$("#posSonstiges").css("display", "none");

			// Observe checkbox if un/checked by user and take action
			$('#sonstigesCheck').click (function ()
				{
					var thisCheck = $(this);

					if(thisCheck.is(':checked'))
						{
							$("#sonstigesLabel").css("display", "block");
							$("#posSonstiges").css("display", "block");
						}
						else
							{
								$("#sonstigesLabel").css("display", "none");
								$("#posSonstiges").css("display", "none");
								$("#posSonstiges").val("");
							}
				});


		});
