Implement all old javascript into fay (js in Haskell)

The only thing left is to implement the show and hide in fay instead
of jquery