// a transformer en classe
function SmoothToolTips(){
window.addEvent('domready',function() {  
        return new Tips($$('.tips'), {
        initialize:function(){
            this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 400, wait: false}).set(0);
        },
        onShow: function(toolTip) {
            this.fx.start(1);
        },
        onHide: function(toolTip) {
            this.fx.start(0);
        }
});
    });
}

Accordion.implement({
    showAll: function() {
        var obj = {};
        this.previous = -1;                  //  Added this line
        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.previous = -1;                  //  Added this line
        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);
    }
});
