Reorder loading of ajax elements