Another thing you want to determine when buying a bike is if you need a full suspension or a hardtail bike. A full suspension bike has suspension on both ends (sort of like shocks) and a hardtail has none on the back. I always recommend a full suspension mountain bike if you can afford it. Hardtails, without rear suspension, are lighter weight and pedal more efficiently but full suspension designs offer more comfort and better control. You will want to decide based on your price range, riding style and terrain.
Full-suspension mountain bikes are much more comfortable, enjoyable, and better controlled when compared to their hardtail counterparts. The tradeoffs of a little extra weight and slightly less efficiency are well worth added benefits.
Some people will disagree with me on this subject. Hardtails do pedal more efficiently especially when the terrain is smooth. Hardtail mountain bikes are also a bit lighter than full suspension designs and require less maintenance.
A good number of cross-country racers still use hardtails for the above reasons, but most endurance and other types of racers have switched over to full suspension. I should also note that hardtails are also especially popular among the dirt jumping crowd where they pump better from jump to jump.
Unfortunately, full suspension mountain bikes are a bit more expensive than hardtails. If you can't afford a full suspension with decent and reliable components, I would recommend buying a good reliable hardtail from a specialty bike shop before going to a mass merchant such as Costco or Wal-Mart for a bike that may fall apart after you ride it for a few days.