/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/* SKIN: sistema usa seguintes arquivos:
 *  - control/system.php (metodo ajax)
 *  - js/skin.js
 *  - control/include/skin.php
 */

function troca_odm(url, obj, numero){

//   wxmodal.startLoading('Carregando');

	//alert("site_url: " + site_url);

	if (typeof(numero) != 'undefined') {
		var odm = numero;
	}
	else {
	    var odm = $(obj).attr('odm');
	}

    // Envia informação para AJAX
    $.ajaxSetup({async: true, cache: false});

    var arg = {};
    arg.odm = odm;
    $.post(url, arg);

    // Altera CLasses
    $('#topo-barra').removeClass().addClass("odm"+odm);
    $('#footer-aux').removeClass().addClass("footer-odm"+odm);   

	// Carrega o HTML do topo:

    $("#all #header #header-odm").fadeOut("fast", function(){
        $("#topo-odm").load(site_url + "odm" + odm, function(){
            $("#all #header #header-odm").fadeIn("fast");
        });        
    });
}
