Moved js to thin template, so alerts work here.