Make sure you get the right kind of lease.
Been a while since I've read up on them, but there are 2 ways for buying the car at the end.
The first one is where they estimate what the car will be worth when the lease is up... if the car is worth less than they estimated, you lose; if it's worth more, you win
The other is, I think, like what you posted off the mazda site... they go by what you owe and give you the option to buy.
And there is closed end (where you have to buy the car at the end), and open end (where you decide if you want it or not)... I would go with open-end in case you totally hate the car.