<?php

class FTabView extends CTabView {

    /**
     * Registers the needed CSS and JavaScript.
     */
    public function registerClientScript() {
        $cs = Yii::app()->getClientScript();
        $cs->registerCoreScript('jquery');
        $cs->registerScriptFile(Yii::app()->baseUrl . '/js/custom.jquery.yiitab.js');
        $id = $this->getId();
        $cs->registerScript('Yii.CTabView#' . $id, "jQuery(\"#{$id}\").yiitab();");

        if ($this->cssFile !== false)
            self::registerCssFile($this->cssFile);
    }

}
