Tiled Gallery: Don't wait for all images to load.

No need to wait for all images to load since we know their dimensions to begin with.
Tiled Gallery: JS object represents one gallery.

Refactored the Tiled Gallery prototype to represent a single tiled gallery as the name implies, and added a separate prototype to represent a collection of tiled galleries. This way it's clear which operations are done for individual galleries and which are done for all.
Tiled Gallery: Less responsibility for resize.

Extracted original-width and original-height attribute setting out of the resize function, and moved the call from resize to the constructor, since there is no need to see if the attributes are set in every resize call.
Tiled Gallery: Refactoring maybeSetSizeAttributes.

Made small changes to refactor the logic in maybeSetAttributes, since it was unnecessarily verbose.
Tiled Gallery: Image dimensions to style attribute

Moved image height and width attributes to a style attribute so that jQuery width and height accessors can access them before the image is loaded.
Tiled Gallery: Browser backwards compatibility.

Using jQuery foreach instead of standard foreach for browser backwards compatibility.