
jQuery.noConflict();

jQuery.ajaxSetup({ 
  'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript")}
});


// Always send the authenticity_token with ajax
jQuery.ajaxSetup({ data: { authenticity_token : AUTH_TOKEN }})

jQuery(document).ready(function($){
   $("a.buy").click(function() {
	 var rel = this.rel;
     $.post(rel, null, null, "script");
     return false;
   });
 });

jQuery(document).ready(function($){
   $("a.delete").click(function() {
     var rel = this.rel;
     $.post(rel, {"_method": "delete"}, null, "script");
     return false;
   });
 });