/**
 * MooTools PNG transparency fix
 * Copyright (c) 2007 Cyril PONCE, <http://cyril.ponce.free.fr>, MIT Style License.
 * Version 0.1
 **/
function mooPngFix() {
	if(window.ie) {
		$$('img','src$=.png').each(function(el) { // search all .png images
			var $src = el.getProperty('src');
	        var $h = el.height;
	        var $w = el.width;
			var $id = (el.id) ? el.id : '';
			var $class = (el.className) ? el.className : '';
			var $title = (el.title) ? el.title : el.alt;
			var $align = (el.align) ? el.align : '';	
			var $cursor = (el.parentElement.href) ? 'hand' : '';
	        var $fix = new Element('span',
			{
	            'id': $id,
				'class': $class,
				'title': $title,
				'styles':
				{
			        'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=\'scale\', src=\''+$src+'\')',
		            'display': 'inline-block',
			        'height': $h + 'px',
			        'width': $w + 'px',
					'float': $align,
					'cursor' : $cursor	
				}
			});
	        el.replaceWith($fix); // replace the current img tag by the fix
		});
	}
}

window.addEvent('load', function() {
    mooPngFix(); // call the IE6 transparent PNG fix 
});