I've got a friends 3GS that I've refurb'd for him. All the new parts are installed so I just need to restore it to 5.0.1 then Jalbreak it. I plan in to restore, unplug, JB, then hand it back so he can restore it from his backup and activate.

My questions are, when he restores it from hid backup (made on 5.0.1) will it wipe out the JB? I've a feeling it won't, that iTunes doesn't perform a restore of the firmware, only the user files, but I'm not 100% on it.

And, will I be able to JB it before it's activated?