added closure to jquery infowindow