From http://stackoverflow.com/questions/196972/convert-string-to-title-case-with-javascript