var SmoothScroll=Fx.SmoothScroll=new Class({Extends:Fx.Scroll,options:{axes:["x","y"]},initialize:function(c,d){d=d||document;this.doc=d.getDocument();this.parent(this.doc,c);var e=d.getWindow(),a=e.location.href.match(/^[^#]*/)[0]+"#",b=$$(this.options.links||this.doc.links);b.each(function(g){if(g.href.indexOf(a)!=0){return}var f=g.href.substr(a.length);if(f){this.useLink(g,f)}},this);this.addEvent("complete",function(){e.location.hash=this.anchor;this.element.scrollTo(this.to[0],this.to[1])},true)},useLink:function(b,a){b.addEvent("click",function(d){var c=document.id(a)||this.doc.getElement("a[name="+a+"]");if(!c){return}d.preventDefault();this.toElement(c,this.options.axes).chain(function(){this.fireEvent("scrolledTo",[b,c])}.bind(this));this.anchor=a}.bind(this));return this}});