adds right/left-top/bottom positioning to popover