$(document).ready(function() {

    //FLOAT DE COLUNAS
    $(".colunas div:nth-child(4n)").css("clear", "both");
    $(".colunas-1 div:nth-child(5n)").css("clear", "both");
    $(".colunas-2 div:nth-child(3n)").css("clear", "both");

    $(".colunas-3 div:nth-child(3n)").css("clear", "both");
    $(".colunas-3 div:nth-child(2n)").css("background", "none");
    $(".colunas-3 div:last-child").css("background", "none");

    //SITEMAP
    $('.wrap_boxes_map dl:nth-child(5n)').css('margin', '0 0 15px 0').after("<div class=\"clear\"></div>");
    $('.wrap_boxes_map:last-child').css('border-bottom', 'none');

    //FLYBANNER
    $('#bt_fecha').click(function() {
        $('#wrap_fly-banner').fadeOut();
    });

    //FANCYBOX
    $("a[rel=fancyBox]").fancybox();

    //WEBMAIL
    $('.webmail_email').focus(function() {
        if ($(this).val() == 'email@pblopes.com.br') {
            $(this).val('');
        }
    });

    $('.webmail_email').blur(function() {
        if ($(this).val() == '') {
            $(this).val('email@pblopes.com.br')
        }
    });

    $('.webmail_senha').focus(function() {
        if ($(this).val() == 'inserirsenha') {
            $(this).val('');
        }
    });

    $('.webmail_senha').blur(function() {
        if ($(this).val() == '') {
            $(this).val('inserirsenha')
        }
    });

    //MENU
    $('#menu_top li:last-child').addClass('last_li');
    $('#menu_top li').hover(function() {
        $(this).addClass('hover');
        $(this).find('ul').show();
    }, function() {
        $(this).removeClass('hover');
        $(this).find('ul').hide();
    })
    $('#menu_top li ul').addClass('sub_left');
    $('#menu_top li:last-child ul').removeClass('sub_left').addClass('sub_right');

    //CYCLE-BANNERS
    $('#slideshow_banners').cycle({
        fx: 'fade',
        speed: 4000,
        timeout: 2000,
        pager: '#nav_banners ul',
        activePagerClass: 'banner_ativo',
        pagerAnchorBuilder: function(idx, slide) {
            return '#nav_banners ul li:eq(' + (idx) + ') a';
        }
    });

    //NAV-BANNERS
    $('#nav_banners').prepend('<span class=\"corner_left\"></span>');
    $('#nav_banners ul li:last-child').css('border', 'none');
    $('#nav_banners ul li a').addClass('dotted_link');
    $('#nav_banners').append('<span class=\"corner_right\"></span>', '<div class=\"clear\"></div>');

    //DESTAQUES
    $('#up_dotted_dests dl:nth-child(3)').css('margin', 0);
    $('#down_dests dl:nth-child(3)').css('margin', 0);

    //RODAPE
    $('.links_footer a').addClass('dotted_link');
    $('#wrap_footer p:last-child').css('margin-top', '5px');



    var col3 = $('.wrap_cont_int').height();
    $('#int_col_3').css('min-height', col3);

    //OPT-TAMANHO
    $('#cont_opts ul li:first-child a').addClass('menos_letra');
    $('#cont_opts ul li:last-child a').addClass('mais_letra');

    $('.cms_text p font').attr('size', 2);

    $('#cont_opts ul li:nth-child(1) a').click(function() {
        $('.cms_text p font').attr('size', 2);
        $('.cms_text p font span').removeClass('normal_size');
        $('.cms_text p font span').removeClass('more_size');
        $('.cms_text p font span').addClass('less_size');
        $('.cms_text').addClass('less_size');
        var letra = $(this).parent().parent().parent().parent().parent().find('div:nth-child(2)')
        $(this).addClass('ativo');
        $('#cont_opts ul li:nth-child(2) a').removeClass('ativo');
        $('#cont_opts ul li:nth-child(3) a').removeClass('ativo');
        $(letra).removeClass('normal_size');
        $('#int_col_3 p').removeClass('normal_size');
        $(letra).removeClass('more_size');
        $('#int_col_3 p').removeClass('more_size');
        $(letra).addClass('less_size');
        $('#int_col_3 p').addClass('less_size');
        $('#tit_opts h1').removeClass('normal_size');
        $('#tit_opts h1').removeClass('more_size');
        $('#tit_opts h1').addClass('less_size');
    }); ;

    $('#cont_opts ul li:nth-child(2) a').click(function() {
        $('.cms_text p font').attr('size', 3);
        $('.cms_text p font span').removeClass('less_size');
        $('.cms_text p font span').removeClass('more_size');
        $('.cms_text p font span').addClass('normal_size');
        var letra = $(this).parent().parent().parent().parent().parent().find('div:nth-child(2)')
        $(this).addClass('ativo');
        $('#cont_opts ul li:nth-child(1) a').removeClass('ativo');
        $('#cont_opts ul li:nth-child(3) a').removeClass('ativo');
        $(letra).removeClass('less_size');
        $('#int_col_3 p').removeClass('less_size');
        $(letra).removeClass('more_size');
        $('#int_col_3 p').removeClass('more_size');
        $(letra).addClass('normal_size');
        $('#int_col_3 p').addClass('normal_size');
        $('#tit_opts h1').removeClass('less_size');
        $('#tit_opts h1').removeClass('more_size');
        $('#tit_opts h1').addClass('normal_size');
    }); ;

    $('#cont_opts ul li:nth-child(3) a').click(function() {
        $('.cms_text p font').attr('size', 4);
        $('.cms_text p font span').removeClass('less_size');
        $('.cms_text p font span').removeClass('normal_size');
        $('.cms_text p font span').addClass('more_size');
        var letra = $(this).parent().parent().parent().parent().parent().find('div:nth-child(2)')
        $(this).addClass('ativo');
        $('#cont_opts ul li:nth-child(1) a').removeClass('ativo');
        $('#cont_opts ul li:nth-child(2) a').removeClass('ativo');
        $(letra).removeClass('less_size');
        $('#int_col_3 p').removeClass('less_size');
        $(letra).removeClass('normal_size');
        $('#int_col_3 p').removeClass('normal_size');
        $(letra).addClass('more_size');
        $('#int_col_3 p').addClass('more_size');
        $('#tit_opts h1').removeClass('less_size');
        $('#tit_opts h1').removeClass('normal_size');
        $('#tit_opts h1').addClass('more_size');
    }); ;

    //BT-INDIQUE
    $('.bt_indique').click(function() {
        if ($('#box_indique').is(':visible')) {
            $(this).removeClass('ativo');
            $('#box_indique').fadeOut();
        } else {
            $(this).addClass('ativo');
            $('#box_indique').fadeIn();
        }
    });


    $('.email_amigo').focus(function() {
        if ($(this).val() == 'e-mail do seu amigo') {
            $(this).val('');
        }
    });

    $('.email_amigo').blur(function() {
        if ($(this).val() == '') {
            $(this).val('e-mail do seu amigo')
        }
    });

    $('.nome_amigo').focus(function() {
        if ($(this).val() == 'nome do seu amigo') {
            $(this).val('');
        }
    });

    $('.nome_amigo').blur(function() {
        if ($(this).val() == '') {
            $(this).val('nome do seu amigo')
        }
    });

    $('.email_user').focus(function() {
        if ($(this).val() == 'seu e-mail') {
            $(this).val('');
        }
    });

    $('.email_user').blur(function() {
        if ($(this).val() == '') {
            $(this).val('seu e-mail')
        }
    });

    $('.nome_user').focus(function() {
        if ($(this).val() == 'seu nome') {
            $(this).val('');
        }
    });

    $('.nome_user').blur(function() {
        if ($(this).val() == '') {
            $(this).val('seu nome')
        }
    });

    //GALERIA-TROCA-IMAGENS
    $('.wrap_thumbs li a').click(function() {
        var img = $(this).find('img').attr('src');
        $('.wrap_zoom a').attr('href', img);
        $('.wrap_zoom a img').attr('src', img);
    });
    //GALERIA-ULTIMA-MINIATURA
    $('.wrap_thumbs li:last-child').css('margin', '0');

    //GALERIA-SCROLL
    $('.wrap_thumbs').jScrollPane();

    //FORMULARIO-DE-CONTATO
    $('#form_cont tr td').attr('valign', 'top');

    //PRESS-RELEASES
    $('#wrap_releases dl:first-child').css('border-top', 'none');
    $('#wrap_releases dl:last-child').css('border-bottom', 'none');

    //BUSCA
    $('.item_busca div').hover(function() {
        $(this).addClass('ativo');
    }, function() {
        $(this).removeClass('ativo');
    });

    $('.item_busca div').click(function() {
        if ($('.item_busca ul').is(':visible')) {
            $(this).parent().find('ul').hide();
        } else {
            $(this).parent().find('ul').show();
        }
    });

    $('.item_busca ul').jScrollPane();
    $('.item_busca ul').css('display', 'none');

    $('.item_busca ul li:last-child').css('border', 'none');

    $('.item_busca ul li').hover(function() {
        $(this).addClass('hover');
    }, function() {
        $(this).removeClass('hover');
    });

    //USADOS
    $('#wrap_usados_dests div:nth-child(2)').css('margin', '0 20px');
    $('#wrap_usados_dests div dl dd:last-child').prev().css('background', 'none');
    $('#wrap_usados_dests div dl dd:last-child').addClass('last_det');


    //BUSCA-USADOS
    $('#wrap_resultados dl:first-child').css('border-top', 'none');
    $('#wrap_resultados dl:last-child').css('border-bottom', 'none');
    $('#wrap_resultados dl dd span:first-child').css('margin', '0 3px 0 0');
    $('#wrap_resultados dl dt').next().addClass('desc_usado');

    //DETALHES-USADOS
    $('#det_gallery ul li:nth-child(4n)').css('margin', '0');
    $('#det_gallery ul li:nth-child(5n)').css('clear', 'both');
    $('#det_gallery ul li a').click(function() {
        var gal_det = $(this).find('img').attr('src');
        $('#gallery_zoom a').attr('href', gal_det);
        $('#gallery_zoom a img').attr('src', gal_det);
    });

    $('#det_txt dl dd:last-child').addClass('last_det_usado');

    //MENU-LATERAL
    jQuery.fn.exists = function() { return jQuery(this).length > 0; }

    //CHAMADA
    $('#wrap_chamada div.chamadas:nth-child(2n)').after("<div class=\"clear\"></div>")

    $.extend({
        getUrlVars: function() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        },
        getUrlVar: function(name) {
            return $.getUrlVars()[name];
        }
    });

    if (typeof PageMethods != 'undefined') {
        PageMethods.getPageLevels(definirMenu, onAjaxFailed);
    }

    /*    var local = $.getUrlVar('Menu');
    if (local) {
    var localTemp = local.split(',');
    var nvl1 = localTemp[0];
    var nvl2 = localTemp[1];
    var nvl3 = localTemp[2];
    var posNav = '#nav' + nvl1 + ' > dd';
    var nvlNav = posNav + ' dl dd.nvl' + nvl2;
    var lnkNav = nvlNav + ' ul li.opt' + nvl3 + ' a';

        $(posNav).show();
    $(posNav).parent().find('> dt').find('span.fechado').hide();
    $(posNav).parent().find('> dt').find('span.aberto').show();
    $(nvlNav).show();
    $(nvlNav).parent().find('dt').find('span.fechado').hide();
    $(nvlNav).parent().find('dt').find('span.aberto').show();
    $(lnkNav).css('color', '#d0ad53');
    }*/

    $('dl.item_cat > dt a, dl.item_cat dd dl dt a').click(function() {
        var elAberto = $(this).parents('dt').find('> span.aberto');
        var elFechado = $(this).parents('dt').find('> span.fechado');
        var el1DD = $(this).parent().parent().find('> dd');

        if ($(this).parent().parent().find('> dd').is(':visible')) {
            elAberto.fadeOut();
            elFechado.fadeIn();
            el1DD.hide();
        } else {
            if ($(this).parent().parent().find('> dd').exists()) {
                elAberto.fadeIn();
                elFechado.fadeOut();
                el1DD.show();
            }
        }
    });

    //ALTERACOES-19-05-2011
    //$('.duas-colunas div.wrap-box-colunas3:last-child').css({ 'background': 'none', 'margin': '0' });
    //$('.duas-colunas div.wrap-texto-imagem-direita:nth-child(2n)').css('margin', '0 0 20px 0');
    //$('#colunas div.wrap-box-colunas:last-child').css({ 'background': 'none', 'margin': '0' });

});

//FECHA-BUSCA
$(document).click(function(e) {
    var el = $('.item_busca ul');
    var t = $(e.target);

    if (t.parents('.item_busca').html() == null && el.is(':visible') && e.target.id != ".item_busca div span") {
        if (t.attr('id') != "item_busca") {
            el.hide();
        }
    }
});

////FECHA-NDIQUE
$(document).click(function(e) {
    var el = $('#wrap_indique div');
    var t = $(e.target);

    if (t.parents('#wrap_indique').html() == null && el.is(':visible') && e.target.id != "#wrap_indique a") {
        if (t.attr('id') != "wrap_indique") {
            el.fadeOut();
        }
    }
});

/*------ MASK -------*/

function CarregarMascaras() {
    $(".tel_mask").mask("(99) 9999-9999", { placeholder: " " });
    $(".date_mask").mask("99/99/9999", { placeholder: " " });
    $(".cep_mask").mask("99999-999", { placeholder: " " });
    $(".CPF_mask").mask("999.999.999-99", { placeholder: " " });
    $(".CNPJ_mask").mask("99.999.999/9999-99", { placeholder: " " });
}

/*---- CARREGAR JS COM POSTBACK -----*/
function scroll() {
    $('.wrap_thumbs').jScrollPane();
}

function RecarregarScripts() {

    //FANCYBOX
    $("a[rel=fancyBox]").fancybox();

    //WEBMAIL
    $('.webmail_email').focus(function() {
        if ($(this).val() == 'email@pblopes.com.br') {
            $(this).val('');
        }
    });

    $('.webmail_email').blur(function() {
        if ($(this).val() == '') {
            $(this).val('email@pblopes.com.br')
        }
    });

    $('.webmail_senha').focus(function() {
        if ($(this).val() == 'inserirsenha') {
            $(this).val('');
        }
    });

    $('.webmail_senha').blur(function() {
        if ($(this).val() == '') {
            $(this).val('inserirsenha')
        }
    });

    //MENU
    $('#menu_top li:last-child').addClass('last_li');
    $('#menu_top li').hover(function() {
        $(this).addClass('hover');
        $(this).find('ul').show();
    }, function() {
        $(this).removeClass('hover');
        $(this).find('ul').hide();
    })
    $('#menu_top li ul').addClass('sub_left');
    $('#menu_top li:last-child ul').removeClass('sub_left').addClass('sub_right');

    //CYCLE-BANNERS
    $('#slideshow_banners').cycle({
        fx: 'fade',
        speed: 'slow',
        timeout: 2000,
        pager: '#nav_banners ul',
        activePagerClass: 'banner_ativo',
        pagerAnchorBuilder: function(idx, slide) {
            return '#nav_banners ul li:eq(' + (idx) + ') a';
        }
    });

    //NAV-BANNERS
    $('#nav_banners').prepend('<span class=\"corner_left\"></span>');
    $('#nav_banners ul li:last-child').css('border', 'none');
    $('#nav_banners ul li a').addClass('dotted_link');
    $('#nav_banners').append('<span class=\"corner_right\"></span>', '<div class=\"clear\"></div>');

    //DESTAQUES
    $('#up_dotted_dests dl:nth-child(3)').css('margin', 0);
    $('#down_dests dl:nth-child(3)').css('margin', 0);

    //RODAPE
    $('.links_footer a').addClass('dotted_link');
    $('#wrap_footer p:last-child').css('margin-top', '5px');

    var col3 = $('#wrap_cont_int').height();
    $('#int_col_3').css('min-height', col3);

    //OPT-TAMANHO
    $('#cont_opts ul li:first-child a').addClass('menos_letra');
    $('#cont_opts ul li:last-child a').addClass('mais_letra');

    $('#cont_opts ul li:nth-child(1) a').click(function() {
        var letra = $(this).parent().parent().parent().parent().parent().find('div:nth-child(2)')
        $(this).addClass('ativo');
        $('#cont_opts ul li:nth-child(2) a').removeClass('ativo');
        $('#cont_opts ul li:nth-child(3) a').removeClass('ativo');
        $(letra).removeClass('normal_size');
        $('#int_col_3 p').removeClass('normal_size');
        $(letra).removeClass('more_size');
        $('#int_col_3 p').removeClass('more_size');
        $(letra).addClass('less_size');
        $('#int_col_3 p').addClass('less_size');
    });

    $('#cont_opts ul li:nth-child(2) a').click(function() {
        var letra = $(this).parent().parent().parent().parent().parent().find('div:nth-child(2)')
        $(this).addClass('ativo');
        $('#cont_opts ul li:nth-child(1) a').removeClass('ativo');
        $('#cont_opts ul li:nth-child(3) a').removeClass('ativo');
        $(letra).removeClass('less_size');
        $('#int_col_3 p').removeClass('less_size');
        $(letra).removeClass('more_size');
        $('#int_col_3 p').removeClass('more_size');
        $(letra).addClass('normal_size');
        $('#int_col_3 p').addClass('normal_size');
    });

    $('#cont_opts ul li:nth-child(3) a').click(function() {
        var letra = $(this).parent().parent().parent().parent().parent().find('div:nth-child(2)')
        $(this).addClass('ativo');
        $('#cont_opts ul li:nth-child(1) a').removeClass('ativo');
        $('#cont_opts ul li:nth-child(2) a').removeClass('ativo');
        $(letra).removeClass('less_size');
        $('#int_col_3 p').removeClass('less_size');
        $(letra).removeClass('normal_size');
        $('#int_col_3 p').removeClass('normal_size');
        $(letra).addClass('more_size');
        $('#int_col_3 p').addClass('more_size');
    });

    //GALERIA-TROCA-IMAGENS
    $('.wrap_thumbs li a').click(function() {
        var img = $(this).find('img').attr('src');
        $('.wrap_zoom a').attr('href', img);
        $('.wrap_zoom a img').attr('src', img);
    });

    //GALERIA-ULTIMA-MINIATURA
    $('.wrap_thumbs li:last-child').css('margin', '0');

    //FORMULARIO-DE-CONTATO
    $('#form_cont tr td').attr('valign', 'top');

    //PRESS-RELEASES
    $('#wrap_releases dl:first-child').css('border-top', 'none');
    $('#wrap_releases dl:last-child').css('border-bottom', 'none');

    //BUSCA
    $('.item_busca div').hover(function() {
        $(this).addClass('ativo');
    }, function() {
        $(this).removeClass('ativo');
    });

    $('.item_busca div').click(function() {
        if ($('.item_busca ul').is(':visible')) {
            $(this).parent().find('ul').hide();
        } else {
            $(this).parent().find('ul').show();
        }
    });

    $('.item_busca ul').jScrollPane();
    $('.item_busca ul').css('display', 'none');

    $('.item_busca ul li:last-child').css('border', 'none');

    $('.item_busca ul li').hover(function() {
        $(this).addClass('hover');
    }, function() {
        $(this).removeClass('hover');
    });

    //USADOS
    $('#wrap_usados_dests div:nth-child(2)').css('margin', '0 20px');
    $('#wrap_usados_dests div dl dd:last-child').prev().css('background', 'none');
    $('#wrap_usados_dests div dl dd:last-child').addClass('last_det');


    //BUSCA-USADOS
    $('#wrap_resultados dl:first-child').css('border-top', 'none');
    $('#wrap_resultados dl:last-child').css('border-bottom', 'none');
    $('#wrap_resultados dl dd span:first-child').css('margin', '0 3px 0 0');
    $('#wrap_resultados dl dt').next().addClass('desc_usado');

    //DETALHES-USADOS
    $('#det_gallery ul li:last-child').css('margin', '0');
    $('#det_gallery ul li a').click(function() {
        var gal_det = $(this).find('img').attr('src');
        $('#gallery_zoom a').attr('href', gal_det);
        $('#gallery_zoom a img').attr('src', gal_det);
    });

    $('#det_txt dl dd:last-child').addClass('last_det_usado');

    //TAMANHO-DIVS-INT
    var borda = $('#int_col_right').height();
    $('#int_col_left').css('min-height', borda);

    //GALERIA-SCROLL
    scroll();

    //FECHA-BUSCA
    $(document).click(function(e) {
        var el = $('.item_busca ul');
        var t = $(e.target);

        if (t.parents('.item_busca').html() == null && el.is(':visible') && e.target.id != ".item_busca div span") {
            if (t.attr('id') != "item_busca") {
                el.hide();
            }
        }
    });

    //FECHA-NDIQUE
    /*$(document).click(function(e) {
    var el = $('#wrap_indique div');
    var t = $(e.target);

            if (t.parents('#wrap_indique').html() == null && el.is(':visible') && e.target.id != "#wrap_indique a") {
    if (t.attr('id') != "wrap_indique") {
    el.fadeOut();
    }
    }
    });*/
}

function Indique() {

    //BT-INDIQUE
    $('.bt_indique').click(function() {
        if ($('#box_indique').is(':visible')) {
            $(this).removeClass('ativo');
            $('#box_indique').fadeOut();
        } else {
            $(this).addClass('ativo');
            $('#box_indique').fadeIn();
        }
    });


    $('.email_amigo').focus(function() {
        if ($(this).val() == 'e-mail do seu amigo') {
            $(this).val('');
        }
    });

    $('.email_amigo').blur(function() {
        if ($(this).val() == '') {
            $(this).val('e-mail do seu amigo')
        }
    });

    $('.nome_amigo').focus(function() {
        if ($(this).val() == 'nome do seu amigo') {
            $(this).val('');
        }
    });

    $('.nome_amigo').blur(function() {
        if ($(this).val() == '') {
            $(this).val('nome do seu amigo')
        }
    });

    $('.email_user').focus(function() {
        if ($(this).val() == 'seu e-mail') {
            $(this).val('');
        }
    });

    $('.email_user').blur(function() {
        if ($(this).val() == '') {
            $(this).val('seu e-mail')
        }
    });

    $('.nome_user').focus(function() {
        if ($(this).val() == 'seu nome') {
            $(this).val('');
        }
    });

    $('.nome_user').blur(function() {
        if ($(this).val() == '') {
            $(this).val('seu nome')
        }

    });
}

function onAjaxFailed(error, userContext, methodName) {
    switch (methodName) {
        case "definirMenu":

            var local = $.getUrlVar('Menu');
            if (local) {
                var localTemp = local.split(',');
                var nvl1 = localTemp[0];
                var nvl2 = localTemp[1];
                var nvl3 = localTemp[2];
                var posNav = '#nav' + nvl1 + ' > dd';
                var nvlNav = posNav + ' dl dd.nvl' + nvl2;
                var lnkNav = nvlNav + ' ul li.opt' + nvl3 + ' a';

                $(posNav).show();
                $(posNav).parent().find('> dt').find('span.fechado').hide();
                $(posNav).parent().find('> dt').find('span.aberto').show();
                $(nvlNav).show();
                $(nvlNav).parent().find('dt').find('span.fechado').hide();
                $(nvlNav).parent().find('dt').find('span.aberto').show();
                $(lnkNav).css('color', '#d0ad53');
            }
            break;
    }
}

function definirMenu(result, userContext, methodName) {
    var local = result;
    if (local) {
        var localTemp = local.split(',');
        var nvl1 = localTemp[0];
        var nvl2 = localTemp[1];
        var nvl3 = localTemp[2];
        var nvl4 = localTemp[3];
        var nvl5 = localTemp[4];
        var nvl6 = localTemp[5];

        var posNav = '#nav' + nvl1 + ' > dd';
        var nvlNav = posNav + ' dl dd.nvl' + nvl2;
        var snvNav = nvlNav + ' dl dd.snv' + nvl3;
        var snv2Nav = snvNav + ' dl dd.snv2-' + nvl4;
        var snv3Nav = snv2Nav + ' dl dd.snv3-' + nvl5;
        var snv4Nav = snv3Nav + ' dl dd.snv4-' + nvl6;
        //var lnkNav = nvlNav + ' ul li.opt' + nvl3 + ' a';

        $(posNav).show();
        $(posNav).parent().find('> dt').find('span.fechado').hide();
        $(posNav).parent().find('> dt').find('span.aberto').show();

        $(nvlNav).show();
        //$(nvlNav).parent().find('dt').find('span.fechado').hide();
        //$(nvlNav).parent().find('dt').find('span.aberto').show();

        $(snvNav).show();
        //$(snvNav).parent().find('dt').find('span.fechado').hide();
        //$(snvNav).parent().find('dt').find('span.aberto').show();

        $(snv2Nav).show();
        //$(snv2Nav).parent().find('dt').find('span.fechado').hide();
        //$(snv2Nav).parent().find('dt').find('span.aberto').show();

        $(snv3Nav).show();
        //$(snv4Nav).parent().find('dt').find('span.fechado').hide();
        //$(snv4Nav).parent().find('dt').find('span.aberto').show();

        $(snv4Nav).show();
        //$(snv4Nav).parent().find('dt').find('span.fechado').hide();
        //$(snv4Nav).parent().find('dt').find('span.aberto').show();


        //$(lnkNav).css('color', '#d0ad53');
    }

    //alert(result);
    //alert(result.split(",")[1]);
    //alert(result.split(",")[0]);
}
