// JavaScript Document

$(document).ready(function(){
	$("#testimonials").mouseover(function() { $("#testimonials").trigger("stop"); }).mouseout(function() { $("#testimonials").trigger("start"); });
});

jQuery(function( $ ){
	var $news = $('#testimonials');//we'll re use it a lot, so better save it to a var.
	var count = $news.find('p');
	$news.serialScroll({
		items:'p',
		duration:6000,
		constant:true,
		force:true,
		axis:'y',
		cycle:false,
		easing:'linear',
		lazy:true,// NOTE: it's set to true, meaning you can add/remove/reorder items and the changes are taken into account.
		interval:1, // yeah! I now added auto-scrolling
		step:1, // scroll 2 news each time
		onBefore:function(e, elem, $pane, $items, pos) {
			num = $items.length;
			if(pos==(num-3)) {
				$news.find('p').slice(0-count.length).clone().appendTo($news);
			}
		}
	});	
});
