var isInTag = false;
function createTicker(){
	// put all list elements within #ticker-area into array
	var tickerLIs = $("#ticker-area ul").children();
	tickerItems = new Array();
	tickerLIs.each(function(el) {
		tickerItems.push( jQuery(this).html() );
	});
	i = 0
	rotateTicker();
}

function rotateTicker(){
	if( i == tickerItems.length ){
	  i = 0;
	}
  tickerText = tickerItems[i];
	char = 0;
	type();
	setTimeout("rotateTicker()", 10000);
	i++;
}
	
function type() {	
	var thisChar = tickerText.substr(char, 1);
	if( thisChar == '<' ){ isInTag = true; }
	if( thisChar == '>' ){ isInTag = false; }
	$('#ticker-area').html("&nbsp;" + tickerText.substr(0, char++));
	if(char < tickerText.length+1)
		if( isInTag ){
			type();
		}else{
			setTimeout("type()", 28);
		}
	else {
		char = 1;
		tickerText = "";
	}	
}
