(function($) {
	/*
		jquery.twitter.js v1.0
		Last updated: 26 October 2008

		Created by Damien du Toit
		http://coda.co.za/blog/2008/10/26/jquery-plugin-for-twitter

		Licensed under a Creative Commons Attribution-Non-Commercial 3.0 Unported License
		http://creativecommons.org/licenses/by-nc/3.0/
	*/
	
	$.fn.getTwitter = function(options) {

		var o = $.extend({}, $.fn.getTwitter.defaults, options);
		var msgError = true;
		var intElement = 0;
		var goPlay = 0;

		var printError = function () {
			$("#slide-twitter").fadeTo(500, 1);
			$("#slide-twitter").html('<span id="preloader">erro!</span>');
			$("#slide-twitter").fadeTo(5500, 1);
			clearInterval(showError);
		}
	
		var goRoll = function () {
	
			$("#slide-twitter").html($("ul#twitter_update_list li:eq("+intElement+")").html());
			intElement = intElement+1;

			if( $("ul#twitter_update_list li:eq("+intElement+")").html() == null ) {
				intElement = 0;
			}

			goPlay = window.setTimeout(goRoll, 8000);

			$("#slide-twitter").fadeTo(500, 1);
			$("#slide-twitter").fadeTo(6000, 1);
			$("#slide-twitter").fadeTo(500, 0);
			
	
		}

		$(this).hide();

		$(this).append('<ul id="twitter_update_list"><li></li></ul>');

		$("ul#twitter_update_list").hide();

		var pl = $('<span id="preloader">carregando tweets...</span>');
		$("#slide-twitter").append(pl);

		$(this).show();

		$.getScript("http://twitter.com/javascripts/blogger.js");
		$.getScript("http://twitter.com/statuses/user_timeline/"+o.userName+".json?callback=twitterCallback2&count="+o.numTweets, function() {

			$('ul#twitter_update_list li').each(function() {
				if(o.showTime) {
					$(this).find('a').attr('target', '_blank');
					texto = $(this).find('a:last').html();
					if(texto != null) {
						texto = '('+texto+')';
						texto = texto.replace('about','aproximadamente');
						texto = texto.replace('less than','menos de');
						texto = texto.replace(' a ',' um ');								
						texto = texto.replace('minute','minuto');				
						texto = texto.replace('hour','hora');
						texto = texto.replace('day','dia');
						texto = texto.replace('week','semana');
						texto = texto.replace('months','meses');
						texto = texto.replace('month','mês');				
						texto = texto.replace('ago','atrás');
						$(this).find('a:last').html(texto);
					}
				} else {
					$(this).find('a:last').html('');
				}
				texto = $(this).html();
				if(texto.length > o.showLength) {
					texto =  texto.substring(0, o.showLength) + '...';
				}
				$(this).html(texto);
			});

			$("#slide-twitter").fadeTo(500, 0);
	
			goPlay = window.setTimeout(goRoll, 500); 

		});

		//$(pl).remove();

	};

	// plugin defaults
	$.fn.getTwitter.defaults = {
		userName: null,
		showTime: false,
		showLength: 200,
		numTweets: 3
	};

})(jQuery);

<!--//--><![CDATA[//><!--
	$(document).ready(function() { $("#twitters").getTwitter({ userName: 'sergiocabralRJ' }); });
//--><!]]>