﻿function jqPngFix() {
    try {
        //ie6 png transperency fix
        $.each($("img[src$=.png],img[src$=.PNG]"), function () {
			if(!$(this).siblings("#jFlowSlide")){
				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","/wp-content/themes/h4hinitiative/images/blank.gif");
			}
        });
		$("body").find("*").each(function(){
			var bgIMG = jQuery(this).css('background-image');
			if(bgIMG.indexOf(".png")!=-1){
				var iebg = bgIMG.split('url("')[1].split('")')[0];
				jQuery(this).css('background-image', 'none');
				jQuery(this).get(0).runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + iebg + "',sizingMethod='scale')";
			}
		});
    } catch(e) {
        alert(e.description)
    }
}
