It's pricey, yes, but worth it. They're damn good lenses, and mine is by far my most used lens. A wide is never going to be cheap, as the elements are large - it's a fairly big lens, compared to the lens that would've come with your D40.
As others have said, the HSM means that it will focus fine, and also very quickly. Compatibility is good, right up to the D300. So should you go on to buy a D80 in the future, or D200 as I'm planning to, then the lens will go straight on.
The only alternative really is a full-frame manual-focus fisheye from eBay, like the Peleng. The build quality won't be good, and it'll be fixed focal length.
Personally, I'd save and buy the Sigma 10-20. You could also look at offerings from Tokina and Tamron.