$(document).ready(function(){
	$(".menu_footer > ul li:last").css ("border-right", "none");
	$('#loja_virtual').mouseover(function(){
		$(this).addClass('img_btn_loja_breve')									  
	});
	$('#loja_virtual').mouseout(function(){
		$(this).removeClass('img_btn_loja_breve')									  
	});
});

function load_file(url, post, method, type){

	var c = null;
	//pageTracker._trackPageview(url);
	
	$.ajax({
		type: method,
		url: url,
		async: false,
		timeout: 2000,
		data: post,
        error: function(){alert('ERRO!');},
		dataType: type,
		success: function(data){c = data;}
	});
		
	return c;
}

function load_cidades(id){
	
	var c = load_file('ax_Cidades.asp?EstadoID=' + id, null, 'GET', 'xml');
	var obj = 'cboCidades';
	
	if(c != null){

		$('select[id*="' + obj + '"]').empty();
		
		$(c).find("cidade").each(function() {
			var id = $(this).attr("id");
			var nome = $(this).attr("nome");
			
			$('select[id*="' + obj + '"]').append('<option value="' + id + '">' + nome + '</option>');
		 });
	}
}

function load_cidades_in(id, ob){
	
	var c = load_file('ax_Cidades.asp?EstadoID=' + id + "&o=1", null, 'GET', 'xml');
	var obj = ob;
	
	if(c != null){

		$('select[id="' + obj + '"]').empty();
		
		$(c).find("cidade").each(function() {
			var id = $(this).attr("id");
			var nome = $(this).attr("nome");
			
			$('select[id*="' + obj + '"]').append('<option value="' + id + '">' + nome + '</option>');
		 });
	}
}

