redid javascript for home page