Moving gravatar related code to gravatar.js