// iepng.js
// --------
// If the user is using Win IE 5.5/6 then any image
// that has a PNG as its src attribute needs to have the
// AlphaImageLoader hack applied to it.
//
// @author: ian oxley
// @date: 16/04/2007

(function() {
    var isMSIE = /*@cc_on!@*/false;
    
    if (isMSIE) {
        var re = /^.*MSIE\s(\d\.\d).*$/i;
        var version = navigator.appVersion;
        var matches = version.match(re);
        if (matches && matches.length == 2) {
            var versionNo = parseFloat(matches[1]);
            
            if (versionNo && (versionNo >= 5.5 && versionNo <= 6.0)) {
                $(document).ready(function() {
//                    $('#content a>img[@src*=png], #content a>span>img[@src*=png], a>img[@src*=png], img[@src*=png]').each(function(i) {
                    $('img[@src*=png]').each(function(i) {
                        var origSrc = $(this).get(0).src;//attr('src');
//						alert(origSrc);
                        var filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + origSrc + "')";
                        $(this).get(0).src ="tpl/img/spacer.gif";//attr('src', 'tpl/img/spacer.gif')
                        $(this).get(0).runtimeStyle.filter = filter;//css('filter', filter);
//							alert($(this).attr('src'));
                    }); 
                });
            }
        }   
    }
})();