anzElemente = 0;
left = 0;
cnt = 1;

$(document).ready( function() {
	cloneLiElement();
	setTeaserWidth();
	
	teaseranimation = setInterval("teaserAnimation()", 10000);
});

function cloneLiElement() {
	element = $('#teaser1zu1_ul li:first-child').clone();
	$('#teaser1zu1_ul').append(element);
}

function setTeaserWidth() {
	anzElemente = $('#teaser1zu1_ul li').length;
	
	breite = (anzElemente * 600);
	$('#teaser1zu1_ul').width(breite);
}

function teaserAnimation() {
	left -= 600;
	$('#teaser1zu1_ul').animate( {left: left}, 
		2000,
		function() {
			checkTeaser();
		});	
}

function checkTeaser() {
	cnt ++;
	
	if( cnt == anzElemente)
	{
		$('#teaser1zu1_ul').css('left', '0px');
		left = 0;
		cnt = 1;
	}
}

