﻿

/* Alterar a notícia que aparece em destaque na homepage (ao clicar nas thumbs)*/

//function alterarNoticiaHoje(channel,contentid)
//{
//  $("#fotohojeH").css("visibility","hidden");
//  $("#fotohojeV").css("visibility","hidden");
//  $.ajax({url:"/ajax/homepage.aspx", 
//    type:"POST",
//    dataType:"json",
//    async: false,
//    data:{request: "verNoticiaHoje",  canal: channel, conteudo: contentid},
//    success:function(result){	
//        suffix = "";
//        if (result.orientacao == "")
//        {
//            $("#tbMenuHojeVertical").hide();
//            $("#tbMenuHojeHorizontal").show();
//            suffix = "H";
//        }
//        else
//        {
//            if (result.orientacao == "vertical")
//            {
//                suffix = "V";
//                $("#tbMenuHojeVertical").show();
//                $("#tbMenuHojeHorizontal").hide();            
//            }
//            else if (result.orientacao == "horizontal")
//            {
//                suffix = "H";
//                $("#tbMenuHojeVertical").hide();
//                $("#tbMenuHojeHorizontal").show();            
//            }        
//            
//        }

//        if (result.imagem != "")
//        {
//          $("#fotohoje"+suffix)[0].src = result.imagem;            
//          $("#fotohoje"+suffix).css("visibility","");
//          $("#fotohoje"+suffix).css("display","");
//          $("#fotohojelink"+suffix)[0].href = "artigo.aspx?channelid="+channel+"&contentid="+contentid;            
//        }
//        else
//        {
//          $("#fotohojeH").css("display","none");
//          $("#fotohojeV").css("display","none");
//        }
//        
//        /* $("#sabermaishoje"+suffix).href = "artigo.aspx?channelid="+channel+"&contentid="+contentid; */
//        
//        document.getElementById("sabermaishoje"+suffix).href = "artigo.aspx?channelid="+channel+"&contentid="+contentid;
//        $("#antetitulohoje"+suffix)[0].innerHTML = result.antetitulo;
//        $("#titulohoje"+suffix)[0].innerHTML = result.titulo;
//        $("#leadhoje"+suffix)[0].innerHTML = result.lead;
//          
//    },
//    error:function(req,error,ex){			    			    
//    }
//  });  
//    
//}

//function ViewDestaqueCanal(channelid,contentid,img,titulo,lead,TotalComentarios)
//{
//  $("#destaqueCentralLinkCanal")[0].href = "artigo.aspx?channelid="+channelid+"&contentid="+contentid;
//  $("#destaqueCentralTituloCanal")[0].href = "artigo.aspx?channelid="+channelid+"&contentid="+contentid;
//  $("#destaqueCentralTituloCanal")[0].innerHTML = titulo;
//  $("#destaqueCentralTituloCanallead")[0].href = "artigo.aspx?channelid="+channelid+"&contentid="+contentid;
//  $("#destaqueCentralTituloCanallead")[0].innerHTML = lead;
//  if (img == '')     
//  {
//    $("#destaqueCentralImagemCanal").hide();
//  }
//  else
//  {
//    $("#destaqueCentralImagemCanal")[0].src = img;
//    $("#destaqueCentralImagemCanal").show();
//  }
//  $("#destaqueCentralTituloCanalcomentarios")[0].href = "artigo.aspx?channelid="+channelid+"&contentid="+contentid+"#comment";
//  $("#destaqueCentralTituloCanalcomentarios")[0].innerHTML ="Comentários:("+ TotalComentarios +")";
//  $("#destaqueCentralImagemCanal").unbind("click");
//  $("#destaqueCentralImagemCanal").bind("click",function() { gotoUrl('artigo.aspx?channelid='+channelid+'&contentid='+contentid); }); 
//  setTimeout("$('#destaqueCentralImagemCanal').css('background-image','url("+img+")');", 100);
//}


