// autoload-stuff
window.addEvent('domready', function() {  

  
  // PNG-Support fuer den IE6 - mootools-style :-)
  // allerdings nur bei <img> fuer alles was background-image per CSS erhaelt
  // muss man diese in der css/ie6.css ueberschreiben, siehe beispiel
  if (Browser.Engine.trident4) {
    $$('img').each(function(i) {
      iSrc = i.getProperty('src');
      iWidth = i.getSize().x;
      iHeight = i.getSize().y;
      iID = i.getProperty('id');
      iClass = i.getProperty('class');
      iTitle = i.getProperty('title') + " " + i.getProperty('alt');
      iStyle = "display: inline-block; ";
      if (i.getParent().getProperty('href') !== "") {
        iStyle += "cursor: pointer; "
      }
      var iName = iSrc.toLowerCase();
      if (iName.substring(iName.length - 3, iName.length) == "png") {
        var strNewHTML = '<span id="' + iID + 
                        '" class="'+ iClass + 
                        '" title="' + iTitle +
                        '" style="' + iStyle +
                        'width: ' + iWidth + 
                        'px; height: ' + iHeight + 
                        'px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader' + 
                        "(src=\'" + iSrc + "\', sizingMethod='scale');\"></span>";
        i.outerHTML = strNewHTML;
      }
    });
  }
  
});
