Fixed JS bug - keep thick box open after selecting a gallery image

Signed-off-by: Elliot Condon <e@elliotcondon.com>