http://jsfiddle.net/tavriaforever/w8x8w/