	function mycarousel_itemLoadCallback(carousel, state)
	{
		var carouselId = carousel.list.attr('id');
		var itemListId = '#' + carouselId + '_itemList';
		var itemList = eval(carouselId + "_itemList");
	
		if(document.getElementById(carouselId) == "undefined" || document.getElementById(carouselId) == null)
			return;
			
		carousel.size(itemList.length);
		if(itemList.length > 1)
		{
			$('.jcarousel-control').show();
		}

		for (var i = carousel.first; i <= carousel.last; i++) {
			if (carousel.has(i)) {
				continue;
			}

			if (i > itemList.length) {
				carousel.size(itemList.length);
				break;
			}

			// Create an object from HTML
			var item = jQuery(mycarousel_getItemHTML(itemList[i-1])).get(0);

			carousel.add(i, item);
		}
	};
	
	function mycarousel_getItemHTML(item)
	{
		var url_m = item.link;
		return '<a href="' + url_m + '" title="' + item.title + '"><img src="' + item.url + '" width="100%" height="100%" border="0" alt="' + item.title + '" /></a>';
	};
	
	function mycarousel_initCallback(carousel)
	{
		jQuery('.jcarousel-control a').bind('click', function() {
			carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
			return false;
		});
	
		// Disable autoscrolling if the user clicks the prev or next button.
		carousel.buttonNext.bind('click', function() {
			carousel.startAuto(0);
		});

		carousel.buttonPrev.bind('click', function() {
			carousel.startAuto(0);
		});

		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};

