﻿(function(m) { jQ.fn.pngFix = function(c) { c = jQ.extend({ blankgif: 'blank.gif' }, c); var e = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1); var f = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1); if (jQ.browser.msie && (e || f)) { jQ(this).find("img[src$=.png]").each(function() { jQ(this).attr('width', jQ(this).width()); jQ(this).attr('height', jQ(this).height()); var a = ''; var b = ''; var g = (jQ(this).attr('id')) ? 'id="' + jQ(this).attr('id') + '" ' : ''; var h = (jQ(this).attr('class')) ? 'class="' + jQ(this).attr('class') + '" ' : ''; var i = (jQ(this).attr('title')) ? 'title="' + jQ(this).attr('title') + '" ' : ''; var j = (jQ(this).attr('alt')) ? 'alt="' + jQ(this).attr('alt') + '" ' : ''; var k = (jQ(this).attr('align')) ? 'float:' + jQ(this).attr('align') + ';' : ''; var d = (jQ(this).parent().attr('href')) ? 'cursor:hand;' : ''; if (this.style.border) { a += 'border:' + this.style.border + ';'; this.style.border = '' } if (this.style.padding) { a += 'padding:' + this.style.padding + ';'; this.style.padding = '' } if (this.style.margin) { a += 'margin:' + this.style.margin + ';'; this.style.margin = '' } var l = (this.style.cssText); b += '<span ' + g + h + i + j; b += 'style="position:relative;white-space:pre-line;display:inline-block;background:transparent;' + k + d; b += 'width:' + jQ(this).width() + 'px;height:' + jQ(this).height() + 'px;'; b += 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + jQ(this).attr('src') + '\', sizingMethod=\'scale\');'; b += l + '"></span>'; if (a != '') { b = '<span style="position:relative;display:inline-block;' + a + d + 'width:' + jQ(this).width() + 'px;height:' + jQ(this).height() + 'px;">' + b + '</span>' } jQ(this).hide(); jQ(this).after(b) }); jQ(this).find("*").each(function() { var a = jQ(this).css('background-image'); if (a.indexOf(".png") != -1) { var b = a.split('url("')[1].split('")')[0]; jQ(this).css('background-image', 'none'); jQ(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + b + "',sizingMethod='scale')" } }); jQ(this).find("input[src$=.png]").each(function() { var a = jQ(this).attr('src'); jQ(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + a + '\', sizingMethod=\'scale\');'; jQ(this).attr('src', c.blankgif) }) } return jQ } })(jQ);
