Modified showHidePopover to toggle the popover if already visible.  Added click event listeners, in addition to touchend.
Added some rapid-click protection that could cause the popover to get stuck without the ability to close