Made javascript as unobtrusive as possible

The onclicks in the captions could not be made unobtrusive using
javascript or jquery, possibly due to the way fancybox handles them.
Also removed focusLogin(), now uses jquery instead.