updating javascript to match markup/DOM in ding2/DDB CMS