updated hashchange compatible with later jquery versions