/**
 * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * Date: 2/8/2008
 * @author Ariel Flesler
 * @version 1.2.2
 **/
;(function($){var a=location.href.replace(/#.*/,''),b=$.localScroll=function(a){$('body').localScroll(a)};b.defaults={duration:1e3,axis:'y',event:'click',stop:1};b.hash=function(a){a=$.extend({},b.defaults,a);a.hash=0;if(location.hash)setTimeout(function(){scroll(0,location,a)},0)};$.fn.localScroll=function(c){c=$.extend({},b.defaults,c);return(c.persistent||c.lazy)?this.bind(c.event,function(e){var a=$([e.target,e.target.parentNode]).filter(filter)[0];a&&scroll(e,a,c)}):this.find('a').filter(filter).bind(c.event,function(e){scroll(e,this,c)}).end().end();function filter(){return!!this.hash&&this.href.replace(this.hash,'')==a&&(!c.filter||$(this).is(c.filter))}};function scroll(e,b,c){var d=b.hash.slice(1),a=document.getElementById(d)||document.getElementsByName(d)[0];if(a){e&&e.preventDefault();var f=$(c.target||$.scrollTo.window());if(c.lock&&f.is(':animated'))return;if(c.onBefore)c.onBefore.call(b,e,a,f);if(c.stop)f.queue('fx',[]).stop();f.scrollTo(a,c);if(c.hash)f.queue(function(){location=b.hash})}}})(jQuery);
jQuery(function( $ ){
				$.easing.elasout = function(x, t, b, c, d) {
					var s=1.70158;var p=0;var a=c;
					if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
					if (a < Math.abs(c)) { a=c; var s=p/4; }
					else var s = p/(2*Math.PI) * Math.asin (c/a);
					return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
				};
			
			//scroll initially if there's a hash (#something) in the url 
			$.localScroll({				
				axis:'y',//the default is 'y'
				queue:true,
				duration:1500, easing:'elasout' 
			});
			
			var $last = $([]);//save the last link	
		});