reducing jquery down to javascript