$(document).ready(function(){
	
	
	
	$('#ascreen').serialScroll({
		target:'#asections',
		items:'li', 
		prev:'a.prev',
		next:'a.next',
		duration:500,
		force:true,
		cycle:false,
		lazy:true,
		onBefore:function( e, elem, $pane, $items, pos ){
			/**
			 * 'this' is the triggered element 
			 * e is the event object
			 * elem is the element we'll be scrolling to
			 * $pane is the element being scrolled
			 * $items is the items collection at this moment
			 * pos is the position of elem in the collection
			 * if it returns false, the event will be ignored
			 */
			 //those arguments with a $ are jqueryfied, elem isn't.
			e.preventDefault();
			if( this.blur )
				this.blur();
		},
		onAfter:function( elem ){
			//'this' is the element being scrolled ($pane) not jqueryfied
		}
	});
	
	$('a.stop').toggle(function(){
		$('#asections').trigger('stop');
		$(this).html("Start");
	},function(){
		$('#asections').trigger('start');
		$(this).html("Stop");

	});
	
		$('#asections a').lightBox({fixedNavigation:true});

	
});
