putting the javascript in pictures.coffee