Created a directive for popups.