Thanks Jason that's the strong bit fixed although it now change to a different one see below, as you can probably see I have changed name to id which was another error:
Line 211, Column 132: Bad value Large Patio Canopy: for attribute id on element a: An ID must not contain whitespace.
…m/gallery/images/1/001_782p.jpg" rel="lightbox-pg419" id="Large Patio Canopy:">
Syntax of id:
An ID consists of at least one character but must not contain any whitespace.
Just a quick note if I take this out of the index file:
id="' . str_replace('"', '\"', $gallery['images'][$i]['title']) . (strlen($gallery['images'][$i]['title']) > 0 ? ':':'') . '' . str_replace('"', '\"', $gallery['images'][$i]['description']) .'"
It validates OK also is there a way to make the image title the alt tag as well