// deixa o png transparente no IE 6
$(document).ready(function(){ 
	$(document).pngFix(); 
}); 

// ORGAOS DO ESTADO
$(document).ready(function(){ 
    $("#list_orgaos select").change(function(){         
        $("#list_orgaos #botao_ok input").attr({ title: this.value });
    }); 
    $("#list_orgaos #botao_ok input").click(function(){ 
        location.href = this.title;
    }); 
});

/************************************************************

// Destaques do Governo
$(document).ready(function(){

	montaOptions();
	$("#destaquesGov").change(function(){
		if(this.value != "" || this.value != "0"){
			location.href = this.value;	
		}
	});

});

function xmlMicoxLoader(url){
	 //by Micox: micoxjcg@yahoo.com.br.				 
	 if(window.XMLHttpRequest){					 
		 var Loader = new XMLHttpRequest();
		 Loader.open("GET", url ,false);
		 Loader.send(null);
		 return Loader.responseXML;
	 }else if(window.ActiveXObject){
		 var Loader = new ActiveXObject("Msxml2.DOMDocument.3.0");
		 Loader.async = false;
		 Loader.load(url);
		 return Loader;
	 }
}	

var GOV_arrT= new Array();
var GOV_arrL= new Array();
function GOV_getNode(){
	var xmlNode = xmlMicoxLoader("http://testeplone.etice.ce.gov.br/portal_govce/destaques-do-governo/search_rss?SearchableText=destaques_do_governo");
	var objNodeList = xmlNode.getElementsByTagName("item");
	for(var i=0;i<objNodeList.length;i++){
		var objNode = objNodeList[i];
		if(objNode.nodeType == 1){//ignorar espaços em branco
			for(var j=0;j<objNode.childNodes.length;j++){
				var objNode2 = objNode.childNodes[j];
				if(objNode2.nodeType == 1){//ignorar espaços em branco
					if(objNode2.nodeName == "title") {
						if (objNode2.firstChild.nodeValue == ""){
							GOV_arrT[i] = objNode2.firstChild.nodeValue;							
						}
						else{
							GOV_arrT[i] = objNode2.firstChild.nodeValue;
						}
					}
					if(objNode2.nodeName == "link") {
						if (objNode2.firstChild.nodeValue == ""){
							GOV_arrL[i] = objNode2.firstChild.nodeValue;														
						}
						else{
							GOV_arrL[i] = objNode2.firstChild.nodeValue;
						}
					}
				}
			}
		}
	}	
}

function montaOptions(){
	GOV_getNode();
	for(var m=0; m<GOV_arrT.length;m++){	
		$("#destaquesGov").append('<option value="'+ GOV_arrL[m] +'">'+GOV_arrT[m]+'</option>');		
	}
	document.getElementById("destaquesGov").value = "0";
}

************************************************************/