Iphone lock button broken, is there any alternative to lock iphone?

My iphone 3G lock button is totally damaged and is out of warranty and I can't afford to get it repaired. I was wondering is there any app which can convert "silent" button to lock button. Or may be an app on which i can manually lock the device.
By the way my Iphone is jailbroken, and "accessibility" is not accessible.

Go to settings->general->
accessibility->assistive touch->turn ON

Go back to home.
A little white circle in a square should appear.

Click on the circle, then device, and then lock screen.