I have 2 simple rules:
1) If the job is really terrible -- crazy boss, lousy environment, not enough funding -- it should be obvious within 30 days or so. At most companies this is a probationary period anyway. I've quit a couple of jobs quickly for these reasons, and I've found that HR (if not the boss) is generally okay with this. Act professionally, of course, give notice and all that, but It's better to cut ties early if you feel that you and the employer are not a good match.
2) Assuming I get past 30 days and still like it, I've always tried to make it to 2 years before trading up. I've found that after year 1, I'll get a bonus or a bump in salary almost automatically. Year 2 is when the employer starts to look for something more out of me, and also when I'll get a better idea of possible career paths within the company.
My experience is that job hopping is not a big deal as long as you have good reasons, and as long as it's not TOO often. Good reasons include relocation, a substantial (I'd say 25%+) bump in pay, or changing jobs to do what you really want to do. No one will care that you only worked 3 months at The Gap before finding a Web developer job.