(function($){			
	$Twitter = {
		
		_constructor:function()
		{
			var me = this;
			this.$container = $('#twitter');
			this.indice = 0;
			this.total = this.$container.find('.twittie').length;
			me.initConfig();
		},
		
		trocar: function() {
			this.$container.find('.twittie').hide().eq(this.indice).fadeIn('normal');
		},
		
		passarPara: function(val) {
			this.indice = ((val % this.total) + this.total) % this.total;
			this.trocar();
		},
		
		voltar: function(e) {
            e.preventDefault();
			this.passarPara(this.indice-1);
		},
		
		avancar: function(e) {
            e.preventDefault();
			this.passarPara(this.indice+1);
		},
		
		initConfig:function()
		{
			var me = this;
			this.$container.delegate('.arrow-l','click',function(e) {me.voltar(e);});
			this.$container.delegate('.arrow-r','click',function(e) {me.avancar(e);});
		}
		
	}
})(jQuery); 
