hi this is the best forum where i hope that i will remove my problem.
i have i phone 3G. not Factory unlock
now i am not able run facebook,skype,whatsapp
and my iphone is working very slow also
i have ios 4.1 8B117 Jailbreak
now i want to install again 4.1 same version for running apps
so i download the same version from official web site below

iPhone1,2_4.1_8B117_Restore.ipsw

now i want to format or flash my i phone 3g so please
give me step how can i do that?
i want to jailbreak also my i phone 3g
if i format or flash i phone with new ios 4.1 so i have to do unlock ?
if yes so how?
please help me

Thank you
iphone beginner