var Path = function(){
    var labels = {
        "motor":"http://www.casaemcasa.wsrun.net",
        "prefixo":"casa-em-casa",
//        "root":"http://www.casaemcasa.com.br/imoveis"
        "root":"http://"+window.location.hostname+"/imoveis"

    }
    if(window.location.hostname=='192.168.0.2'){
        labels={
            "motor":"http://motor",
            "prefixo":"casa-em-casa",
            "root":"http://192.168.0.2/wordpressmu/imoveis"
        }
    }

    function setPrefixo(prefixo){
        labels.prefixo = prefixo;
    }

    function getPrefixo(){
        return labels.prefixo;
    }

    function getMainRoot(){ return (labels.root);}

    function getRoot(){
        return (labels.root+"/"+getPrefixo());
    }

    return {
        // Define as variaveis
        setPrefixo  : setPrefixo,

        // Retorna as variaveis
        "motor"     : labels.motor,
        "prefixo"   : getPrefixo,
        "root"      : getRoot,
        "mainRoot"  : labels.root,
        getMainRoot : getMainRoot
    }
}();
