document.observe('dom:loaded', function() {

    if($('ticker'))
    {
        var ticker = new Marquee({
                element: "ticker",
                life: 5,
        });
        var data = [];
        new Ajax.Request(application_root+'xhr/ticker', {
                 method: 'get',
                 evalJSON: true,
                 onSuccess: function(r) {
                                r.responseJSON.each(function(i){ data.push({message: i}); });
                                ticker.load(data);
                 }
        });
    }

    if($('more'))
    {
        $('more').observe('click',function(){ new Effect.toggle('more-gigs','appear');})
    }

});

