update jquery and generalize flickr retry code