		$(document).ready(function(){$('#first-active').addClass('active');});

		jQuery(function( $ ){

				var target = $('#screen').get(0);//the scrolled div

				target.scrollTop = 0;

                                w = $('#page-1').css('width');
                                w = w.substring(0,w.length-2);
                                target.scrollLeft = w * 2;

				//scroll initially if there's a hash (#something) in the url 
				$.localScroll.hash({
					target: target, //could be a selector or a jQuery object too.
					axis:'x',//the default is 'y'
					duration:2000
				});

				var $last = $([]);//save the last link

				$.localScroll({
					target: target, //could be a selector or a jQuery object too.
					axis:'xy',//the default is 'y'
					queue:true,
					duration:1000,
					hash:false,
					onBefore:function( e, anchor, $target ){//'this' is the clicked link
						$('#first-active').removeClass('active');
						$last.removeClass('active');
						$last = $(this).addClass('active');
						this.blur();//remove the awful outline
					},
					onAfter:function( anchor ){
						// $last.removeClass('scrolling');
					}
				});
			});