added javascript for overlay