
/*
* jQuery (PNG Fix) v1.2
* Microsoft Internet Explorer 24bit PNG Fix
*
* The MIT License
* 
* Copyright (c) 2007 Paul Campbell (pauljamescampbell.co.uk)
*/
(function(a) { a.fn.pngfix = function(b) { var e = this; var c = a.extend({ imageFixSrc: false, sizingMethod: false }, b); if (!a.browser.msie || (a.browser.msie && a.browser.version >= 7)) { return (e) } function d(h, j, k) { var g = h.attr("filters"); var i = "DXImageTransform.Microsoft.AlphaImageLoader"; if (g[i]) { g[i].enabled = true; g[i].src = j; g[i].sizingMethod = k } else { h.css("filter", "progid:" + i + '(enabled="true", sizingMethod="' + k + '", src="' + j + '")') } } function f(g) { if (g.css("width") == "auto" & g.css("height") == "auto") { g.css("width", g.attr("offsetWidth") + "px") } } return (e.each(function() { var i = a(this); if (i.attr("tagName").toUpperCase() == "IMG" && (/\.png/i).test(i.attr("src"))) { if (!c.imageFixSrc) { i.wrap("<span></span>"); var h = i.parent(); h.css({ height: i.height(), width: i.width(), display: "inline-block" }); d(h, i.attr("src"), "scale"); i.remove() } else { if ((/\.gif/i).test(c.imageFixSrc)) { f(i); d(i, i.attr("src"), "image"); i.attr("src", c.imageFixSrc) } } } else { var g = new String(i.css("background-image")); var j = g.match(/^url\("(.*)"\)$/); if (j && j.length) { f(i); i.css("background-image", "none"); var k = "crop"; if (c.sizingMethod) { k = c.sizingMethod } d(i, j[1], k); i.find("a").each(function() { a(this).css("position", "relative") }) } } })) } })(jQuery);