Created function for formatting infowindow content