$(document).ready(function() {

    $("div[class^=LHDesple_CONTE_subtitulo]").filter(function(e) {
        $(this).bind("click", function() {
            if (($(this).parent().next("div.LHDesple_CONTE_modulo")).is(":hidden")) {
                $(this).parent().next("div.LHDesple_CONTE_modulo").slideDown("slow");
            } else {
                $(this).parent().next("div.LHDesple_CONTE_modulo").slideUp("slow");
            }
        })

        $(this).parent().next().find("div[class^=JER_botonFondo]").filter(function(m) {
            if (m != 0) {
                $(this).fadeTo(0, 0.5);
            }

            $(this).bind("click", function() {

                $(this).parent().parent().find("div[class^=JER_botonFondo]").fadeTo("fast", 0.5);

                $(this).fadeTo("fast", 1);

                $(this).parent().parent().parent().parent().parent().find("table[class=JER_TBL_programatica]").filter(function(n) {

                    if (n != m) {
                        this.style.display = "none";
                    } else {
                        this.style.display = "block";
                    }
                })
            })
        })

//        $(this).parent().next("div.LHDesple_CONTE_modulo").filter(function() {
//            if (e != 0) {
//                this.style.display = "none";
//            }
//        })

//        $(this).parent().next().children("table.JER_TBL_programatica").filter(function(n) {
//            if (n != 0) {
//                this.style.display = "none";
//            }
//        })
    })
})
