Changed some jQuery to Javascript.