function votes(up_down,voteId,type)
{$("superbof_"+voteId).html("ok");$.ajax({url:'/json/votes',data:{up_down:up_down,vote_Id:voteId,type:type},dataType:'json',type:'post',success:function(response)
{if(response.success=="1"){var attachment={'name':response.name,'href':response.href,'caption':response.caption,'description':response.description,'media':[{'type':'image','src':response.img,'href':response.href}]}
$("#superbof_"+voteId).html(response.html);FB.Connect.ifUserConnected(FB.Connect.streamPublish(response.mind,attachment,null,null,'',stream_callback));}
else if(response.success=="-2"){msg="Erreur paramètre";if(data==-2){msg="Tu as déjà voté";}
$.prompt(msg,{buttons:{"   ":false},focus:-1});}else
alert(response.error);}});}
function stream_callback(post_id,exception){if(post_id){}}