/**
 * My very own PNG fix Script
 */

 var clearImage = null;
 
window.addEvent('domready', function() {	
	
		//Only proceed on IE lower 7
	if (!window.ie || window.ie7) return;
	
		//Traverse the DOM for image Tags
	$$("img").each(function(item, index) {
							
		if (item.src.split(".").getLast() == "png") { // Apply filter if it's a png
		
				// Dimensions of the source file
			var imgSize = item.getSize();
			
				// Set the new properties
			item.setStyles("filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + item.src + "', sizingMethod='scale');");
			item.src = "clear.gif";
			
				// Extend the size of the gif, to the size of the source image
			item.height = imgSize.size.y;
			item.width = imgSize.size.x;
		}		
	});
});
