added some javascrpt for avatars