"Re"-download 10.8 After Purchase of a New Mac
You can download Apple's official OSX Recovery Disk assistant to create a flash drive with the capability to re-install OSX on an eligible Apple computer. A flash drive (it must be larger then 1GB) also enables you to easily re-install OSX on products such as the MacBook Air which don't have optical drives. 

There is also a support document about the Recovery Disk Assistant.