/**
 * 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: 11/12/2007
 * @author Ariel Flesler
 * @version 1.1.2
 **/
(function($){$.localScroll=function(a){$('body').localScroll(a)};$.localScroll.defaults={target:'html,body',filter:null,speed:1000,axis:'y',event:'click',persistent:false,cancel:true};$.fn.localScroll=function(c){c=$.extend({},$.localScroll.defaults,c);return(c.persistent)?this.bind(c.event,function(e){var a=$([e.target,e.target.parentNode]).filter(filter)[0];return a&&scroll.call(a,e)}):this.find('a').filter(filter).bind(c.event,scroll).end().end();function scroll(e){var a=this.hash.slice(1),j=document.getElementById(a)||$('[name='+a+']')[0];if(j){var b=$(c.target);if(c.onBefore)c.onBefore.call(this,e,j,b);b.scrollTo(j,c);return!c.cancel}};function filter(){return local(this)&&(!c.filter||$(this).is(c.filter))}};function local(a){return!!a.hash&&location.href.replace(/#.*/,'')==a.href.replace(a.hash,'')}})(jQuery);