Fix jQuery selector to find ul.gallery in root

Now that we don't wrap generated content nodes
UL.gallery is likely to be the root, so use an
appropriate jQuery selector.

Change-Id: Ic9d9f4c0fc12daae6cf8252e4d6562366b3d2df2