http://jsfiddle.net/s3hWj/4/