move new comment open/close js functions to core so they can be used by other themes