move showcase js to its own file; fix cross-document bug on firefox