oops, after struggling for 2 days, found the issue:
I was loading jQuery from Gooogle CDN and also serving the local version as a fallback (guess it is a dummy idea, since G! CDN is extremely reliable). Now my second jQuery is blocking to load the inline js code output by avatar. I disabled one of the jQueries and voila, everything worked.