/**
 * jQuery (PNG Fix) v1.2
 * Microsoft Internet Explorer 24bit PNG Fix
 *
 * The MIT License
 * 
 * Copyright (c) 2007 Paul Campbell (pauljamescampbell.co.uk)
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * @param		Object
 * @return		Array
 */

(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("backgroundImage"));var j=g.match(/^url\("(.*)"\)$/);if(j&&j.length){f(i);i.css("backgroundImage","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);