"; if (val.show.includes('Chris Evans')) { if (val.show.includes('Ministry')) { val.show = "Chris Evans' Ministry of Now"; showimg = "The Chris Evans Breakfast Show"; } else { val.show = "The Chris Evans Breakfast Show"; showimg = val.show; } } var showGrahamNortonSponsorship = val.show == "The Graham Norton Show with Waitrose"; if (showGrahamNortonSponsorship) { val.show = "The Graham Norton Show"; showimg = "The Graham Norton Show"; sponsoredImage = " with "; } var d3 = new Date(); var nowtime = d3.getTime() / 1000; $.each(json, function(key, val) { var starttime = val['start-time']; var duration = val.duration; var d = new Date(starttime * 1000); var h = addZero(d.getHours()); var m = addZero(d.getMinutes()); var d2 = new Date((starttime + duration) * 1000);