Update class.php

Added gravatar function