Changed the getPostition method

Changed the way the plugin obtains the position so that it is possible
to have nested popovers with right positioning