Ok. I have an iPhone 1G (running on 3.1.2 firmware) and it was jailbroken and unlocked and everything was going great

Until....one day i think it got a little hot and sweaty and the top half of my phone quit working(unresponsive to touch)

. So a friend of mine told me to restore it and to see what happens...
Well I restored it and it also updated to 3.1.3 firmware. Before I restored it though I took my T Mobile sim card out. But now that its finished its a black screen with the itunes logo, an arrow pointing to the logo, and the USB cord. But its also a blue box that reads "No SIM card installed. Insert a valid SIM with no PIN lock to activate iPhone." Its also has the slider but it says "slide for emergency"
How do I jailbreak and unlock it again??
