do_dotspinner = function (scope)
{
    var spin_element = function (el)
    {
        max = 5;
        var text = el.innerHTML
        if (text.length==max)
            text="";
        text += ".";
        el.innerHTML = text;
    }

    var els = $(".dotspinner",scope);

    if(!els.length) return;

    els.each(function(){
        spin_element(this);
    });

    var repeat = function(){
        do_dotspinner(scope);
    }

    setTimeout(repeat, 200);
}
