jQuery.fn.pngfix = function() {
  //Path To clear.gif
  var clear = "/clear.gif";
 
  var imgs = $('*');
  var ip = /\.png/i;
  imgs.each(function() {
    var imgs = $(this).attr("src");
    if (imgs && imgs.match(ip) && !$(this).css("filter")) {
      $(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgs+"',sizingMethod='crop')");
      $(this).attr("src", clear);
    } else {
      if (!$(this).css("filter")) {
        var elb = $(this).css("background-image");
        if(elb.match(ip)) {
          var path = elb.split('"');
          var rep = ($(this).css("background-repeat") == 'no-repeat') ? 'crop' : 'scale';
          $(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')");
          $(this).css("background-image", 'none');
        }
      }
    }
  });
}
jQuery.fn.pngfiximg = function() {
  //Path To clear.gif
  var clear = "/clear.gif";
 
  var ip = /\.png/i;
  var imgs = $(this).attr("src");
  if (imgs && imgs.match(ip) && !$(this).css("filter")) {
    $(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgs+"',sizingMethod='crop')");
    $(this).attr("src", clear);
  } else {
    if (!$(this).css("filter")) {
      var elb = $(this).css("background-image");
      if(elb.match(ip)) {
        var path = elb.split('"');
        var rep = ($(this).css("background-repeat") == 'no-repeat') ? 'crop' : 'scale';
        $(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"',sizingMethod='"+rep+"')");
        $(this).css("background-image", 'none');
      }
    }
  }
}