‘;
jQuery.each(data.results.schedules, function(){
dateString = this.date.split(“-“);
if (this.time != null && this.time.length > 0) {
timeString = this.time.split(” “);
var d=new Date(dateString[2], dateString[0]-1, dateString[1], timeString[0].split(“:”)[0], timeString[0].split(“:”)[1], 0, 0);
} else {
var d=new Date(dateString[2], dateString[0]-1, dateString[1]);
}
date = new Date(dateString[2], dateString[0], dateString[1]);
html += ‘
‘;
var showTitle = this.title;
if (!String.prototype.trim) {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$ /g,”);
}
}
var titleCount = showTitle.length;
var shortTitle = jQuery.trim(showTitle).substring(0, 25).trim(this);
if (titleCount > 25) { shortTitle +=”…”; }
if (previous != null && previous == this.link) {
html += “”;
} else if (this.programType == “MV”) {
html += ” + shortTitle + ”;
} else if (this.episodeTitle != null) {
html += ” + shortTitle + ”;
} else if (this.showcardLink != null) {
html += ” + shortTitle + ”;
} else {
html += ‘‘ + shortTitle + ‘‘;
}
html += ‘
‘;
month = date.getMonth() + 1;
if (this.time != null && this.time.length > 0) {
html += days[d.getDay()] + ” ” + (d.getMonth() + 1) + “/” + d.getDate() + ” ” + timeString[0] + ” ” + timeString[1] + ” ” + data.results.schedules[0].timezone;
} else {
html += days[d.getDay()] + ” ” + (d.getMonth() + 1) + “/” + d.getDate();
}
html += ‘ ‘;
if (this.callsign != null) {
html += ‘(‘ + this.callsign + ‘)’;
}
else {
html += “Check Local Listings”;
}
html += ‘
‘;
previous = this.link;
current++;
if (current == total) {
return false;
}
});
html += ‘