Move javascript out of AJAXed parts.