// Easing equation
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

jQuery(function( $ ){
				
	$('.prev').after('<p class="instruction">Click to scroll</p>');			
				
	$('#hscroll').serialScroll({
		target:'#sections',
		items:'.h-scroller', 
		prev:'p.prev', 
		next:'p.next', 
		axis:'x', 
		duration:700, 
		force:false,		
		cycle:false,
		onBefore:function( e, elem, $pane, $items, pos ){
			e.preventDefault();
			if( this.blur )
				this.blur();
		},
		onAfter:function( elem ){
			//'this' is the element being scrolled ($pane) not jqueryfied
		}
	});
	

});