Event.observe(window, 'load', function() {

  $$('a[href^=#]:not([href=#])').each(function(element) {

    element.observe('click', function(event) {

      new Effect.ScrollTo(this.hash.substr(1),{

					duration:0.3,

					delay:0

			});

      Event.stop(event);

    }.bindAsEventListener(element))

  })

})
