// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function rateParticipation(participation, rate) {
	new Ajax.Request('/participations/rate_it/'+participation, {asynchronous:true, evalScripts:true, parameters: 'value='+rate});
}

function sendFacebookNotification(name, company, url) {
	var attachment = {};
	var actionLinks = [{ "text": "Voter pour "+name, "href": ""+url+""},{ "text": "Pepper & Koffee", "href": "http://www.pepperkoffee.com"},{ "text": "B2See Events", "href": "http://www.b2see-events.com"}];
    
	FB.Connect.streamPublish("J'ai voté pour "+name+" de la société "+company+" sur Baratwork.be, venez m'aider et votez vous aussi ! "+url+"",  attachment, actionLinks, null, "Vous avez voté pour "+name+", faites-le savoir !");
}
