Insert the code below at the very top of every gallery:
\n\n"; echo "'."'>\n"; ?>