";
                } else {
                    // Si es Facebook
                    var iframe = "
video facebook";
                }
            }
            $('#myModal').find('.modal-body').append(iframe);
            $("a.link_youtube").ntg_link_video();
            $('#myModal').modal('show');
            $('#myModal').on('hidden.bs.modal', function (e) {
                $('#myModal').find('.modal-body').empty();
            })
        }
    });
    // Portadilla de noticias: si son de otro canal, abrir en nueva pestaña con canal de origen 
    $(".otro-canal .recuadro .titulo").each(function () {
        var clases = $(this).attr("class").split(" ");
        if (clases[2] != "cid-" + __cid) {
            $(this).find("a").attr("target", "blank");
        }
    });
    // Validar si el recurso foto_portadilla esta incluido en el cuerpo simple del eidox
    if ($(".articulo > .cuerpo .binary-foto_marquesina").length > 0) {
        $(".articulo > .figure.binary-foto_marquesina").hide();
    }
    /******************
     ** PLACEHOLDER  **
     ******************/
    $(".form_text, .form_number").each(function () {
        var inp = $("input", this);
        //var val = $(inp).val();
        var ph = $("span.ntg-formulario-texto-derecha", this);
        var val = "";
        if (ph) {
            val = $(ph).html();
        }
        $(ph).remove();
        $(inp).attr("placeholder", val);
    });
    /******************
     ** ICONOS       **
     ******************/
    $(".usuario, .home, .password, .telefono, .movil , .direccion ,.email, .numero").each(function () {
        $(this).find("input").before("
");
        var clase = $(this).attr("class");
        if ($(this).hasClass("usuario")) {
            $(this).find("div.icon").html("
");
        } else if ($(this).hasClass("home")) {
            $(this).find(".icon").append("
");
        } else if ($(this).hasClass("password")) {
            $(this).find(".icon").append("
");
        } else if ($(this).hasClass("telefono")) {
            $(this).find(".icon").append("
");
        } else if ($(this).hasClass("movil")) {
            $(this).find(".icon").append("
");
        } else if ($(this).hasClass("direccion")) {
            $(this).find(".icon").append("
");
        } else if ($(this).hasClass("email")) {
            $(this).find(".icon").append("
");
        } else {
            $(this).find(".icon").append("
");
        }
        $(this).find("div.icon, input").wrapAll("
");
    });
    /*****************************************************
     ** Ingresar solo números para los campos numericos **
     *****************************************************/
    $(".form_number").keypress(function (e) {
        //if the letter is not digit then display error and don't type anything
        if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
            //display error message
            $("#errmsg").html("Digits Only").show().fadeOut("slow");
            return false;
        }
    });
    /*************************************************************************
     ** Quitar el código del texto en listado de departamentos y municipios  **
     **************************************************************************/
    $("#Lugar_residencia_1009__1 option").each(function () {
        var texto = $(this).text();
        $(this).text(texto.substring(5));
        $(this).attr("data-codigo", texto.substring(1, 3));
    });
    sortSelectOptions("#Lugar_residencia_1009__1");
    $("#Lugar_residencia_1009__1").change(function () {
        $("#Lugar_residencia_1009__2 option").each(function () {
            var texto = $(this).text();
            $(this).attr("data-codigo", texto.substring(1, 6));
            $(this).text(texto.substring(8));
        });
        sortSelectOptions("#Lugar_residencia_1009__2");
    });
    // img-responsive
    $(".img-fluid-cc img").css("width", "100%");
    $(".img-fluid-cc img").css("height", "auto");
    // abrir en nuevas pestañas
    $(".blank a").prop("target", "_blank");
    // agregar icono a los articulos
    $('#timeline .recuadro').each(function () {
        var clases = $(this).find(".titulo").prop("class").split(" ");
        var ids = clases[2].split("-");
        // $(this).prepend("
");
        $(this).prepend("
");
    });
    $('#timeline .recuadro:nth-child(2)').prepend("
2020
");
    $('#timeline .recuadro:nth-child(3)').prepend("
2019
");
    $('#timeline .recuadro:nth-child(4)').prepend("
2009
");
    $('#timeline .recuadro:nth-child(5)').prepend("
2008
");
    $('#timeline .recuadro:nth-child(6)').prepend("
2006
");
    $('#timeline .recuadro:nth-child(7)').prepend("
2001
");
    $('#timeline .recuadro:nth-child(8)').prepend("
1991
");
    // Slider imagenes Conoce misión tic
    if ($("#slider-conoce").length > 0) {
        // var clases = $("#slider-conoce")
        var slider_conoce = '
Actores clave
';
        $("#slider-conoce .figure").each(function () {
            var clases = $(this).attr("class").split(" ");
            var ancla = $(this).html();
            slider_conoce += '
';
        });
        slider_conoce += '
' +
            '      ' +
            '      
' +
            '      
' +
            '  
';
        $("#slider-conoce").empty();
        $("#slider-conoce").append(slider_conoce);
        var mySwiper = new Swiper('#slider-conoce .swiper-container', {
            slidesPerView: 1,
            spaceBetween: 30,
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            },
            breakpoints: {
                640: {
                    slidesPerView: 1,
                    spaceBetween: 20,
                },
                768: {
                    slidesPerView: 3,
                    spaceBetween: 40,
                },
                1024: {
                    slidesPerView: 3,
                    spaceBetween: 50,
                },
            }
        })
    }
    // Inicializar la galeria de publiaciones
    if ($("#galeria").length > 0){
        $("#galeria .img-fluid-cc a").colorbox({
            rel: 'group2',
            transition: "fade"
        });
    }
    // Inicializar la galeria de noticias
    if ($("#slider-noticias").length > 0) {
        var slider_n = '
';
        $("#slider-noticias .figure").each(function () {
            var clases_n = $(this).attr("class").split(" ");
            var link_n = $(this).find("a").prop("href");
            var img_n = $(this).find("img").attr("src");
            console.log(img_n);
            slider_n += '
';
        });
        slider_n += '
' +
            '      ' +
            '      
' +
            '      
' +
            '  
';
        $("#slider-noticias .img-fluid-cc a").colorbox({
            rel: 'group2',
            transition: "fade"
        });
    }
  //clases Bootstrap para boton
  
  $(".boton").addClass("btn btn-primary");
    //clases para dropdown de bootstrap en menu principal   
    $("#navbarSupportedContent > ul").addClass("navbar-nav");
    $("#navbarSupportedContent > ul > li").addClass("nav-item");
    $("#navbarSupportedContent > ul > li > ul").addClass("dropdown-menu");
    $("#navbarSupportedContent > ul > li > a.pvid-916131").parent().addClass("dropdown");
    $("#navbarSupportedContent > ul > li > a.pvid-916131").attr({
        'class': 'nav-link dropdown-toggle',
        'href': '#',
        'role': 'button',
        'data-bs-toggle': 'dropdown',
        'aria-expanded': 'false'
    });
  
    /************************************************************
     ** Validar anchors portadilla de Transparencia (reportes) **
     ************************************************************/
    if(window.location.hash.length > 0 ){
        console.log(window.location.hash);
        var  anchor = window.location.hash;
        switch(anchor){
            case "#map-country": var aid = "div#recuadros_articulo_13893 .recuadro .link_iframe.binary-recurso_2";
            break;
            case "#report4": var aid = "div#recuadros_articulo_13893 .recuadro .link_iframe.binary-recurso_7";
            break;
            case "#map-data": var aid = "div#recuadros_articulo_13893 .recuadro .link_iframe.binary-recurso_1";
            break;
            case "#report7": var aid = "div#recuadros_articulo_13893 .recuadro .link_iframe.binary-recurso_3";
            break;
            case "#report3": var aid = "div#recuadros_articulo_13893 .recuadro .link_iframe.binary-recurso_6";
            break;
            case "#registradores": var aid = "div#recuadros_articulo_14125";
            break;
            case "#timeline": var aid = "div#timeline";
            break;
            case "#publicpolitics": var aid = "div#recuadros_articulo_14129";
            break;
            case "#questions": var aid = "div#recuadros_articulo_14127";
            break;
        }
        $('html,body').animate({
            scrollTop: $(aid).offset().top - 120
        }, 'slow');
    }
  
  $("#recuadros_articulo_14125 .binary-foto_marquesina a").contents().unwrap();
  $("#recuadros_articulo_14125 .binary-foto_marquesina").css("color","transparent");
  
  if(typeof(__pvid) != "undefined"){
    
     if(__pvid == "198152" || __pvid == "960786"){
      $(".img-header-pa .titulo").addClass("text-white");
     }
  }
  
  //script para ajustar header de portadillas
  
  var bg_header = $(".img-header-pa").find(".recuadro img").attr("src");
  $(".img-header-pa .recuadro img").hide();
  $(".img-header-pa").css("background-image", "url("+ bg_header +")");
  
  
});
					-->