﻿$(document).ready(function()
{

    //PNG fix 
    if ($.browser.msie && $.browser.version == '6.0')
    {
        jqPngFix();
    }

});


var shim = 'png-fix/blank.gif';

function jqPngFix() {
    try {
        //ie6 png transparency fix
        $.each($("img[src$=.png],img[src$=.PNG]"),
        function() 
        {
            var img = $(this);
            img.css({ "width": img.width(), "height": img.height(), "filter": "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.attr("src") + "', sizingMethod='scale')" });
            img.attr("src", shim);
        });
    } catch (e) {
        alert(e.description)
    }
}

function el_fnFixPng2() 
{
    if ($.browser.msie && $.browser.version == '6.0')
    {
        var src = $(this).attr("src");
        $(this).css("width", $(this).width() + "px");
        $(this).css("height", $(this).height() + "px");
        $(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + escape(src) + "', sizingMethod='scale')");

        $(this).data("src-cur", 1);
        $(this).data("src-type1", $(this).attr("src"));
        $(this).data("src-type2", $(this).attr('data-src'));

        $(this).attr("src", shim);
    }
};



 
