jQuery dialog tidy up code in webtrees1.5.1.js