Rough migration of pictureserve.js from jQuery to JS - Part II

Signed-off-by: Ralf Koller <r.koller@gmail.com>