EDITABLE CODE:
LiveDemo: jQuery UI Accordion : Creating a Basic Accordion
Note: Each Heading with the selected div element gets transformed to an accordion.