Bootstrap.widgets.tbalert Stops Fadeout From Working

When adding the bootstrap.widgets.TbAlert, my fadeout in my view stops working. Any ideas on what may be causing it to break?



$this->widget('bootstrap.widgets.TbAlert', array(

        'block'=>true, // display a larger alert block?

        'fade'=>true, // use transitions?


        'alerts'=>array( // configurations per alert type

            'success'=>array('block'=>true, 'fade'=>true),// success, info, warning, error or danger







       '$(".flash-success").animate({opacity: 1.0}, 3000).fadeOut("slow");',




<?php if(Yii::app()->user->hasFlash('success')):?>

    <div class="flash-success">

        <?php echo Yii::app()->user->getFlash('success'); ?>


<?php endif; ?>