Sample code:
// first, you'll need a reference to a [DIV/block-level element]
var ad = document.getElementById('accordionDiv');
// make a new Accordion object
var a = new Accordion(ad);
// add Rib objects to it
// plain vanilla Rib, returns reference to the new Rib object
var r = a.addRib(null, "This Rib's initial contents."); // initial contents can be HTML or an element
// This next Rib is one with no initial content, but collapsed and expanded CSS styles have been specified, and it will be expanded initially
var r2 = a.addRib(null, null, 'ribShrunk', 'ribExpanded', false);
// ... the possibilities are limited only to your imagination