Fixing issue #77

Fixing issue #77
container.offset() can be undefined. Calling top over that was generating an error.