var SBTRioEsporte = { config: { sbt_u:'http://api.sbt.com.br', sbt_v:'1.5.0', sbt_k:'AE8C984EECBA4F7F835C585D5CB6AB4B', diretorio:'tv/rio/sbtesporterio', cod_site:'439', sbt_idS_Videos:'211', sbt_idS:'257', sbt_idSA_Home:'1334', sbt_idSA_Videos:'1068', sbt_idSA_Sobre:'1335', sbt_idSA_Apresentador:'1336', sbt_idP_Mediabox:'', sbt_idP_Topo:'4621', sbt_idP_Videos:'3947', sbt_idP_VideoRegional: '402', sbt_idP_ChannelRegional: '5621', }, getPgmHorario: function(container){ var config = this.config; SBTAPI.getProgram('showtimes',{ id:config.cod_site, limit:1, sort:"desc" },function(json){ if( json.programs ){ var horario = json.programs[0].showtimes; $(".pgmHorario").text(horario); } },{v: this.config.sbt_v,u: this.config.sbt_u,k: this.config.sbt_k}); }, getDestaqueTopo: function(container){ var config = this.config; SBTAPI.getMedia('title,author,image,description',{ idsite: this.config.sbt_idS, idSiteArea: this.config.sbt_idSA_Home, idPlaylist: this.config.sbt_idP_Topo, limit:100, orderBy:"ordem", sort:"desc" },function(json){ if( json.medias ){ var title, lnk, img; var cssmargin = ''; $.each(json.medias, function(i,item){ title = item.title; lnk = item.author; img = item.image; desc = item.description; $(".destaqueTopo").append('
'+ title +'

'+ title +'

'+ desc +'

'); }); if(json.medias.length == 1){ $('.destaqueTopo .slidesjs-pagination').hide(); $('.destaqueTopo h3').hide(); $('.destaqueTopo p').hide(); }else{ $(".destaqueTopo").slidesjs({height: 315, navigation:{ active:true, effect:"fade" }}); } } },{v: this.config.sbt_v,u: this.config.sbt_u,k: this.config.sbt_k}); }, getVideosHome: function(){ var config = this.config; SBTAPI.getVideo('id,thumbnailsite,thumbnail,title',{ program:this.config.sbt_idP_VideoRegional, category:this.config.sbt_idP_ChannelRegional, limit:20, orderBy:"publishDate", sort:"desc" },function(json){ if( json.videos ){ var idMedia, titleMedia, thumbMedia, linkVideo; $.each(json.videos, function(i,item){ idMedia = item.id; titleMedia = item.title; thumbMedia = (item.thumbnailsite == '')?item.thumbnail:item.thumbnailsite; linkVideo = SBTAPI.makeLinkPageHTML ('http://www.sbt.com.br/'+ config.diretorio +'/sbtvideos/categoria/0/', idMedia, titleMedia); $("
  • ").addClass("BOX W222 H127 POSREL OH").append('
    ').appendTo(".ContentVideos ul"); if(i == (json.videos.length-1)){ $('.playlistVideos .carousel-navigation').jcarousel(); $('.playlistVideos .prev-navigation') .on('jcarouselcontrol:active', function(){$(this).removeClass('inactive');}) .on('jcarouselcontrol:inactive', function(){$(this).addClass('inactive');}) .jcarouselControl({target: '-=5'}); $('.playlistVideos .next-navigation') .on('jcarouselcontrol:active', function(){$(this).removeClass('inactive');}) .on('jcarouselcontrol:inactive', function(){$(this).addClass('inactive');}) .jcarouselControl({target: '+=5'}); } }); } },{v: config.sbt_v,u: config.sbt_u,k: config.sbt_k}); }, getSobre: function(container){ var config = this.config; SBTAPI.getMedia('title,description',{ idsite: this.config.sbt_idS, idSiteArea: this.config.sbt_idSA_Sobre, limit:1, orderBy:"ordem", sort:"desc" },function(json){ if( json.medias ){ var title, lnk; $.each(json.medias, function(i,item){ title = item.title.toString(); desc = item.description.toString(); $(".DescriptionProgram").append('

    '+ title +'

    '+ desc +'
    '); return false; }); } },{v: this.config.sbt_v,u: this.config.sbt_u,k: this.config.sbt_k}); }, getApresentador: function(container){ var config = this.config; SBTAPI.getMedia('title,description,author,image',{ idsite: this.config.sbt_idS, idSiteArea: this.config.sbt_idSA_Apresentador, limit:1, orderBy:"ordem", sort:"desc" },function(json){ if( json.medias ){ var title, desc, thumb, nameap; $.each(json.medias, function(i,item){ desc = item.description.toString(); nameap = item.author.toString(); imagem = item.image; $(".DescriptionApresentador").append(''+ desc +''); return false; }); } },{v: this.config.sbt_v,u: this.config.sbt_u,k: this.config.sbt_k}); } }