var updateTweets = function()
{
	var url = $('#tweetUL').data('url');
	var id = $('#tweetUL').data('id');

	var last = $('#tweetUL').children('li')[0];
	var params = {id:id};

	if(last != undefined)
	{
		params['update'] = $(last).attr('tweetid');
	}//if last

	callActionQuiet(url, params)
}//updateTweets

var startTweetUpdate = function(url, id)
{
	$('#tweetUL').data('url', url);
	$('#tweetUL').data('id', id);
	$('#tweetUL').data('limit', 0);

	$('#tweetUL').everyTime(5000, updateTweets);
}//startTweetUpdate

var receiveNewTweets = function(html)
{
	$('#tweetUL').prepend(html);
	$('.newTweet').fadeIn(2000, onTweetSlide);

	var $all = $('#tweetUL > *');

	var tt = $all.length;
	if(tt < limit || $('#tweetUL').data('limit') == 0)return;

	var limit = 50;

	for(var t = tt - 1; t > limit; t--)
	{
		$($all[t]).remove();
	}//while > 100
}//receiveNewTweets

var onTweetSlide = function()
{
	$(this).removeClass('newTweet');
}//onTweetSlide