$.fn.hoverBg=function(bc,tc,i,r) {
	if ($.browser.msie) {
		$(this).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});
	} else {
		if ($(this).css('position')=='static') {
			console.warn('Check the parent container\'s CSS position.');
			$(this).hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});
		} else {
			$(this).append('<span class="hover" style="position:absolute;z-index:0;"></span>');
			if (i != undefined) $('span.hover',this).css('background','transparent url('+i+') no-repeat center top');
			if (i != undefined && r != undefined) $('span.hover',this).css('background','transparent url('+i+') repeat-'+r+' center top');
			if (bc != undefined && bc != '') $('span.hover',this).css('backgroundColor','#'+bc);
			if (tc != undefined && tc != '') $('span.hover',this).css('color','#'+tc);
			$(this).hover(
				function() {
					$('span.hover',this).stop().animate({opacity:1},500,'easeOutSine');
				},
				function() {
					$('span.hover',this).stop().animate({opacity:0},500,'easeOutExpo');
				}
			);
		}
	}
}
