Moved javascript for host sites to a seperate js file.