var Plano=Class.create(ContentControler.prototype,
{
init:function(template,element,data){
this.sup(template,element,data,"init");
this.type="Plano";
this.externalInterface=null;
},
getSupportParameters:function(){
with(this){
var url=PessoaLogada==null
?URL_CADASTRO
:URL_UPGRADE,
planos=["bronze","prata","ouro"],
url_detalhe=window["URL_DETALHE_"+planos[data.Id-1].toUpperCase()],
p={
Link:url+'?p='+data.Id,
LinkDetalhes:url_detalhe,
Pontos:data.InformacoesVariaveis.TextoPontos,
Total:data.InformacoesVariaveis.TextoTotal,
Parcelas:data.InformacoesVariaveis.TextoParcelas
};
if($.getURLParam('convite')!=null){
p.Link+='&convite='+$.getURLParam('convite');
}
return p;
}
},
montar:function(){
with(this){
sup("montar");
!data.InformacoesVariaveis.UpgradeDisponivelParaPessoa&&$('#SpanUpgrade'+data.Id)!=null
&&$('#SpanUpgrade'+data.Id).toggleClass('overlayDisabled');
externalInterface!=null&&externalInterface.descricao!=null&&externalInterface.descricao.length>0
&&externalInterface.descricao.html(data.Descricao)
&&$('.bulletMore, .bt_seeMore').hide();
if(externalInterface!=null){
if(externalInterface.titulo!=null){
if(!$(externalInterface.titulo).hasClass('noPlanoReplace')){
externalInterface.titulo.text(data.Titulo);
externalInterface.subtitulo.text(data.Subtitulo);
XFlash.apply($(externalInterface.titulo).parent());
}
}
}
}
}
});
