// 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( $ ){

	$('#illCarousel').serialScroll({
		items:'li',
		prev:'#illustrations a.prev',
		next:'#illustrations a.next',
		duration:1200,
		force:false,
		axis:'y',
		easing:'linear',
		lazy:true,// NOTE: it's set to true, meaning you can add/remove/reorder items and the changes are taken into account.
		step:1 // scroll 2 news each tim

		/*
		navigation:null,//if specified, it's a selector a collection of items to navigate the container
		target:null,    //if specified, it's a selector to the element to be scrolled.
		items:null,     //selector to the items (relative to the matched elements)

		interval:0, //it's the number of milliseconds to automatically go to the next
		lazy:false,//go find the elements each time (allows AJAX or JS content, or reordering)
		stop:false, //stop any previous animations to avoid queueing
		force:false,//force the scroll to the first element on start ?
		jump: false,//if true, when the event is triggered on an element, the pane scrolls to it
		prev:null, //selector to the 'prev' button
		next:null, //selector to the 'next' button
		onBefore: function(){}, //function called before scrolling, if it returns false, the event is ignored
		exclude:0 //exclude the last x elements, so we cannot scroll past the end
		*/
	});
	
	$('#webCarousel').serialScroll({
		items:'li',
		prev:'#webDesign a.prev',
		next:'#webDesign a.next',
		duration:1200,
		force:true,
		axis:'y',
		easing:'linear',
		lazy:true,// NOTE: it's set to true, meaning you can add/remove/reorder items and the changes are taken into account.
		step:1 // scroll 2 news each tim
	});
	
	$('#printCarousel').serialScroll({
		items:'li',
		prev:'#printDesign a.prev',
		next:'#printDesign a.next',
		duration:1200,
		force:true,
		axis:'y',
		easing:'linear',
		lazy:true,// NOTE: it's set to true, meaning you can add/remove/reorder items and the changes are taken into account.
		step:1 // scroll 2 news each tim
	});
	
	/**
	 * The call below, is just to show that you are not restricted to prev/next buttons
	 * In this case, the plugin will react to a custom event on the container
	 * You can trigger the event from the outside.
	 */

});