and do you have any other custom plugins that may be interfering with MM? To me, that looks suspiciously like a jQuery/Mootools conflict which would indicate that jQuery is not running in noConflict mode.
$output .= '$j("div#sectionTVsHeader").empty().prepend("'.jsSafe($newname).'");';
$output .= '$j("div.tmplvars").prev("div").empty().prepend("'.jsSafe($newname).'");';