add javascript and popups