move script from head section to each page body section