'end':'#ed6687' //cor final do gradiente do botao// }, 'border-color':'#ed6687' //cor de borda do botao com gradiente// }, 'flat':{ 'background-color':'#ed6687', //cor de fundo do botao sem gradiente// 'border-color':'#ed6687' //cor de borda do botao sem gradiente// } }, 'error':{ 'background-color':'#ffeeea' //cor fundo da caixa de erro// } }};AbrilIdWidgetSetup.initialize();function brincacomdiv(position) { if(position=="top") { var generalPositionLeftTop = Math.floor((screen.width/2)-16); var generalPositionTopTop = 90; document.getElementById("generalDiv").style.top = generalPositionTopTop+"px"; document.getElementById("generalDiv").style.left = generalPositionLeftTop+"px"; } else if(position=="bottom"){ var elemento = document.getElementById("chamaAbrilID").offsetTop; var generalPositionLeftBottom = Math.floor((screen.width/2)-280);//alert(generalPositionLeftBottom); var generalPositionTopBottom = elemento+120;//alert(generalPositionTopBottom); document.getElementById("generalDiv").style.top = generalPositionTopBottom+"px"; document.getElementById("generalDiv").style.left = generalPositionLeftBottom+"px"; } else { var elemento = document.getElementById("btComentario").offsetTop; var generalPositionLeftBottom = Math.floor((screen.width/2)-280);//alert(generalPositionLeftBottom); var generalPositionTopBottom = elemento+120;//alert(generalPositionTopBottom); document.getElementById("generalDiv").style.top = generalPositionTopBottom+"px"; document.getElementById("generalDiv").style.left = generalPositionLeftBottom+"px"; }}//document.getElementById("generalDiv").style.left = generalPosition+"px";widgetEventManager.listenTo('login:success', function(json){ //alert(json.person.avatar_url); setCookie("capricho_avatar",json.person.avatar_url,1); logado(); //$('#avatar').attr('src',json.person.avatar_url); reloadIframe('myframe'); });widgetEventManager.listenTo('facebook_login:success', function(json){ setCookie("capricho_avatar",json.person.avatar_url,1); logado(); reloadIframe('myframe'); });widgetEventManager.listenTo('accountCreation:success', function(json){ setCookie("capricho_avatar",json.person.avatar_url,1); logado(); reloadIframe('myframe'); });widgetEventManager.listenTo('profileActivation:success', function(json){ setCookie("capricho_avatar",json.person.avatar_url,1); logado(); reloadIframe('myframe'); });widgetEventManager.listenTo('logout:success', function(json){// renderProfileAttributeWidget('generalDiv',{'attributes':['cpf']}); setCookie("capricho_avatar","",1); logado(); reloadIframe('myframe'); });function reloadIframe(id){ try{ document.getElementById(id).src= arquivoReload; }catch(e){ window.frames[id].src= arquivoReload; }}$(document).ready(function() { logado();});function logado() { if(GetCookie("aapgPersonCookie") == null) { $("#chamaAbrilID").append("<h3><a href=\"javascript: void(0);\" onClick=\"brincacomdiv('bottom');renderLoginWidget('generalDiv',{'pointer':'ES'});\" class=\"btComentar\">Envie um Coment&aacute;rio</a></h3><div id=\"generalDiv2\"></div>"); document.getElementById("nomeusuario").innerHTML="<a href=\"javascript: void(0);\" onClick=\"brincacomdiv('top');renderLoginWidget('generalDiv',{'pointer':'SD'});\">Conectar-se com</a>\n"; document.getElementById("contextAbrilID").innerHTML="<a href=\"javascript: void(0);\" onClick=\"brincacomdiv('top');renderLoginWidget('generalDiv',{'pointer':'SD'});\"><img src=\"/v2011/css/i/txt_abrilID.png?v=0.3\" alt=\"Conectar-se com\" /></a>\n"; } else { $("#chamaAbrilID").empty(); var cookie = GetCookie("aapgPersonCookie"); cookie = eval('('+cookie+')'); nome = (cookie.personName); nomefinal=nome.split("+"); nome_usuario = nomefinal[0]+" "+nomefinal.pop(); var cookies = document.cookie; var inicio = cookies.indexOf('capricho_avatar'); var fim = cookies.indexOf(';',inicio); avatar_usuario = unescape(cookies.substring(inicio,fim).replace('capricho_avatar=','')); document.getElementById("nomeusuario").innerHTML="&hearts;&nbsp;Ol&aacute;, "+nome_usuario; document.getElementById("contextAbrilID").innerHTML="<a href=\"/meu-perfil/\" class=\"linktp\">&hearts;&nbsp;Editar perfil</a> <a href=\"/newsletter/\" class=\"linktp\">&hearts;&nbsp;Assinar newsletter</a> <a href=\"javascript: void(0);\" onClick=\"brincacomdiv('top');renderPasswordUpdateWidget('generalDiv',{'pointer':'SD'});\" class=\"linktp\">&hearts;&nbsp;Alterar a senha</a> <a href=\"javascript: void(0);\" onClick=\"brincacomdiv('top');renderLogoutWidget('generalDiv',{'pointer':'SD'});\" class=\"linktp\">&hearts;&nbsp;Logout</a>"; }} var numero_capas = $("#capas img").length;var capa_atual = "0";var capa_prox = "1";function alterna_capas(){ if (numero_capas > 1){ $('#capa'+capa_atual).hide(); $('#capa'+capa_prox).fadeIn('slow'); capa_atual = capa_prox; capa_prox = parseInt(capa_atual) + 1; if (capa_prox >= numero_capas) { capa_prox = "0"; } ativa_alteracao(); }}function ativa_alteracao() { var t = setTimeout("alterna_capas()",5000);}ativa_alteracao(); var addthis_config = {"data_track_clickback":true}; paginate(0,totalComentarios,'fwa');