$.fn.swapit = function(a,b)
{
	return this.each(function()
	{
		var i = (new Image).src = a;
		var i2 = (new Image).src = b;
		// bind the mouseover and mouseout event to swap the images
		if($(this).get(0).tagName.toUpperCase() == "IMG")
		{
			$(this).mouseover(function()
			{
				$(this).src(a);
			}).mouseout(function()
			{
				$(this).src(b);
			});
		}else{
			$(this).mouseover(function()
			{
				c = "url(" + a + ")";
				$(this).css({"background-image":c});
			}).mouseout(function(){
				c = "url(" + b + ")";
				$(this).css({"background-image": c});
			});
		}
	});
}