You have to downgrade to 3.1.3, using this helpful post: http://forum.gsmhosting.com/vbb/f456/easiest-way-downgrade-os-4-3-1-3-3g-n-3gs-1041817/ and after that you can Jailbreak using Spirit and unlock with ultrasn0w. No Jailbreak for 4.0 only if you have 3.1.2 SHSH blob saved on Saurik`s server, then you can upgrade to 4.0 and have it Jailbroken.