If the target is a thumbnail with no target, select the parent element