Since an apostrophe is a meaning character in Javascript they must be replaced with the html entity equivalent of '

At line 198 of CoolMenu.php change the lines:

// remove blanks
$categories[$i]['text'] = substr($categories[$i]['text'], 12*$blank_length);

to:
// substitute apostrophes with the ' entity
$category_text = str_replace("'", "'", $categories[$i]['text']);
// remove blanks
$categories[$i]['text'] = substr($category_text, 12*$blank_length);


More...