$js = 'var myUrl = "' . Yii::app()->createUrl('bla/bla/bla', array('id' => 'REPLACE_HERE')) . '";';
Yii::app()->getClientScript()->registerScript('carramba', $js, CClientScript::POS_HEAD )
var realUrl = myUrl.replace('REPLACE_HERE', id);
<a href='#' class='slide-1 num'>1</a>
<a href='#' class='slide-2 num'>2</a>
<a href='#' class='slide-3 num'>3</a>
$('.num').click(function(){
var index = $('.num').index($(this));
gotoSlide(index);
return false;
});
function gotoSlide(i){
var currentSlide=i;
if(currentSlide>=$('.slidewrapper').children().size())
{
currentSlide=0;
}
$('.slidewrapper').animate({left: -currentSlide*slideWidth},300).data('current',currentSlide);
return false;
}