EDITABLE CODE:
LiveDemo: jQuery UI Accordion : Setting the Trigger
Note:You can even set the options using an inline object within the widget method.