Prevent window load/resize conflicts; add event cross-browser friendly

Currently, your script appears to overwrite any previously defined window.load and window.resize callbacks. You should be registering event callbacks using addEventListener and attachEvent (IE<9). If you don't care about IE8 then you can simplify the code.

I don't have any tests, other than trying it out manually on Google Chrome (31) and IE9. I didn't see any current tests, so I wasn't sure what to do in that regard.