Fixed Popover

Fixed popover and detects if the device is iphone or ipad
Merge pull request #1 from BGerard/master

Fixed popover