guardian/frontend — pull request #647 by stephanfowler (2013-04-10 18:20:33+00:00)
Title: Pass DOM context and re-use modules (part 1)

These modules are boostrapped once then reused by each `page:ready` event, given a DOM context to apply themselves to:

* upgradeImages
* showTabs
* showRelativeDates

They're also given listeners that'll run them on `fragment:ready:*` events, for instance so that Tabs can be applied to Popular once it's been loaded.

Not sure if this is the best pattern but let's see. I'll tackle the other modules in another pull request.

Also added a generic LazyLoad module. Currently it's only used for Popular, but will use elsewhere if appropriate.