Added modal functionality to gallery items.