// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

jQuery(function( $ ){
	
	var $news = $('#news-ticker');//we'll re use it a lot, so better save it to a var.
	$news.serialScroll({
		items:'div',
		duration:2000,
		force:true,
		axis:'y',
		easing:'linear',
		interval:4, // yeah! I now added auto-scrolling
		step:1, // scroll 2 news each time
		onBefore:function pausecomp() {var date = new Date();var curDate = null;
					do { curDate = new Date(); } while(curDate-date < 1000);} 
	});	
	
	$('#news-ticker').hover(
	function(){
	$(this).trigger('stop');
	},
	function(){
	$(this).trigger('start');
	});	
	
});