if you go on ebay and look up iphone unlock service you can get it unlocked for $20, and it's perma unlocked and no need for jailbreak.
Just look at the seller feedback when you're looking. You gotta have the activated sim card for the service you want to go to to do it. You're also going to have to cut your tmobile sim card to make it fit (just incase you didn't know).

I'll post the vid I watched before I did it to my old iphones when i get home.