/**
 * jQuery.LocalScroll - Same page links auto scrolling.
 * Copyright (c) 2007 Ariel Flesler - aflesler(at)gmail(dot)com
 * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php).
 * Date: 10/29/2007
 * @author Ariel Flesler
 * @version 1.0.1
 **/
(function($){$.localScroll=function(a){$('body').localScroll(a)};
															 $.fn.localScroll=function(b){b=$.extend({target:'html,body',filter:'*'},b||{});
															 b.target=$(b.target);
															 return this.find('a[href*=#]:not([href=#])').filter(b.filter).click(function(e){if(samePage(this)){var a=this.hash.slice(1),element=document.getElementById(a)||$('[name='+a+']')[0];
																																																											   if(element){if(b.onBefore)b.onBefore.call(this,e,element,b.target);
																																																											   b.target.scrollTo(element,b);
																																																											   return false}}}).end().end()};
															 function samePage(a){return location.href.replace(location.hash,'')==a.href.replace(a.hash,'')}})(jQuery);