Used ones are selling for $550-650 depending on condition. The grip is worth ~$100 or more depending on if extra batteries are included. The 40D is under $1000 now. You can do some pricematching on kits and by selling the kit lens and using rebates you can get one for a decent price.
It would also depend on what your use of the camera would be to say whether you should ditch the Xti or go for a 40D. The price is not the best for a used camera, and it has the same digic II sensor as the XTI. So unless you need the stronger body, thumb wheel, or increased fps, you may not have a need to upgrade.
I recently sold my 30D and got a 40D and immediately noticed the difference in the new Digic III sensor.