Add handler to gellery item