function hide(){
    if (!$('shares')) return;
    var shares = $('shares').getElements('.share');
    $('shares').getElement('.share').addClass('active-b');
    $('b-overlay').setStyle('opacity','0');
    var overFx = new Fx.Morph($('b-overlay'),{
        'wait':'true',
        'duration': '800'
    });
    var b_count = 0;
    shares.each(function(share,i){
        b_count++;
    })
    var count = 1;
    function autoHide(){
        if (count > b_count ) count = 1;
        shares.each(function(share,i){
            var curr = $('shares').getElement('.active-b');
            if (curr != share && count == i+1){
                overFx.addEvent('complete',function(){
                    curr.removeClass('active-b');
                    share.addClass('active-b');
                    overFx.removeEvents();
                    overFx.start({
                        'opacity':'0'
                    });
                })
                overFx.start({
                    'opacity':'1'
                });
            }
        })
        count++;
    }
    if (b_count > 1){
        var blinker = autoHide.periodical(5000, null, null);

        shares.addEvents({
            'mouseover':function(){
                $clear(blinker);
            },
            'mouseout':function(){
                blinker = autoHide.periodical(5000, null, null);
            }
        })
    }
}

window.addEvent('domready',function(){
    hide();
})

