each and binding functions

each and binding functions

Hi everyone, 
i'm trying to develop this plugin 
 
  1. ( function($) {
  2. $.fn.extend({
  3. imageSwapper: function( options ) {
  4. /*
  5. * some code
  6. */

  7. $(this).find('img.image-swapping').each(function(){
  8. $(this).fadeImageSwapped(options);
  9. });
  10. }
  11. });
  12. }) ( jQuery );

  13. ( function($) {
  14. $.fn.extend({
  15. fadeImageSwapped: function( options ) {
  16. alert($(this).attr("src"));
  17. }
  18. });
  19. }) ( jQuery );
The problem is that when i'm calling this
  1. $(this).fadeImageSwapped(options);
i obtain only one alert.
Can anyone help me understand this behaviour?
Thanks