var tickerText = "";
var c = 0;
var t;

$(document).ready(function () {
	tickerText = $('.welcome').html();
	typetext();
});

var isInTag = false;
function typetext() {	
	var thisChar = tickerText.substr(c, 1);
	if( thisChar == ' ' ){ isInWord = false; }
	if( thisChar != ' ' ){ isInWord = true; }
	if( thisChar == '<' ){ isInTag = true; }
	if( thisChar == '>' ){ isInTag = false; }
	$('.welcome').html(tickerText.substr(0, c++));
	if(c < tickerText.length+1)
		if( ( isInTag ) || ( isInWord ) ) {
			typetext();
		}else{
			t = setTimeout("typetext()", 50);
		}
	else {
		c = 1;
		tickerText = "";
		clearTimeout(t);
	}	
}


