Resize and offset when orientation changes.

Sometimes the resize event does not get triggered, such as in phonegap apps.
Merge pull request #12 from ben-ng/orientate

Resize and offset when orientation changes.