Routing in javascript using hashchange event.