var rAccordion = new Class({

    initialize: function(container, toggleClass, elementClass, options){
        this.container = container;
        this.tClass = toggleClass;
        this.eClass = elementClass;
        this.options = options;
        this.selector = '#' + this.container + ' > .';
        this.makeAccordion();
    },

    makeAccordion: function(){
        // The onActive and onComplete events added to the stack here to
        // attempt to address some of the css issues.
        new Accordion(
            $$(this.selector+this.tClass),
            $$(this.selector+this.eClass),
            this.options
        );
        this.selector += this.eClass + ' > .';
        if($defined($$(this.selector)[0]))
            this.makeAccordion();
    }

});