You can play with the source for this over at JSBin or jsFiddle. ​