This works but the panels don't expand at all anymore. Can't this be fixed?
function panel($text, $id) {
$ret = '';
if($this->mode == 'pane') {
if($this->openPanel)
$ret .= $this->tabs->endPanel();
$ret .= $this->tabs->startPanel($text, $id);
$this->openPanel = true;
} elseif($this->mode == 'sliders') {
$ret .= JHtml::_('sliders.panel', JText::_($text), $id);
} else {
if($this->openPanel)
$ret .= $this->_closePanel();
$open = '';
if((isset($this->options['startOffset']) && $this->options['startOffset'] == $this->count) || $this->count == 0)
$open = '';