(function($){
	$.fn.extend(
	{
		fixPng: function( gif_file, attr, noreplace )
		{
			if( navigator.appVersion.match('MSIE 6') )
			{
				if( typeof gif_file == "undefined" )
				{
					gif_file = "images/blank.gif";
				}
				
				if( typeof noreplace == "undefined" )
				{
					noreplace = "noreplace";
				}
				
				if( typeof attr == "undefined" )
				{
					attr = "rel";
				}
				
				$("img").each(function()
				{
					var src = $(this).attr("src");
					var width = $(this).attr("width");
					var height = $(this).attr("height");
					var atributo = $(this).attr(attr);
					
					if( typeof atributo == "undefined" )
					{
						atributo = "rel";
					}
					
					if (src.indexOf(".png") != -1 && atributo.indexOf(noreplace) == -1 )
					{
						$(this).attr("src", gif_file);
						$(this).attr("width", width);
						$(this).attr("height", height);
						$(this).css("filter","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ src + "',sizingMethod='scale')");
					}
				});
			}
		}
	});
})(jQuery);
