moving all in-page javascript into same block.