// 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 $nav = $('#subnav li a');
	$nav.eq(0).addClass('selected');
	
	$('#container').serialScroll({			
		target:'#content',
		items:'div',
		axis:'xy',
		queue:true,
		duration:700,
		force:true, 
		navigation: $nav,
		
		onBefore:function(e, elem, $pane, $items, pos){
			$nav.removeClass('selected');
			$nav.eq(pos).addClass('selected');
			
			e.preventDefault();
			if( this.blur )
				this.blur();
		},
		onAfter:function( elem ){
			}

});
	
				});
