makes openInfoWindow function