order of object keys is not predictable accross browsers in Javascript. They appear in reverse order with Safari. See http://stackoverflow.com/questions/280713/elements-order-in-a-for-in-loop