Convert CSS to Javascript