Added configurable offsetTop and different event handling

removed outter event handler to avoid binding "click" several times. Added option for offsetTop in case your styles has a different offsetTop for tabs.