edited infowindow function to have desired behavior of z-index