// autoload-stuff
window.addEvent('domready', function() {
  
  // much more beautiful for anchors
  new SmoothScroll();
  // Finally we add PNG-Support for IE6 - mootools-style :-)
  // remembers the id, classes, alt and title tag of the image
  // and shows a cursor-hand if is contained in a link
  // does not affect background-pngs - do this in ie6.css instead
  if (window.ie6) {
    $$('img').each(function(i) {
      iSrc = i.getProperty('src');
      iWidth = i.getSize().size.x;
      iHeight = i.getSize().size.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;
      }
    });
  }
  
   if ($('searchformInput')) {
     $('searchformInput').addEvent('click', function(){
       $('searchformInput').setProperty('value', '')
     });
   }
  
});
