<div class="slider-wrapper box-shadow theme-<?php echo $this->theme; ?>" >
    <div id="<?php echo $this->getId(); ?>" class="theme-<?php echo $this->theme; ?>" >
        <?php foreach ($slider->sliderImages as $image): ?>
            <?php
            $title = '';
            if ($image->title && strlen(trim($image->title))) {
                $title = "#slide-desc-{$image->id}";
            }
            $path = Yii::app()->params['uploadUrl'] . get_class($image) . '/';
            $imageUrl = $path . $image->image;
            $largeImageUrl = $path . 'large/' . $image->image;
            $img = CHtml::image($imageUrl, $image->title, array('title' => $title));
            if ($image->link):
                ?>
                <?php echo CHtml::link($img, $image->link, array('title' => $title)); ?>
            <?php else: ?>
                <?php echo $img ?>
            <?php endif; ?>
        <?php endforeach; ?>
    </div>
    <?php foreach ($slider->sliderImages as $image): ?>
        <div id="<?php echo "slide-desc-{$image->id}"; ?>" class="nivo-html-caption after" >
            <h4><?php echo $image->title; ?></h4>
           <p><?php  echo $image->description;       ?></p>
        </div>
		
    <?php endforeach; ?>
</div>