Copy code from JSFiddle

http://jsfiddle.net/danharper/gCrQ2/