move js out
think about script loading
also support async loading in webkit
this is the most simple and sensible way