Fancybox Inside Listview Fails On Second Page

Hi everyone, I have a ListView on my models index page which contains multiple fancybox galleries - one per model. Each model is a portfolio, which contains 1 through N photos. The photos get their own fancybox gallery. Page 1 works great. Any other page loses the code. Basically the problem is that the fancybox javascript definitions are not being updated. Even though I’m using TbListView, the problem is exactly the same if I use CListView.

Yii 1.1.13

EFancyBox v. 1.6

index.php


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

	'dataProvider' => $dataProvider,

	'itemView' => '_view',

	'template' => '{summary}{sorter}<div class="clearfix"></div>{pager}<div class="clearfix"></div>{items}{pager}',

));

_view.php


$this->widget('application.extensions.fancybox.EFancyBox', array(

	'target' => 'a[rel=gallery' . $data->id . ']',

	'config' => array(),

		)

);

foreach ( $data->media as $m ) {

	echo CHtml::link(

		CHtml::image(

			$m->getFileByName('thumbnail')->url,

			$m->getFileByName('thumbnail')->filename,

			array('style' => 'height:' . Media::SIZE_MICROTHUMB_HEIGHT . 'px; margin:2px;')

		),

		$m->getFileByName('highRes')->url,

		array(

			'rel' => 'gallery' . $data->id,

			'title' => $m->getFileByName('highRes')->filename,

		)

	);

}

unset($m);

PortfolioController.php


public function actionIndex() {

	$dataProvider = new CActiveDataProvider('Portfolio');

	if (!isset($_GET['ajax'])) {

		$this->render('index', array(

			'dataProvider' => $dataProvider,

		));			

	} else {

		echo 'index',

		$this->renderPartial(

			'index', 

			array(

				'dataProvider' => $dataProvider,

			),

			false,

			true

		);	

	}

}

I believe this is part of a large problem, in which scripts simply aren’t updated even though renderPartial() appears to be applied properly. Can anyone help? Thanks in advance!