Update tileit.js

Removed dependency on Window object. Only remaining dependency is jQuery