Shared2 PR of @LLabagnara with some fixes.

Continue ton migrate files from Prototype to jQuery (poke @LLabagnara)