Add javascript for popup and modal components