window.addEvent('load', function(){

    var notonload;
    var dontscroll;
    
    $('accordion').addEvent('click', function(){
        notonload = 1;
    });
    
    var accordion = new Accordion('h3.atStart', 'div.atStart', {
        display: 999,
        opacity: true,
        duration: 2000,
        alwaysHide: true,
        onActive: function(toggler, element){
            toggler.setStyle('color', '#000');
            activeelement = toggler;
        },
        
        onBackground: function(toggler, element){
            toggler.setStyle('color', '#333');
        }
    }, $('accordion'));
    
    Accordion.implement({
        showAll: function(){
            var obj = {};
            this.elements.each(function(el, i){
                obj[i] = {};
                this.fireEvent('onActive', [this.togglers[i], el]);
                for (var fx in this.effects) 
                    obj[i][fx] = el[this.effects[fx]];
            }, this);
            return this.start(obj);
        },
        hideAll: function(){
            var obj = {};
            this.elements.each(function(el, i){
                obj[i] = {};
                this.fireEvent('onBackground', [this.togglers[i], el]);
                for (var fx in this.effects) 
                    obj[i][fx] = 0;
            }, this);
            return this.start(obj);
        }
    });
    
    
    
    
});




