first working version

check this version on
http://fiddle.jshell.net/AbdiasSoftware/wYBEU/show/