(function($) {

   $.fn.transictionto = function(options) {
      var settings = $.extend({
   }, options || {});
   //wrap into div if no div is present.
   $(this).each(function() {
      //now swap with background trick
      $(this)
      .parent()
		.attr("src", settings.destinationImage)
      .end()
      .fadeOut(1000, function() {
         this.src = settings.destinationImage;
         $(this).show();
      });
   });
};
})(jQuery);
$(function() {
	$('img').mouseenter(function() {
		if($(this).attr("id") === "#fb"){$('#fb').transictionto({ destinationImage: "./img/facebook.png" });}
		if($(this).attr("id") === "#tw"){$('#tw').transictionto({ destinationImage: "./img/twitter.png" });}
		if($(this).attr("id") === "#bl"){$('#bl').transictionto({ destinationImage: "./img/blog.png" });}
    });
	$('img').mouseleave(function(){
		if($(this).attr("id") === "#fb"){$('#fb').transictionto({ destinationImage: "./img/facebook2.png" });}
		if($(this).attr("id") === "#tw"){$('#tw').transictionto({ destinationImage: "./img/twitter2.png" });}
		if($(this).attr("id") === "#bl"){$('#bl').transictionto({ destinationImage: "./img/blog2.png" });}
	});
});
