Transfer script from the body section to head section