Delayed resize, complete event

I've added code to trigger an event on complete. This provides a solution for many of your pull requests, as people can add their own code to transfer id, class, data attributes, lazy loading of large images, or do whatever. 

Since it was built into the script, I've also added a 100ms timer delay to the resize event so it isn't called 50 times in a row for browsers like Chrome. 

There are not as many changes as there appears to be. I reset the tab indentation for several lines.