$(document).ready(function() {
	/**
	 * Most jQuery.localScroll's settings, actually belong to jQuery.ScrollTo, check it's demo for an example of each option.
	 * @see http://www.freewebs.com/flesler/jQuery.ScrollTo/
	 * You can use EVERY single setting of jQuery.ScrollTo, in the settings hash you send to jQuery.LocalScroll.
	 */

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

	/**
	 * restart the scroll position to ( 0, 0 ) (Firefox doesn't reset it)
	 * could use $(target).scrollTo( 0, {axis:'xy'));
	 * but this needs to be quick(synchronous), to reset before $.localScroll.hash() begins
	 */
	target.scrollLeft = target.scrollTop = 0;
	//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:'xy',//the default is 'y'
		queue:false,
		duration:2500
	});

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

	/**
	 * NOTE: In the former version of the demo, I called $('#navigation').localScroll()
	 * Now I want to also affect the >> and << links, so I'll use $.localScroll() instead
	 */
	$.localScroll({
		target: target, //could be a selector or a jQuery object too.
		axis:'xy',//the default is 'y'
		queue:true,
		duration:2500,
		hash:true,
		onBefore:function( e, anchor, $target ){//'this' is the clicked link
			$last.removeClass('on');
			$last = $(this).addClass('on');
			this.blur();//remove the awful outline
		},
		onAfter:function( anchor ){
			$last.removeClass('on');
		}
	});
});

var detect = navigator.userAgent.toLowerCase();
var os_ = navigator.platform.toLowerCase();
var browser,thestring;

if (checkIt('safari')) browser = "Safari"
else browser = "not Safari"

if ( os_ == 'macppc' || os_ == 'macintel' ) os = "Mac"
else os = "not Mac"

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

