changed window on load to document ready so it can be used with turbolinks
Merge pull request #142 from NikoRoberts/turbolinks-compatible

Turbolinks compatibility