public function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->getClientScript();

        $min = $this->debugMode
            ? '.min'
            : '';

        $cs->registerCssFile($assetsUrl . '/css/bootstrap-switch.css');
        $cs->registerScriptFile($assetsUrl . '/js/bootstrap-switch' . $min . '.js', CClientScript::POS_END);

        if ($this->events) {
            /* initialize plugin */
            $selector = '#' . TbArray::getValue('id', $this->pluginOptions);

            $this->getApi()->registerEvents($selector, $this->events);
        }
    }