changed offset() to position() in getDims()

Using the plugin in an already absolute positioned element is not working properly with offset(). Tryed with position() and now it's fine.