jQuery.fn.loading = function(selector) {
  return this.each(function() {
    $(this).live('ajax:loading', function() {
      $(this).find(selector).addClass('loading');
    });
  });
};
