Last week i washed my iPhone 4 in the washing machine. Real smart. I just moved to a new city and was desperate for a new phone (also trying to hold out for the new iphone), so a friend ordered me an iPhone 3gs, which just came in the mail. I didn't realize it was jailbroken (should have..dumb dumb dumb.) and it wasn't importing my contacts from itunes, so I decided to do a restore. BIG MISTAKE. I am now in the 1051 restore loop and about to loose my mind. I have tried all the obvious things, and talked to a former apple genius friend, but he isn't that savvy on the jailbreak stuff.
How can/is there any way I can fix this?
I am using IOS, there seem to be tons of tutorials for windows, but I haven't got access to any windows computers.

any help would be greatly appreciated.