//Luca Filosofi > {aSeptik} @gmail.com (c) '09
jQuery.noConflict();

jQuery(document).ready( function() {
jQuery(function() {
jQuery("a[id^='rater-']").click(function() {
      
      var match = this.id.match(/rater-(\d+)/); //catch the id
      
      var parameterString = jQuery(this).attr('href');  //get the values
      
      var query = 'action=ratings&query=' + parameterString; //php do the rest here!
      
      jQuery('#response-' + match[1]).hide();
      jQuery.ajax({
			type: 'POST', 
      url:  'http://ask.altervista.org/e107/e107_plugins/ratings/e_ajax.php', //send
      data: query,
			cache: false,
      complete: function(data){
      jQuery('#response-' + match[1]).html(data.responseText); //display ratings
		  jQuery('#response-' + match[1]).fadeIn(2000);
				
      },
      error: function(){
      alert('Error occured during Ajax request...' + query); //handle if error!
                    }
		});
		
	 return false;	
  });
});
});