﻿var viewportwidth;
if (typeof window.innerWidth != "undefined") {
		viewportwidth = window.innerWidth
} else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		viewportwidth = document.documentElement.clientWidth
} else {
		viewportwidth = document.getElementsByTagName("body")[0].clientWidth
}
BandLib = window.BandLib || {};
$(document).ready(function () {

		function bd(a) {
				$("#modal_erro span").text(a)
		}

		function bc(a, b) {
				$("#modal_erro span").text(b);
				a.addClass("avisoerro")
		}

		function bb(a) {
				var b = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
				return b.test(a)
		}

		function Z(a, b) {
				var c = arguments.length;
				if (c === 0) {
						a = 0;
						b = 2147483647
				} else if (c === 1) {
						throw new Error("Warning: rand() expects exactly 2 parameters, 1 given")
				}
				return Math.floor(Math.random() * (b - a + 1)) + a
		}

		function X(a, b) {
				var c = "";
				for (dia in a) {
						c += '<li itemscope="http://schema.org/Weather"><ul><li><span itemtype="date" class="tT_data">' + V[a[dia].data] + '</span> <span class="tT_desc" itemtype="description">' + a[dia].descricao + '</span> em <span itemtype="place">' + b + '</span><span class="sprt ' + a[dia].icon + '" title="' + a[dia].descricao + " em " + b + '"></span></li><li>Mínima: <span class="tT_min" itemtype="min">' + a[dia].min + 'ºC</span></li><li>Máxima: <span class="tT_max" itemtype="max">' + a[dia].max + 'ºC</span></li><li>Nascer do Sol: <span itemtype="sunrise">' + a[dia].sunrise + '</span></li><li>Pôr do Sol: <span itemtype="sunset">' + a[dia].sunset + '</span></li><li title="Quantidade de chuva, em milímetros por metro quadrado">Precipitação: <span itemtype="precipitation">' + a[dia].precipitation + "mm</span></li></ul></li>"
				}
				//$("#tooltipTempoDias").html(c);
				$("#estadoAtual").html('<a href="http://www.band.com.br/servicos/previsao-do-tempo/">Tempo - ' + b + '</a>');
				$("#icoTemp").attr("class", "sprt " + a[0].icon).attr("title", a[0].descricao + " em " + b).text(a[0].descricao);
				$("#barraTempo").fadeIn()
		}

		function W(a) {
				$previsaoTempoUl = $("#previsaoTempo ul");
				var b = "";
				for (cidade in a) {
						b += '<li itemscope="http://schema.org/Weather" class="prev_' + a[cidade][0].icon + '"><span class="sprt" itemtype="description" title="' + a[cidade][0].descricao + " em " + cidade + '">' + a[cidade][0].descricao + '</span><dl><dt itemtype="place">' + cidade + '</dt><dd class="prev_min">Mínima: <span itemtype="min">' + a[cidade][0].min + 'ºC</span></dd><dd class="prev_max">Máxima: <span itemtype="max">' + a[cidade][0].max + "ºC</span></dd></dl></li>"
				}
				$("#previsaoTempo ul").html(b)
		}

		function U(a) {
				var b = "cidade=" + S[a].capital.cod + "-" + a + ",RiodeJaneiro-RJ,SaoPaulo-SP,BeloHorizonte-MG";
				$.ajax({
						type: "GET",
						data: b,
						dataType: "json",
						url: window.baseUrl + "/dados/previsao-do-tempo.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no buscaTempo");
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (b, c, d) {
								var e = b[S[a].capital.nom];
								X(e, a);
								W(b)
						}
				})
		}

		function T(a, b) {
				var c = a ? "" : "SP";
				if (a) {
						for (codEstado in S) {
								if (b == S[codEstado].nom) {
										c = codEstado;
										break
								}
						}
				}
				U(c)
		}

		function P() {
				window.votosTotal = 0;
				window.idEnquete = 0;
				$.ajax({
						type: "GET",
						data: {
								canal: window.canal,
								canalantigo: window.canalantigo,
								tipo: window.tipo
						},
						dataType: "json",
						url: window.baseUrl + "dados/enquete.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro na busca de enquete")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								window.votosTotal = a.votos_total;
								window.idEnquete = a.id;
								var d = 100;
								var e = 0;
								var f = 0;
								var g = 0;
								var h = '<form method="post" action="" id="formEnquete"><div>Enquete</div><label class="enquete_pergunta">' + a.pergunta + '</label><fieldset><input type="hidden" value="' + a.id + '" />';
								if (window.canalantigo == 263) {
										h = '<form method="post" action="" id="formEnquete"><div class="legend">Jogando Junto</div><span>Vote e ajude a fazer o Magazine da Liga</span><label class="enquete_pergunta">' + a.pergunta + '</label><fieldset><input type="hidden" value="' + a.id + '" />'
								}
								for (respostaId in a.respostas) {
										f += 1
								}
								for (respostaId in a.respostas) {
										e = Math.floor(a.respostas[respostaId].votos * 100 / window.votosTotal);
										d -= e;
										g += 1;
										if (g === g) {
												e += d
										}
										h += '<label><div class="resultado_enquete" rel="' + a.respostas[respostaId].votos + '">' + e + '%</div><input class="opcao_enquete" type="radio" value="' + respostaId + '" name="opcao_enquete"><span>' + a.respostas[respostaId].texto + "</span></label>"
								}
								h += '</fieldset><button id="votaEnquete" type="submit" class="botao">Votar</button><a id="enqueteverResultados" title="Ver os resultados da enquete" href="#">Ver resultado</a></form>';
								$("#enqueteHome").html(h);
								$("#enqueteverResultados").bind("click", function (a) {
										a.preventDefault();
										$(".resultado_enquete").each(function () {
												var a = $(this);
												var b = parseInt(a.attr("rel"));
												var c = Math.floor(b * 100 / window.votosTotal);
												a.text(c + "%").animate({
														width: c + 50,
														opacity: 1
												})
										})
								});
								$("#votaEnquete").bind("click", function (a) {
										a.preventDefault();
										var b = $("input[name=opcao_enquete]:checked");
										if (b.size() != 0) {
											var c = parseInt(b.parent().find('.resultado_enquete').attr("rel"));
											
											b.parent().find('.resultado_enquete').attr("rel", c + 1);
											b.attr("rel", c + 1);
											
											$.get(window.baseUrl + "dados/enquete.ashx", {
													idEnq: window.idEnquete,
													idAlt: b.val(),
													est: "grv",
													hash: "kjbncd89sdjn234ns9"
											});
											
											window.votosTotal++;
											
											$(this).css("opacity", "0.5").attr("disabled", "true");
											$(".resultado_enquete").each(function () {
													var a = $(this);
													a.parent("label").children("input").fadeOut();
													var b = parseInt(a.attr("rel"));
													var c = Math.floor(b * 100 / window.votosTotal);
													a.text(c + "%").animate({
															width: c + 50,
															opacity: 1
													})
											})
										} else {
											alert("Selecione uma opção")
										}
								})
						}
				})
		}

		function M(a) {
				$.ajax({
						type: "GET",
						data: {
								canal: window.canal,
								canalantigo: window.canalantigo,
								tipo: window.tipo,
								total: a
						},
						dataType: "json",
						url: window.baseUrl + "dados/tabelas.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no na busca de tabela")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								var d = $("#tabelaLateral");
								var e = d.find("tr").size();
								var f = 0;
								var g = '<h3>Brasileirão 2011</h3><a href="http://www.band.com.br/esporte/futebol/brasileirao-serie-a/tabela/" title="Veja a tabela completa">Veja a tabela completa</a><!--ul><li class="tab_ativa">Classificação</li><li>Tabelas</li></ul--><table><caption>Classificação</caption><thead><tr><th class="tl_p"> Posição </th><th class="tl_t"> Time </th><th class="tl_pt"> <abbr title="Pontos">P</abbr> </th><th class="tl_j"> <abbr title="Jogos">J</abbr> </th><th class="tl_v"> <abbr title="Vitórias">V</abbr></th></tr></thead><tbody>';
								for (IdtB in a.classificacao) {
										f++;
										if (f >= 6) break;
										var h = a.classificacao[IdtB];
										g += '<tr><td class="tl_p">' + h.posicao + '</td><th class="tl_t">' + h.clube + '</th><td class="tl_pt">' + h.pontos + '</td><td class="tl_j">' + h.jogos + '</td><td class="tl_v">' + h.vitorias + "</td></tr>"
								}
								g += "</tbody></table>";
								d.html(g)
						}
				})
		}

		function J(a) {
				$.ajax({
						type: "GET",
						data: {
								canal: window.canal,
								canalantigo: window.canalantigo,
								tipo: window.tipo,
								total: a
						},
						dataType: "json",
						url: window.baseUrl + "dados/twitter.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no na busca de twitter")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								var d = $("#listaTwitter");
								var e = d.find("li").size();
								var f = 0;
								var g = "<h3>Twitter da equipe</h3><ul>";
								for (twId in a) {
										f++;
										if (f > e) break;
										var h = a[twId];
										g += '<li><img width="60" height="60" alt="@' + h.name + '" src="' + h.profile_image_url + '"> <a href="http://twitter.com/' + h.name + '" class="link_twitter" title="Siga o @' + h.name + '" target="_blank">' + h.name + "</a><div>" + h.text + "</div> <span>" + h.created_at + "</span> </li>"
								}
								g += "</ul>";
								d.html(g)
						}
				})
		}

		function H(a) {
				$.ajax({
						type: "GET",
						data: {
								canal: window.canal,
								canalantigo: window.canalantigo,
								tipo: window.tipo,
								total: a
						},
						dataType: "json",
						url: window.baseUrl + "dados/galeria.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no na busca de Fotos")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								var d = $("#listaFotos");
								var e = d.find(".materia").size();
								var f = 0;
								var g = "";
								for (FotoId in a.galerias) {
										f++;
										if (f > e) break;
										var h = a.galerias[FotoId];
										g += '<div class="materia hb_sgrid_2 ' + (f === e ? "last" : "") + '" itemscope="http://schema.org/NewsArticle"><span>' + h.titulo + '</span><time itemtype="datePublished">' + h.data + '</time><a href="' + h.link + '" title="' + h.titulo + '"><img width="140" height="100" alt="' + h.titulo + '" src="' + h.foto + '"></a><a href="' + h.link + '" target="_blank" title="' + h.titulo + '">' + h.texto + "</a></div>"
								}
								d.html(g)
						}
				})
		}

		function Hh(a, b,c,t) {
				$.ajax({
						type: "GET",
						data: {
								canal: b,
								canalantigo: c,
								tipo: t,
								total: a
						},
						dataType: "json",
						url: window.baseUrl + "dados/galeria.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no na busca de Fotos")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								var d = $("#galeria_adicional");
								var e = d.find("li").size();
								var f = 0;
								var g = "";
								for (FotoId in a.galerias) {
										f++;
										if (f > e) break;
										var h = a.galerias[FotoId];
										g += '<li class="materia"><a href="'+h.link+'" title="'+h.titulo+'"><img src="'+h.foto+'" alt="descricao" width="80" height="60" ></a></li>';
								}
								d.html(g)
						}
				})
		}

		function E(a) {
				$.ajax({
						type: "GET",
						data: {
								canal: window.canal,
								canalantigo: window.canalantigo,
								tipo: window.tipo,
								total: a
						},
						dataType: "json",
						url: window.baseUrl + "dados/videos.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no na busca de videos")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								var d = $("#listaVideos");
								var e = parseInt(d.attr("class").replace("hb_sgrid_", "")) / 2;
								var f = 0;
								var g = "";
								for (videoId in a.videos) {
										f++;
										if (f > e) {
												break
										}
										var h = a.videos[videoId];
										g += '<div class="materia hb_sgrid_2 ' + (f === e ? "last" : "") + '" itemscope="http://schema.org/NewsArticle"><span>' + h.title + '</span><time itemtype="datePublished">' + h.data + '</time>';
										if(h.urlPgVideo == ""){
											g += '<a href="http://videos.band.com.br/Exibir/' + window.PagBody + "/" + h.id + '" title="' + h.title + '">';
										}else{
											g += '<a href="'+ h.urlPgVideo + '" title="' + h.title + '">';
										}
										g += '<img width="140" height="100" alt="' + h.title + '" src="' + h.thumb + '"></a>';
										if(h.urlPgVideo == ""){
											g += '<a href="http://videos.band.com.br/Exibir/' + window.PagBody + "/" + h.id + '" title="' + h.title + '">';
										}else{
											g += '<a href="'+ h.urlPgVideo + '" title="' + h.title + '">';
										}
										g += h.description + "</a></div>";
								}
								d.html(g)
						}
				})
		}

		function D() {
				$.ajax({
						type: "GET",
						data: {
								canal: window.canal,
								canalantigo: window.canalantigo,
								tipo: window.tipo
						},
						dataType: "json",
						url: window.baseUrl + "dados/noticias.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no atualizaEltimasEMaisLidas")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								for (tipo in a) {
										var d = 0;
										if (tipo == "geral") {
												//<h3>Últimas de Esporte <a href="" class="bt_lertds sprt">ver todas</a></h3>
												var e = '<h3>Últimas notícias </h3><ol class="listanot_geral">';
												var f = "";
												for (noticiaId in a[tipo]) {
														d += 1;
														for (edBusca in C) {
																if (a[tipo][noticiaId].link.indexOf(edBusca) != -1) {
																		f = C[edBusca];
																		break
																}
														}
														e += "<li>" + (a[tipo][noticiaId].cartola == "" ? "" : '<span class="' + f + '1">' + a[tipo][noticiaId].cartola + "</span>") + '<a  class="' + f + '1" href="' + a[tipo][noticiaId].link + '" title="' + a[tipo][noticiaId].texto + '"><span class="sprt ico' + f + '">' + d + "</span>" + a[tipo][noticiaId].texto + "</a></li>"
												}
												e += "</ol>";
												$("#ultimasNoticias").html(e)
										} else if (tipo == "data") {
											//agendaPub( a[tipo] )
										} else if (tipo == "maislidas" || tipo == "listacanal" || tipo == "ultimascanal" || tipo == "entetrenimento" || tipo == "jornalismo" || tipo == "esporte") {
												try {
														var e = '<ol class="listanot_' + tipo + '">';
														for (noticiaId in a[tipo]) {
																d += 1;
																e += "<li>" + (a[tipo][noticiaId].cartola == "" ? "<span> </span>" : "<span>" + a[tipo][noticiaId].cartola + "</span>") + '<a href="' + (a[tipo][noticiaId].link.substr(0, 4) == "http" ? a[tipo][noticiaId].link : "http://" + a[tipo][noticiaId].link) + '" title="' + a[tipo][noticiaId].texto + '"><span class="sprt ico">' + d + "</span>" + a[tipo][noticiaId].texto + "</a></li>"
														}
														e += "</ol>";
														//listacanal
														var btm = '';
														if (tipo == "listacanal") {
																btm = '<a href="noticia" class="bt_lertds sprt">ver todas</a>';
														}
														$(editoriasML[tipo].id).html("<h3>" + editoriasML[tipo].tit + btm + '</h3>' + e)
												} catch (g) {
														console.error(g)
												}
									} else if (tipo == "listadicasfoliao" ) {
											try {
													var e = '<ol class="listanot_' + tipo + '">';
													for (noticiaId in a[tipo]) {
															d += 1;
															e += "<li>" + (a[tipo][noticiaId].cartola == "" ? "<span> </span>" : "<span>" + a[tipo][noticiaId].cartola + "</span>")+ '<a href="' + (a[tipo][noticiaId].link.substr(0, 4) == "http" ? a[tipo][noticiaId].link : "http://" + a[tipo][noticiaId].link)+ '" title="' + a[tipo][noticiaId].texto + '">'+ "<img src='"+a[tipo][noticiaId].imagem +"'/></a>"+ '<p><a href="' + (a[tipo][noticiaId].link.substr(0, 4) == "http" ? a[tipo][noticiaId].link : "http://" + a[tipo][noticiaId].link)+ '" title="' + a[tipo][noticiaId].texto + '">' + a[tipo][noticiaId].texto + "</a></p></li>"
													}
													e += "</ol>";
													//listacanal
													var btm = '';
													if (tipo == "listacanal") {
															btm = '<a href="noticia" class="bt_lertds sprt">ver todas</a>';
													}
													$(editoriasML[tipo].id).html("<h3>" + editoriasML[tipo].tit + btm + '</h3>' + e)
											} catch (g) {
													console.error(g)
											}
										} else if (tipo == "blogs") {
												var h = $(editoriasML[tipo].id);
												var i = h.find(".materia").size();
												var j = 0;
												var k = "";
												for (blogId in a[tipo]) {
														j++;
														if (j > i) break;
														var l = a[tipo][blogId];
														k += '<div class="materia hb_sgrid_2 ' + (j === i ? "last" : "") + '" itemscope="http://schema.org/NewsArticle"><span>' + l.nome + '</span><time itemtype="datePublished">' + l.data + '</time><a href="' + l["url-post"] + '" title="' + l.nome + " " + l.titulo + '"><img width="140" height="100" alt="' + l.nome + " - " + l.titulo + '" src="' + l.avatar + '"></a><a href="' + l["url-post"] + '" title="' + l.nome + " - " + l.titulo + '">' + l.titulo + "</a></div>"
												}
												h.html(k)
										} else if (tipo == "colunistas") {
												var h = $(editoriasML[tipo].id);
												var i = h.find(".materia").size();
												var j = 0;
												var m = "";
												for (colunaId in a[tipo]) {
														j++;
														if (j > i) break;
														var n = a[tipo][colunaId];
														m += '<div class="materia hb_sgrid_2 ' + (j === i ? "last" : "") + '" itemscope="http://schema.org/NewsArticle"><span>' + n.nome + '</span><time itemtype="datePublished">' + n.data + '</time><a href="' + n.link + '" title="' + n.nome + " " + n.titulo + '"><img width="140" height="100" alt="' + n.nome + " - " + n.texto + '" src="' + n.foto + '"></a><a href="' + n.link + '" title="' + n.nome + " - " + n.texto + '">' + n.texto + "</a></div>"
												}
												h.html(m)
										} else if (tipo == "programacao") {
												var h = $(editoriasML[tipo].id);
												var j = 0;
												var o = '<div><ul><li><a href="http://www.band.com.br/programacao/">Veja a programação completa</a></li>';
												for (progId in a[tipo]) {
														var p = a[tipo][progId];
														j++;
														if (j >= 5) {
																break
														}
														o += "<li" + (j == 1 ? ' id="ProgNoAr"' : "") + '><a href="' + p.link + '">' + (j == 1 ? "<span>No ar:</span> " : "") + (j == 2 ? "<span>A seguir:</span> " : "") + p.programa + "</a></li>"
												}
												o += "</ul></div>";
												h.html(o)
										} else if (tipo == "canais") {
												var q = {
														bandnewstv: {
																tit: "Band News",
																css: "caBN",
																link: "http://bandnewstv.band.com.br/"
														},
														bandsport: {
																tit: "Band Sport",
																css: "caBS",
																link: "http://bandsports.band.com.br/"
														},
														terraviva: {
																tit: "Terra Viva",
																css: "caTV",
																link: "http://tvterraviva.band.com.br/"
														}
												};
												var h = $(editoriasML[tipo].id);
												var o = "";
												for (progId in a[tipo]) {
														var r = a[tipo][progId];
														o += '<div class="materia hb_grid_4 sprt" id="' + q[r.programa].css + '"><span class="sprt"><a href="' + q[r.programa].link + '">' + q[r.programa].tit + '</a></span><a href="' + r.link + '"><img  width="290" height="120" alt="' + r.titulo + '" src="' + r.foto + '"></a><a href="' + r.link + '">' + r.titulo + "</a></div>"
												}
												h.html(o)
										}
								}
						}
				})
		}

		function B() {
				var a = A.find("li:last").attr("id");
				var b = (a === "canadMetro") ? 9000 : 3000;
				A.find("li:last").delay(b).fadeOut("slow", function () {
					$(this).prependTo(A).fadeIn(100);
					B();
				})
		}

		function z() {
				$.ajax({
						type: "GET",
						dataType: "json",
						url: window.baseUrl + "dados/plantao-canais.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no atualizaPlantaocanais")
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								data = a.noticias;
								for (idCanal in data) {
										var d = $barraPlantao.find(y[data[idCanal].cartola]);
										d.children("a").attr("href", data[idCanal].link);
										d.find(".not").text(data[idCanal].texto)
								}
						}
				})
		}

		function x() {
				$.ajax({
						type: "GET",
						data: {
								pdt: 0,
								tipo: "cnl"
						},
						dataType: "json",
						url: window.baseUrl + "dados/publicidade.ashx",
						beforeSend: function (a, b) {},
						complete: function (a, b) {},
						error: function (a, b, c) {
								console.info("Erro no buscaPublicidade 2");
						},
						statusCode: {
								404: function () {
										console.log("404 : Página não encontrada")
								},
								500: function () {
										console.log("500 : Erro no servidor")
								}
						},
						success: function (a, b, c) {
								console.dir(a)
						}
				})
		}

		function v() {
				window.destAtual++;
				var a = 0;
				if (window.destAtual >= window.destQuant) {
						window.destAtual = 0
				} else {
						a = "-=600"
				}
				t.stop(true, true).animate({
						marginLeft: a
				}, 200, function () {
						$(".destativo").removeClass("destativo");
						$("#navRotativo li").eq(destAtual).addClass("destativo")
				})
		}

		function o() {
				n.find("div:last").fadeOut(13e3, function () {
						var a = $(this);
						n.prepend(a);
						a.show();
						o()
				})
		}
		var a = $("#conteudoNoticias");
		if (a.size() > 0) {
				var b = $("#mais_texto");
				var c = b.next('span[itemprop="articleBody"]').children(".editorConteudo");
				c.insertBefore(b)
		}
		var d = $(".formulario_padrao_valida");
		if (d.size() > 0) {
				d.find("form").each(function (a, bform) {
					$(bform).validate()
				})
		}
		
		var e = $(".formulario_padrao_mascara");
		if (e.size() > 0) {
				$(".maskData").mask("99/99/9999");
				$(".maskCPF").mask("999.999.999-99");
				$(".maskTel").mask("(99)9999-9999")
		}
		$("#btCasClick").click(function () {
				var a = $("#bdBuscadorLugarProvincia").val();
				window.location.href = "http://www.casamentoclick.com.br/templates/buscador_redirige_moll.php?moll=" + a
		});
		$("#liga_grupos").find("span").click(function () {
				$(".grupo_ativo").removeClass("grupo_ativo");
				$(this).parent("li").addClass("grupo_ativo")
		});
		var f = $("#liga_tabela_lista");
		var g = f.find("li").size();
		var h = 2;
		var i = 300 * (h - 1) * -1;
		f.css("margin-left", i + "px");
		$(".liga_anterior").click(function () {
				if (h === 1) {
						return false
				}
				h -= 1;
				f.animate({
						marginLeft: "+=300"
				})
		});
		$(".liga_proximo").click(function () {
				if (h === g) {
						return false
				}
				h += 1;
				f.animate({
						marginLeft: "-=300"
				})
		});
		$("#secBus").find("span").text("");
		$("body > span").remove();
		$("#espTransito a").click(function (a) {
				a.preventDefault();
				$("#rad3 a").trigger("click")
		});
		window.baseUrl = "http://" + window.location.host + "/";
		window.PagBody = $("body").attr("id").replace("conteudo", "");
		if (!window.console) {
				var j = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
				window.console = {};
				for (var k = 0; k < j.length; ++k) {
						window.console[j[k]] = function () {}
				}
		}
		var l = $("#navRotativo li");
		if (l.size() < 2 && $(".ferramenta_edicao").size() === 0) {
				l.hide()
		}
		var m = $("#menuBandNot > a");
		m.attr("href", "http://www.band.com.br/noticias/");
		var n = $("#logoBand");
		o();
		$("#mat_img").bind("click", function (a) {
				a.preventDefault()
		});
		$(".nav_tab a").bind("click", function (a) {
				a.preventDefault();
				var b = $(this).attr("href");
				$(".nav_tab.tab_ativa").removeClass("tab_ativa");
				$(this).parent("li").addClass("tab_ativa");
				$(".tab_conteudo.tab_ativa").hide("fast", function () {
						$(b).show().addClass("tab_ativa")
				})
		});
		$("li.menu_editoria_sub ul").hover(function () {
				$(this).parent("li").addClass("hover")
		}, function () {
				$(this).parent("li").removeClass("hover")
		});
		$(".lista_simples_menu a").click(function (a) {
				a.preventDefault();
				$(".lista_simples_ativa").removeClass("lista_simples_ativa");
				$(this).parent("li").addClass("lista_simples_ativa");
				var b = $(this).attr("href");
				$(".lista_simples_conteudo.lista_simples_ativo").fadeOut().removeClass("lista_simples_ativo");
				$(b).fadeIn().addClass("lista_simples_ativo")
		});
		var p = $("#tabelasTimeMenu ul");
		p.find("a").click(function (a) {
				a.preventDefault();
				var b = $(this);
				var c = b.parent("li");
				p.prepend(c);
				var d = b.attr("href");
				$(".tabela_campeonato.tabela_ativa").fadeOut().removeClass("tabela_ativa");
				$(d).fadeIn().addClass("tabela_ativa");
				$("#linkTabelaCompleta").attr("href", b.attr("rel"));
				$("#linkTabelaCompleta").attr("title", "Ver a tabela completa do" + b.text())
		});
		var q = 14;
		$("#diminuirFonte").click(function () {
				q = q - 2;
				if (q < 8) return false;
				$("#mat_texto").animate({
						fontSize: q
				})
		});
		$("#aumentarFonte").click(function () {
				q = q + 2;
				if (q > 20) return false;
				$("#mat_texto").animate({
						fontSize: q
				})
		});
		
		var $contadorbfpub = $('#contadorbfpub');
		if( $contadorbfpub.size() > 0 ){
			
			window.setInterval(function(){
				$contadorbfpub.find('a:last').fadeOut('fast', function(){
					$(this).prependTo('#contadorbfpub').show();
				});
			},4000);
			
			$contadorbfpub.find('a').live('click', function(){
				var label = $(this).data('label');
				console.log(label)
				_gaq.push(['_trackEvent', 'Contador BandFolia', 'clique', label]);
			});
			

			
			
		}
		
		$('.target_popup').bind("click", function (a) {
				a.preventDefault();
				var b = $(this).attr("href");
				var c = $(this).text();
				window.open(b, c, "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=250")
		});
		
		var r = $("#rotativo");
		var s = r.find(".materia:visible");
		var t = $("#listaMateriasDesq");
		window.pausaRotativo = false;
		r.hover(function () {
				r.stop(true, true);
				window.pausaRotativo = true
		}, function () {
				window.pausaRotativo = false
		});
		$("#listaRadios").find("a").bind("click", function (a) {
				a.preventDefault();
				var b = $(this).attr("href");
				var c = $(this).text();
				window.open(b, c, "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,height=250")
		});
		if ($("#navRotativo").size() === 0) {
				$("#mascRotativo").append(function () {
						return '<ul id="navRotativo">' +
						function () {
								var a = "";
								s.each(function (b, c) {
										var d = $(c).find(".desc").text();
										var e = $(c).attr("class").replace("materia", "").replace("hb_", "");
										a += '<li class="sprt ' + e + " " + (b == 0 ? "destativo" : "") + '" title="' + d + '">' + (b + 1) + "</li>"
								});
								return a
						}() + "</ul>"
				})
		}
		$("#estradas").change(function () {
				var a = $(this).val();
				console.log(a);
				$("#imgTransito").attr("src", a)
		});
		var u = 6e3;
		window.destAtual = 0;
		window.destQuant = s.size(); 
		window.setInterval(function () {
				if (!window.pausaRotativo && !window.edicaoAberta) {
						v()
				}
		}, u);
		$("#navRotativo li").live("click", function () {
				$(".destativo").removeClass("destativo");
				$(this).addClass("destativo");
				destAtual = $(this).index();
				var a = destAtual;
				t.animate({
						marginLeft: "-" + 600 * a
				}, 0)
		});
		$ulImg = $(".gb-lista-img-grande");
		$ulMini = $(".gb-container-miniaturas ul");
		$listaMinis = $ulMini.find("li");
		$listaImgs = $ulImg.find("li");
		nrImgs = $listaImgs.size();
		imgAtual = 0;
		pagMin = 1;
		nrPagMin = Math.ceil(nrImgs / 9);
		if (nrPagMin < 2) {
				$(".gb-nav-miniatura").addClass("gb-nav-inativo")
		} else {
				$(".gb-miniaturas-anterior").click(function () {
						if (pagMin === 1) {
								return false
						}
						$ulMini.stop(true, true).animate({
								marginLeft: "+=495"
						}, "fast", function () {
								pagMin--
						})
				});
				$(".gb-miniaturas-proxima").click(function () {
						if (pagMin === nrPagMin) {
								return false
						}
						$ulMini.stop(true, true).animate({
								marginLeft: "-=495"
						}, "fast", function () {
								pagMin++
						})
				})
		}
		$(".gb-img-anterior").click(function () {
				if (imgAtual === 0) {
						return false
				}
				$listaImgs.eq(imgAtual).fadeOut("fast", function () {
						imgAtual--;
						$listaImgs.eq(imgAtual).fadeIn();
						$(".gb-miniatura-atual").removeClass("gb-miniatura-atual");
						$listaMinis.eq(imgAtual).addClass("gb-miniatura-atual")
				})
		});
		$(".gb-img-proxima").click(function () {
				if (imgAtual >= nrImgs - 1) {
						return false
				}
				$listaImgs.eq(imgAtual).fadeOut("fast", function () {
						imgAtual++;
						$listaImgs.eq(imgAtual).fadeIn();
						$(".gb-miniatura-atual").removeClass("gb-miniatura-atual");
						$listaMinis.eq(imgAtual).addClass("gb-miniatura-atual")
				})
		});
		$(".gb-container-miniaturas li a").click(function (a) {
				a.preventDefault();
				$this = $(this);
				$listaImgs.eq(imgAtual).fadeOut("fast", function () {
						imgAtual = parseInt($this.attr("rel"));
						$listaImgs.eq(imgAtual).fadeIn();
						$(".gb-miniatura-atual").removeClass("gb-miniatura-atual");
						$listaMinis.eq(imgAtual).addClass("gb-miniatura-atual")
				})
		});
		var w = {
				superbanner: "#ad_superbanner",
				arroba: "#arroba1",
				sky: "#pub-3",
				dhtml: "#pub-4",
				"intervenção": "#pub-5",
				ofertas: "#pub-6",
				halfbanner: "#pub-7",
				arroba2: "#pub-8",
				fullbanner: "#pub-9",
				botao1: "#pub-10",
				botao2: "#pub-11",
				botao3: "#pub-12",
				tvhome: "#pub-13"
		};
		$("#logoBand").click(function () {
				window.location.href = "http://www.band.com.br/"
		});
		var y = {
				TerraViva: "#canadTv",
				RB: "#canadRB",
				BandNewsFm: "#canadBnf",
				Nativa: "#canadNat",
				BandFm: "#canadBfm",
				BandNewsTv: "#canadBn",
				MitFm: "#canadMit",
				BandSport: "#canadBs",
				Band: "#canadBa",
				WebNews: "#canadWn",
				Metro: "#canadMetro"
		};
		$barraPlantao = $("#barraPlantao");
		var A = $barraPlantao.children("ul");
		B();
		editoriasML = {
				entetrenimento: {
						id: "#ultNotEnt",
						dt: 0
				},
				jornalismo: {
						id: "#ultNotNot",
						dt: 1
				},
				esporte: {
						id: "#ultNotEsp",
						dt: 2
				},
				programacao: {
						id: "#proxProgramas",
						dt: 3
				},
				maislidas: {
						id: "#listamaislidas",
						dt: 4,
						tit: "Mais lidas"
				},
				listacanal: {
						id: "#listacanal",
						dt: 5,
						tit: "Últimas" + ($(".breadcrumbLink3").text() == "" ? $(".breadcrumbLink2").text() == "Notícias" ? "" : " de " + $(".breadcrumbLink2").text() : " de " + $(".breadcrumbLink3").text())
				},
				blogs: {
						id: "#listaBlogs",
						dt: 6,
						tit: "Blogs"
				},
				colunistas: {
						id: "#listaColunistas",
						dt: 7,
						tit: "Colunistas"
				},
				ultimascanal: {
						id: "#ultimasCanal",
						dt: 8,
						tit: "Mais lidas de " + ($(".breadcrumbLink2").text() == "" ? $(".breadcrumbLink3").text() : $(".breadcrumbLink2").text())
				},
				canais: {
						id: "#canaisAssinatura",
						dt: 9,
						tit: "Canais por Assinatura"
				},
				listadicasfoliao: {
						id: "#listadicasfoliao",
						dt: 10,
						tit: "Dicas de Folião"
				}
		};
		var C = {
				"entretenimento": "cEnt",
				"noticias": "cNot",
				"esporte": "cEsp",
				"viva-bem": "cViv"
		};
		var F = $("#listaVideos");
		if (F.size() > 0) {
				var G = parseInt(F.attr("class").replace("hb_sgrid_", "")) / 2;
				E(G)
		}
		var I = $("#listaFotos");
		if (I.size() > 0) {
				var G = I.find(".materia").size();
				H(G)
		}
		
		var Ii = $("#galeria_adicional");
		if (Ii.size() > 0) {
				var Gg = Ii.find("li").size();
				//Bandfolia - envie sua foto
				Hh(Gg, "393","100000393","Produto")
		}
		var K = $("#listaTwitter");
		if (K.size() > 0) {
				var L = K.find("li").size();
				J(L)
		}
		var N = $("#tabelaLateral");
		if (N.size() > 0) {
				var O = N.find("tr").size();
				M(O)
		}
		var Q = $("#enqueteHome");
		if (Q.size() > 0) {
				P()
		}
		var I = $("#listaFotos");
		if (I.size() > 0) {
				var G = I.find(".materia").size();
				H(G)
		}
		var R = 0;
		for (tipoBusca in editoriasML) {
				R += $(editoriasML[tipoBusca].id).size()
		}
		window.atualizaUltLid = false;
		if (R > 0) {
				atualizaUltLid = true
		}
		window.buscaPlantao = false;
		if ($barraPlantao.size() > 0) {
				window.buscaPlantao = true;
				z()
		}
		if (window.atualizaUltLid) {
				D()
		}
		
		if ($("#listaFIFA").size() > 0) {
			console.log('listaFIFA existe');
			$.ajax({
				type		: "GET",
				dataType	: "json",
				url			: window.baseUrl + "dados/PlantaoMundial.ashx",
				success		: function (dados, b, c) {
					console.log('listaFIFA')
					console.dir( dados )
					var HTMLf = '';
					for( ii in dados.ultimascanal){
						var not = dados.ultimascanal[ii];
						HTMLf += '<li>';
						HTMLf += 	'<span>' + not['cartola'] + '</span>';
						HTMLf += 	'<a href="' + not['link'] + '" title="' + not['texto'] + '">' + not['texto'] + '</a>';
						HTMLf += '</li>';
					}
					console.log('HTMLf' + HTMLf);
					$('#listaFIFA').html(HTMLf);
				}
			})
		} 
		
		var S = {
				AC: {
						nom: "Acre",
						capital: {
								cod: "RioBranco",
								nom: "Rio Branco"
						},
						cidades: {}
				},
				AL: {
						nom: "Alagoas",
						capital: {
								cod: "Maceio",
								nom: "Maceió"
						},
						cidades: {}
				},
				AP: {
						nom: "Amapá",
						capital: {
								cod: "Macapa",
								nom: "Macapá"
						},
						cidades: {}
				},
				AM: {
						nom: "Amazonas",
						capital: {
								cod: "Manaus",
								nom: "Manaus"
						},
						cidades: {}
				},
				BA: {
						nom: "Bahia",
						capital: {
								cod: "Salvador",
								nom: "Salvador"
						},
						cidades: {}
				},
				CE: {
						nom: "Ceará",
						capital: {
								cod: "Fortaleza",
								nom: "Fortaleza"
						},
						cidades: {}
				},
				DF: {
						nom: "Distrito Federal",
						capital: {
								cod: "Brasilia",
								nom: "Brasília"
						},
						cidades: {}
				},
				ES: {
						nom: "Espírito Santo",
						capital: {
								cod: "Vitoria",
								nom: "Vitória"
						},
						cidades: {}
				},
				GO: {
						nom: "Goiás",
						capital: {
								cod: "Goiania",
								nom: "Goiânia"
						},
						cidades: {}
				},
				MA: {
						nom: "Maranhão",
						capital: {
								cod: "SaoLuis",
								nom: "São Luís"
						},
						cidades: {}
				},
				MT: {
						nom: "Mato Grosso",
						capital: {
								cod: "Cuiaba",
								nom: "Cuiabá"
						},
						cidades: {}
				},
				MS: {
						nom: "Mato Grosso do Sul",
						capital: {
								cod: "CampoGrande",
								nom: "Campo Grande"
						},
						cidades: {}
				},
				MG: {
						nom: "Minas Gerais",
						capital: {
								cod: "BeloHorizonte",
								nom: "Belo Horizonte"
						},
						cidades: {
								0: {
										cod: "Uberlandia",
										nom: "Uberlândia"
								}
						}
				},
				PA: {
						nom: "Pará",
						capital: {
								cod: "Belem",
								nom: "Belém"
						},
						cidades: {}
				},
				PB: {
						nom: "Paraíba",
						capital: {
								cod: "JoaoPessoa",
								nom: "João Pessoa"
						},
						cidades: {}
				},
				PR: {
						nom: "Paraná",
						capital: {
								cod: "Curitiba",
								nom: "Curitiba"
						},
						cidades: {
								0: {
										cod: "Londrina",
										nom: "Londrina"
								},
								1: {
										cod: "Cascavel",
										nom: "Cascavel"
								},
								2: {
										cod: "PontaGrossa",
										nom: "Ponta Grossa"
								}
						}
				},
				PE: {
						nom: "Pernambuco",
						capital: {
								cod: "Recife",
								nom: "Recife"
						},
						cidades: {}
				},
				PI: {
						nom: "Piauí",
						capital: {
								cod: "Teresina",
								nom: "Teresina"
						},
						cidades: {}
				},
				RJ: {
						nom: "Rio de Janeiro",
						capital: {
								cod: "RiodeJaneiro",
								nom: "Rio de Janeiro"
						},
						cidades: {
								0: {
										cod: "Niteroi",
										nom: "Niterói"
								}
						}
				},
				RN: {
						nom: "Rio Grande do Norte",
						capital: {
								cod: "Natal",
								nom: "Natal"
						},
						cidades: {}
				},
				RS: {
						nom: "Rio Grande do Sul",
						capital: {
								cod: "PortoAlegre",
								nom: "Porto Alegre"
						},
						cidades: {
								0: {
										cod: "SantaMaria",
										nom: "Santa Maria"
								}
						}
				},
				RO: {
						nom: "Rondônia",
						capital: {
								cod: "PortoVelho",
								nom: "Porto Velho"
						},
						cidades: {}
				},
				RR: {
						nom: "Roraima",
						capital: {
								cod: "BoaVista",
								nom: "Boa Vista"
						},
						cidades: {}
				},
				SC: {
						nom: "Santa Catarina",
						capital: {
								cod: "Florianopolis",
								nom: "Florianópolis"
						},
						cidades: {
								0: {
										cod: "Joinville",
										nom: "Joinville"
								},
								1: {
										cod: "Blumenau",
										nom: "Blumenau"
								},
								2: {
										cod: "Chapeco",
										nom: "Chapecó"
								}
						}
				},
				SP: {
						nom: "São Paulo",
						capital: {
								cod: "SaoPaulo",
								nom: "São Paulo"
						},
						cidades: {
								0: {
										cod: "Campinas",
										nom: "Campinas"
								},
								1: {
										cod: "Ribeirao Preto",
										nom: "Ribeirão Preto"
								},
								2: {
										cod: "Osasco",
										nom: "Osasco"
								},
								3: {
										cod: "Santos",
										nom: "Santos"
								},
								4: {
										cod: "PresidentePrudente",
										nom: "Presidente Prudente"
								},
								5: {
										cod: "SantoAndre",
										nom: "Santo André"
								},
								6: {
										cod: "SaoJosedosCampos",
										nom: "São José dos Campos"
								},
								7: {
										cod: "Maringa",
										nom: "Maringá"
								},
								8: {
										cod: "SaoBernardodoCampo",
										nom: "São Bernardo do Campo"
								},
								9: {
										cod: "Bauru",
										nom: "Bauru"
								},
								10: {
										cod: "Sorocaba",
										nom: "Sorocaba"
								},
								11: {
										cod: "Guarulhos",
										nom: "Guarulhos"
								},
								12: {
										cod: "SaoJosedoRioPreto",
										nom: "São José do Rio Preto"
								},
								13: {
										cod: "Jundiai",
										nom: "Jundiaí"
								},
								14: {
										cod: "Franca",
										nom: "Franca"
								},
								14: {
										cod: "SaoCaetanodoSul",
										nom: "São Caetano do Sul"
								},
								14: {
										cod: "Taubate",
										nom: "Taubaté"
								},
								14: {
										cod: "Piracicaba",
										nom: "Piracicaba"
								},
						}
				},
				SE: {
						nom: "Sergipe",
						capital: {
								cod: "Aracaju",
								nom: "Aracaju"
						},
						cidades: {}
				},
				TO: {
						nom: "Tocantins",
						capital: {
								cod: "Palmas",
								nom: "Palmas"
						},
						cidades: {}
				}
		};
		if ($("#barraTempo").size() > 0) {
				T(false);
		}
		var V = {
				Sunday: "Domingo",
				Monday: "Segunda",
				Tuesday: "Terça",
				Wednesday: "Quarta",
				Thursday: "Quinta",
				Friday: "Sexta",
				Saturday: "Sábado"
		};
		var Y = 1;
		$proxDia = $("#proxDia");
		$tooltipTempoDias = $("#tooltipTempoDias");
		$proxDia.bind("click", function () {
				if (Y == 5) {
						$tooltipTempoDias.stop(true, true).animate({
								marginLeft: 0
						}, "slow", function () {
								Y = 1
						})
				} else {
						$tooltipTempoDias.stop(true, true).animate({
								marginLeft: "-=151"
						}, "slow", function () {
								Y++
						})
				}
		});
		var _ = $("#skyscraper");
		largura = 1250;
		left_sky = 500;
		if (viewportwidth >= largura) {
				_.show();
				_.css("left", viewportwidth / 2 + left_sky + "px")
		}
		$(window).resize(function () {
				var a;
				if (typeof window.innerWidth != "undefined") {
						a = window.innerWidth
				} else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
						a = document.documentElement.clientWidth
				} else {
						a = document.getElementsByTagName("body")[0].clientWidth
				}
				if (a >= largura) {
						_.show();
						_.css("left", a / 2 + left_sky + "px")
				} else {
						_.hide()
				}
		});
		$mat_img = $("#mat_img");
		if ($mat_img.size() > 0) {
				$.fn.fancyzoom.defaultsOptions.imgDir = "/imagens/ressources/";
				$("#mat_img").fancyzoom()
		}
		var ba = $("#boleiro_nome");
		$("#boleiro_enviar").click(function (a) {
				a.preventDefault();
				if (ba.val() === "" || ba.val() === "Sugira um nome") {
						ba.addClass("boleiro_nome_erro");
						ba.val("Sugira um nome");
						return false
				}
				$("#boleiro_modal iframe").attr("src", "/esporte/papodeboleiro/modal.asp?nome=" + ba.val());
				$("#boleiro_modal").show()
		});
		ba.click(function () {
				if (ba.val() === "Sugira um nome") {
						ba.val("");
						ba.removeClass("boleiro_nome_erro")
				}
		});
		$("#boleiro_ver").click(function (a) {
				a.preventDefault();
				$("#boleiro_modal iframe").attr("src", "/esporte/papodeboleiro/modal.asp");
				$("#boleiro_modal").show()
		});
		var be = $("#bolNome"),
				bf = $("#bolEmail");
		$("#btEnviarBoleiro").click(function (a) {
				a.preventDefault();
				if (be.val() === "") {
						bc(be, "Preencha o nome");
						return false
				}
				if (bf.val() == "") {
						bc(bf, "Preencha o email");
						return false
				}
				if (!bb(bf.val())) {
						bc(bf, "Digite um email válido");
						return false
				}
				$(".avisoerro").removeClass("avisoerro");
				$("#modal_erro span").text("");
				var b = $("#EnviaForm").serializeArray();
				$.ajax({
						url: "http://www.band.com.br/faleconosco/enviaMensagemBoleiro.asp",
						data: b,
						error: function () {
								alert("Não foi possivel concluir o cadastro.")
						},
						success: function (a) {
								if (a == 1) {
										bd("Cadastro concluido.")
								}
						}
				})
		});
		$("#modal_fechar").click(function (a) {
				$("#boleiro_modal", window.parent.document).hide()
		});
		var bg = $("#newsletter_nome");
		var bh = $("#newsletter_email");
		var bi = $("#newsletter_checkbox");
		var bj = $("#newsletter_botao");
		bg.click(function () {
				if (bg.val() != "" || bg.hasClass("newserro")) {
						bg.val("");
						bg.removeClass("newserro")
				}
		});
		bh.click(function () {
				if (bh.val() != "" || bh.hasClass("newserro")) {
						bh.val("");
						bh.removeClass("newserro")
				}
		});
		bj.click(function (a) {
				if (bg.val() == "" || bg.val() == "Nome") {
						bg.addClass("newserro");
						return false
				}
				if (bh.val() == "") {
						bh.addClass("newserro");
						return false
				}
				if (!bb(bh.val())) {
						bh.addClass("newserro");
						return false
				}
				window.open("http://www.band.com.br/newsletter/cadastro.asp", "popup", "scrollbars=yes,width=550,height=520");
				return true;
		})

		/*Animação para o perfil do colunista*/

		$('#col_perfil_foto').hover(

		function () {
				$(this).find('#col_perfil_info').stop(true, true).fadeIn()
		}, function () {
				$(this).find('#col_perfil_info').stop(true, true).fadeOut()
		})

		var $infograficoEsporte = $('.infograficoEsporte');
		if ($infograficoEsporte.size() > 0) {
				var script = document.createElement('script');
				script.type = 'text/javascript';
				script.src = 'http://www.band.com.br/js/infografico_chances.js';
				$("body").append(script);
				//$("body").append( '<script id="scriptInfografico" type="text/javascript" src="http://www.band.com.br/js/infografico_chances.js"></script>');
				$("body").append('<link rel="stylesheet" href="http://www.band.com.br/css/estilo_infografico_chances.css">');
		}

})
