jQuery(document).ready(function($){ 		
	
	function mycarouselInitCallback(carousel)
	{
		// Pause autoscrolling if the user moves with the cursor over the clip.
		carousel.clip.hover(function() {
			carousel.stopAuto();
		}, function() {
			carousel.startAuto();
		});
	};
	
	function mycarouselItemVisibleInCallback(carousel, item, i, state, evt)
	{
		// The index() method calculates the index from a
		// given index who is out of the actual item range.
		//var idx = carousel.index(i, $('#news-items').children('li').length);
		//carousel.add(i, mycarouselGetItemHTML($('#news-items').children('li').eq(idx - 1)));
		carousel.add($('#news-items').children('li').length + 1, item.innerHTML);
	};

	function mycarouselItemVisibleOutCallback(carousel, item, i, state, evt)
	{
		carousel.remove(i);
	};

	/**
	* Item html creation helper.
	*/
	function mycarouselGetItemHTML(item)
	{
		//alert(item.html());
		return item.html();
	};

	$('#right-content-center').carousel({
		direction:'vertical',
		dispItems:2,
		//pagination:true,
		prevBtnInsert:'appendTo',
		prevBtn:'<span>&nbsp;</span>',
		nextBtn:'<span>&nbsp;</span>',
		autoSlide:true,
		autoSlideInterval:10000,
		animSpeed:3000,
		loop:true
	});

});
