Tiled Gallery: Using jQuery foreach instead of standard foreach for browser backwards compatibility.