function search()
{
document.location = 'http://hsinvestimentos.com.br/institutoleo/index.php/portal/busca/'+$("#search_text").val();
}
function search2()
{
document.location = 'http://hsinvestimentos.com.br/institutoleo/index.php/portal/busca/'+$("#search_text2").val();
}
// CONTA DO TWEETER
var tweetUsers = ['institutoleo'];
var buildString = "";
$(document).ready(function() {
var get_arr = $("#array_days").html();
var dateList = get_arr.split(",");
if($("#ini_date").html() != "0")
{
loadContent('http://hsinvestimentos.com.br/institutoleo/index.php/portal/conteudo_agenda/'+$("#ini_date").html());
}
$("a[rel='photos_gallery']").colorbox({transition:"fade", opacity:.5});
$("a[rel='video_gallery']").colorbox({transition:"fade", opacity:.5, iframe:true, innerWidth:425, innerHeight:244});
$("#calendar").datepicker({ //ADICIONAMOS A FUNÇÃO PELO ID DO CONTAINER
beforeShowDay: function(dateToShow)
{
return [($.inArray($.datepicker.formatDate('yymmdd', dateToShow),dateList) >= 0), ""]; //FORMATA A DATA A E PEGA OS DIAS A SEREM MOSTRADOS
},
onSelect: function(dateText, inst) {
if($.inArray(dateText,dateList)) //ADICIONA UMA AÇÃO AO DIA
{
var formatDate = dateText.split("/").join("_");
document.location = 'http://hsinvestimentos.com.br/institutoleo/index.php/portal/agenda/'+formatDate;
}
}
});
for(var i=0;i
carregando...");
$("#content").load(urlHtml);
}
function votar()
{
$.post("http://hsinvestimentos.com.br/institutoleo/index.php/portal/compute_vote", { value:$("input[@name='vodeButton']:checked").val() },
function(data){
if(data == "true")
{
alert("Voto processado.");
}else{
alert("Erro ao votar");
}
});
}
function cadastra_email()
{
$.post("http://hsinvestimentos.com.br/institutoleo/index.php/portal/cadastra_email", { email:$("#email_newsletter").val() },
function(data){
if(data == "true")
{
$("#email_newsletter").val("");
alert("Email cadastrado.");
}else{
alert("Erro ao cadastrar");
}
});
}
function TweetTick(ob)
{
var i = 0;
var max = 7;
var container=$('#tweet-container');
container.html('');
$(ob.results).each(function(el){
if( i != max )
{
var str = '