function NowNextLater(c,a,b){this.setNowNextLaterID(c);this.setContentURI(a);this.loadNowNextLater(b);return this}NowNextLater.prototype={loadNowNextLater:function(a){var b=this;$.ajax({url:this.getContentURI(),dataType:"jsonp",success:function(d,h,i){var f,c,g,e;if(d===null){$(b.getNowNextLaterSelector()).html('<div class="no-result">No Results Returned</div>')}else{f=b.buildTime(d.Now,"now",a);c=b.buildTime(d.Next,"next",a);g=b.buildTime(d.Later,"later",a);$(b.getNowNextLaterSelector()).html(f+c+g)}e=d.Now;if(e.IsVideo){$("#live-tv h1").append('<a href="{0}">{1}</a>'.format(e.Link,e.Title));$("#live-tv").append('<a href={0}><div id="big-blue" class="blue-play-btn"></div></a>'.format(d.Now.Link))}else{$("#live-tv h1").append("{0}".format(e.Title))}if(e.Description.length<=200){$("#live-tv .banner-description p").append(e.Description).attr("title",e.Description)}else{$("#live-tv .banner-description p").append(e.Description.substring(0,200)+"...").attr("title",e.Description)}$("#live-tv").append('<div class="on-air"><span class="on">ON</span><span class="air">AIR</span></div><div class="banner-text-drop"></div>');$("#live-tv").addClass("on-air-text")},error:function(e,c,d){$(b.getNowNextLaterSelector()).html('<div class="no-result">There was an error in retrieving content.</div>')}})},buildTime:function(c,j,b){var e,m,i,g,h,l,a;var d=new Date();b=parseInt(b,10);var f=d.getTimezoneOffset();f=f/60;f=f+b;f=f*3600000;var k=c.Timestamp*1000;k=k+f;e=new Date(k).format("hh:nn ap");m=105;if(c.IsVideo){g='<a href ="{0}"><div class="play-btn"></div><img src="{1}" alt="{2}" /></a>'.format(c.Link,c.Image,j);l='<a href ="{0}"><h3>{1}</h3><a/>'.format(c.Link,c.Title)}else{g='<img src="{0}" alt="{1}" />'.format(c.Image,j);l="<h3>{0}</h3>".format(c.Title)}h=j==="now"?'<a href="/watch/livetv"><div class="on-air"><span class="on">ON</span><span class="air">AIR</span></div></a>':"";liveTvLink=j==="now"?'<a href="/watch/livetv"><div class="live-tv"></div></a>':"";i='<div class="{0} hoverable">                     {7}                     <div class="when">{0}</div>                     {1}                     <div class="time-watch">                         <div class="time">{2}</div>                         {3}                     </div>                     <div id="event-title">{4}</div>                     <p title="{5}">{6}</p>                </div>'.format(j,g,e,h,l,c.Description,c.Description.strsub(0,m),liveTvLink);return i},setNowNextLaterID:function(a){this.nowNextLaterID=a},setContentURI:function(a){this.contentURI=a},getNowNextLaterID:function(){return this.nowNextLaterID},getNowNextLaterSelector:function(){return"#"+this.nowNextLaterID},getContentURI:function(){return this.contentURI}};
