http://jsfiddle.net/fC3cW/