There are differents ways to do that, this is my solution: http://jsfiddle.net/zzLnt/.

Test