$.fn.fixPNG = function() {
	return this.each(function () {
		var image = $(this).css('backgroundImage');
		if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
			image = RegExp.$1;
			$(this).css({
				'backgroundImage': 'none',
				'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')"
			}).each(function () {
				var position = $(this).css('position');
				if (position != 'absolute' && position != 'relative')
					$(this).css('position', 'relative');
			});
		}
	});
};

$.fn.fixPNG2 = function() {
	$(this).css({'backgroundImage': 'none'})
};

$(document).ready(function(){
	var isIE = ($.browser.msie && parseInt($.browser.version.substr(0,1)) < 8);
	if (isIE) {
		$(".png").fixPNG();
		$(".png2").fixPNG2();
	}
});
