//v1.1005.31
(function(){
    if (!window.console || !console.firebug)
    {
        var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
        "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
    
        window.console = {};
        for (var i = 0; i < names.length; ++i)
            window.console[names[i]] = function() {}
    }
})();

/**
 * Created by: gustavo paes
 * Created on: Mar/2010
 * 
 * Executa as funções após o carregamento do markup.
 *
 * @param Function f  Função que deve ser executada
 **/
function runsAfterLoad(f) {
	if(document.readyState === "complete") {
		f.call(document);
	}
	else {
		if(typeof jQuery == "undefined") {
			if(window.addEventListener) {
				window.addEventListener("load", f, false);
			}
			else {
				window.attachEvent("onload", f);
			}
			return true;
		}
		else {
			jQuery(window).ready(f);
		}
	}

	return false;
}


function load(js) {
    runsAfterLoad(function() {
        var script = document.createElement("script");
        script.src = js;
        script.type = "text/javascript";
        script.async = "true";

        document.getElementsByTagName("head")[0].appendChild(script);
    });
}


