Early pricing deadline is Dec 12! Enter now.

'); jQuery("#year_label").text(jQuery("#event option:selected").text()); //console.log(args); jQuery.ajax({ type:"POST", url:api_endpoint, data: JSON.stringify({data: args}), contentType: "application/json; charset=utf-8", dataType: "json", success:function(winners){ var title; var pageTitle = "The "; //console.log(winners); var string = '
'; var shown = 0; var lastcat = ''; var catopen = 0; var cell = 0; var gold = ''; var p_gold = ''; var silver = ''; var bronze = ''; // Awards: "23":"People's Telly Gold","15":"People's Telly Silver","1":"Gold","13":"Undefined","5":"Bronze","16":"Classic Telly","2":"Silver","14":"People's Telly Bronze" var ani_image = ''; if(!winners.Count) { string += '

No Matches

No winners matched your selection criteria.

'; jQuery("#winnerslist").html(string); jQuery("#winnerslist").addClass("winnerslist"); return false; } if (searchText.length) { var byCategory = Object.sortByKeys(groupby(winners.Data,'Award')); } else { var byCategory = Object.sortByKeys(groupby(winners.Data,'Category')); }; var titleShown = false; jQuery.each(byCategory, function (a, d) { var items = 0; jQuery.each(d,function(key,value){ if ((value.Year < 2018 && aContainsB(value.Award,"ilver")) || (value.Year >= 2018 && aContainsB(value.Award,"old"))) { if (!searchText.length && lastcat != value.Category) { ////console.log("Last cat: " + lastcat + " Now: " + value.Category); if (cell > 0) { string += ""; cell = 0; } lastcat = value.Category; titleShown = true; string += "

" + value.Category.replace(value.CategoryType+"-"+value.CategoryType, value.CategoryType) + "

"; //string += "
" + value.Category.replace(value.CategoryType+"-"+value.CategoryType, value.CategoryType) + "
"; string += '
'; } else if (searchText.length && items == 0) { lastCat = a; //console.log(lastCat + " != " + a); string += '

' + value.Award + ' Winners matching "' + searchText.replace(/[^\w. ]/gi, function (c) { return '' + c.charCodeAt(0) + ';'; }) + '"

'; string += '
'; }; /* if (value.Year == '2015') { value.EntryIdentifier = value.EntryIdentifier.replace(/[^d-_]/g, ''); } else if (value.Year == '2016') { value.EntryIdentifier = value.EntryIdentifier.replace(/[^d-_]/g, '') + '_1'; }*/ if (value.EntryIdentifier == null) { value.EntryIdentifier = '00000'; } if (value.Year >= 2015) { //background = 'background-image: url(//d1cfkfefppvyen.cloudfront.net/' + value.Year + '/thumbnails/' + value.EntryIdentifier + '.jpg)'; background = '//d1cfkfefppvyen.cloudfront.net/' + value.Year + '/thumbnails/' + value.EntryIdentifier + '.jpg'; ani_image = '//dawdbxkmjyj5z.cloudfront.net/' + value.Year + '/thumbnails/' + value.EntryIdentifier + '.gif'; } else if (value.Year == 2018) { //background = 'background-image: url(//d1cfkfefppvyen.cloudfront.net/' + value.Year + '/thumbnails/' + value.EntryIdentifier + '.jpg)'; background = '//d1cfkfefppvyen.cloudfront.net/' + value.Year + '/thumbnails/' + value.EntryIdentifier + '.jpg'; ani_image = '//s3.amazonaws.com/gallery.tellyawards.com/2018/images/' + value.EntryIdentifier + '.gif'; } else { background = 'background-color:#000; background-image: none !important; display:none !important;'; ani_image = ''; }; ////console.log(ani_image); ////console.log(background); //string += ''; string += ''; items++; cell++; if (shown < limit) { shown++; title= '' //value.Year; pageTitle = Number.getOrdinalFor((value.Year - 1979), true); if (c != null && c!= '') { if (c == 55) { title += ' ' + value.Award + ' Winners'; } else { title += ' ' + value.MediaType + ' Winners'; }; } }; count++; } else { if(titleShown == false) { titleShown = value.Category.replace(value.CategoryType+"-"+value.CategoryType, value.CategoryType); } if (value.Year >= "2018" && aContainsB(value.Award,"ilver")) { silver += '' + value.Organization; if (value.hasOwnProperty('Client')) { if (value.Client != null && value.Client != value.Organization) { silver += " / " + value.Client; }; } silver += '' + value.Title + '' + value.Category.replace(value.CategoryType+"-"+value.CategoryType, value.CategoryType) + ''; count++; shown++; } else { bronze += '' + value.Organization; if (value.hasOwnProperty('Client')) { if (value.Client != null && value.Client != value.Organization) { bronze += " / " + value.Client; }; } bronze += '' + value.Title + '' + value.Category.replace(value.CategoryType+"-"+value.CategoryType, value.CategoryType) + ''; count++; shown++; }; } }); if (cell > 0) { //console.log("Closing!!!"); string += "
"; cell = 0; }; if(titleShown != true && (silver.length || bronze.length)) { string += "

" + titleShown + "

"; titleShown = true; } //console.log("Determining format: " + items); switch(items) { case 1: case 2: case 4: string = string.replace(/@itemclass@/g, "large-item").replace("@colsclass@", "two-cols"); break; case 3: case 5: case 6: case 9: string = string.replace(/@itemclass@/g, "medium-item").replace("@colsclass@", "three-cols"); break; case 0: default: string = string.replace(/@itemclass@/g, "small-item").replace("@colsclass@", "four-cols"); break; } }); if (shown > 0) { pageTitle += " Annual Telly Awards"; jQuery("#winnertitle").html(pageTitle); jQuery("#winnersubtitle").html(title); if (p == 1) { if (count > shown) { string += '
  
'; }; } else { if (count > shown) { string += '
  
'; } else { string += '
  
'; }; }; } else { jQuery("#winnerlisttitle").html("No matches found."); jQuery("#winnerslist").html("No winners were found that matched the request."); } string += '
'; if (silver != ''){ string += '

Silver Winners

' + silver + '
winner / clienttitle
'; } if (bronze != ''){ string += '

Bronze Winners

' + bronze + '
winner / clienttitle
'; } if (shown) { jQuery("#winnerslist").html(string); jQuery("#winnerslist").addClass("winnerslist"); } else { jQuery("#winnerslist").html("No winners were found that matched the request."); }; }, failure:function(errMsg) {alert(errMsg); } }); };

Season 47 Entries Are Open