﻿function carrega(nome) {
    var carregando = document.getElementById('carregando')
    var container = document.getElementById('tweet-container')

   // carregando.style.display = "block";
    container.style.display = "none";

    getTwitters('tweet-container', {
        id: nome,
        count: 4,
        enableLinks: true,
        ignoreReplies: true,
        clearContents: true,
        timeout: 12,
        onTimeoutCancel: true,
        onTimeout: function() {
            carregando.style.display = "none";
            template:'Lamento, tempo esgotado!\nNão foi possível completar a requisição para o usuário: ' + nome + '\nTente mais tarde.'
        },
        callback: function() {
            carregando.style.display = "none";
            container.style.display = "block";
        },
        //template: '<span class="imagem"><img height="40" width="40" src="%user_profile_image_url%" /> "%text%" <a href="http://twitter.com/%user_screen_name%/statuses/%id%/" class="time">%time%</a>'
        template: '<span class="imagem">%text% '
    });
} // fim carrega

