/*
	Class:    	dwFadingLinks
	Author:   	David Walsh
	Website:    http://davidwalsh.name
	Version:  	1.0.0
	Date:     	10/08/2008
	Built For:  jQuery 1.2.6
	
	modified to incorporate stop() and seperate duration settings for fadein and fadeout
	
*/

jQuery.fn.dwFadingLinks = function(settings) {
  
	settings = jQuery.extend({
		color: '#fff',
		backgroundColor: "#000",
		fadeInDuration: 500,
		fadeOutDuration: 500
	}, settings);
	
	return this.each(function() {
		var original = $(this).css('color');
		var originalBackground = $(this).css('background-color');
		$(this).mouseover(function() { 
		  $(this).stop().animate({ 
		    color: settings.color, 
		    backgroundColor: settings.backgroundColor 
		  },settings.fadeInDuration); 
		});
		$(this).mouseout(function() { 
		  $(this).stop().animate({ 
		    color: original, 
		    backgroundColor: originalBackground 
		  },settings.fadeOutDuration); 
		});
	});

};
