$(document).ready(function() 
{
	var isPause = false;
	marquee();
	
	function marquee()
	{
		
		$('.highlight').animate({'left': "-220px"}, 6000, 'linear', reset); //3000 440
		$('.marquee_new').animate({'left': "870px"}, 8000, 'linear', reset);
	}
	
	function reset()
	{
		$('.highlight').css('left', '210px');
		$('.marquee_new').css('left', '0px');
		marquee();
	}
	
	$('.pause').click(function() {
		$('.highlight').stop();
		$('.highlight').fadeOut("slow", function(){
			$('.highlight').css('left', '0px');
			$('.highlight').fadeIn("slow");
		});
		isPause = true;

	});
	
	$('.play').click(function() {
		if(isPause)
		{
			$('.highlight').animate({'left': "-=217px"}, 3000, 'linear', reset); 
			isPause = false;
		}
	});
});

function setHeight() 
{ 
	var divNavi = document.getElementById("navigation");
	naviHeight = divNavi.offsetHeight;

	// Contenthoehe entweder auf mind. 500px setzten, oder auf die Hoehe von Navi anpassen
	var divContent = document.getElementById("content");
	if(naviHeight>530)
	{
		divContent.style.minHeight = " " + naviHeight + "px";
	}
	else
	{
		divContent.style.minHeight = "530px";
	}
}

