";
} else {
// Si es Facebook
var iframe = "
aaaa";
}
}
$('#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;
}
});
/*****************************************************
** Contador de caracteres máximo **
*****************************************************/
// // Nombres
// $('
<' + '/span>').insertAfter('#Nombres_div_1071 label');
// $('#Nombres_1071').limiter(120, $('#Nombres_1071_counter'));
// // Apellidos
// $(' <' + '/span>').insertAfter('#Apellidos_div_1071 label');
// $('#Apellidos_1071').limiter(120, $('#Apellidos_1071_counter'));
// // Número de documento
// $(' <' + '/span>').insertAfter('#Numero_documento_div_1071 label');
// $('#Numero_documento_1071').limiter(17, $('#Numero_documento_1071_counter'));
// // Correo electronico
// $(' <' + '/span>').insertAfter('#email_div_1071 label');
// $('#email_1071').limiter(100, $('#email_1071_counter'));
// // Edad
// $(' <' + '/span>').insertAfter('#Edad_div_1071 label');
// $('#Edad_1071').limiter(3, $('#Edad_1071_counter'));
// // Telefono
// $(' <' + '/span>').insertAfter('#Telefono_div_1071 label');
// $('#Telefono_1071').limiter(30, $('#Telefono_1071_counter'));
// // Dirección de residencia
// $(' <' + '/span>').insertAfter('#Direccion_div_1071 label');
// $('#Direccion_1071').limiter(220, $('#Direccion_1071_counter'));
// // Nombre de la red y/o organización de mujeres
// $(' <' + '/span>').insertAfter('#Nombre_organizacion_div_1071 label');
// $('#Nombre_organizacion_1071').limiter(255, $('#Nombre_organizacion_1071_counter'));
// // Nombre del gestor
// $(' <' + '/span>').insertAfter('#Nombre_gestor_div_1071 label');
// $('#Nombre_gestor_1071').limiter(250, $('#Nombre_gestor_1071_counter'));
/*****************************************************
** Valores por defecto en los selectores **
*****************************************************/
// Nivel educativo
// $("#Nivel_educativo_1071").val('Media');
// // Ocupación
// $("#Ocupacion_1071").val('Independiente');
// // Emprendimiento
// $("#Emprendimiento_1071").val('Ninguno');
// // Pertenece a alguna organización
// $("#Organizacion_mujeres_1071").val('NO');
// $("#Nombre_organizacion_div_1071").hide();
// // Discapacidad
// $("#Discapacidad_1071").val('Sin discapacidad');
// // Grupo étnico
// $("#Grupo_etnico_1071").val('Ninguna');
// // Comunidad vulnerable
// $("#Grupo_vulnerable_1071").val('Ninguna');
// // LGBTQ+
// $("#Comunidad_LGTBIQ_1071").val('NO');
// Abrir en nueva ventana el link de política de tratamiento de datos
// $("#Aviso_privacidad_div_1071 a").prop("target", "blank");
/*************************************************************************
** Quitar el código del texto en listado de departamentos y municipios **
**************************************************************************/
// $("#Lugar_residencia_1071__1 option").each(function () {
// var texto = $(this).text();
// $(this).text(texto.substring(5));
// $(this).attr("data-codigo",texto.substring(1,3));
// });
// sortSelectOptions("#Lugar_residencia_1071__1");
// $("#Lugar_residencia_1071__1").change(function () {
// $("#Lugar_residencia_1071__2 option").each(function () {
// var texto = $(this).text();
// $(this).attr("data-codigo",texto.substring(1,6));
// $(this).text(texto.substring(8));
// });
// sortSelectOptions("#Lugar_residencia_1071__2");
// });
if(typeof(__aid)!="undefined"){
if(__aid=="177828"){
$(".articulo .link_youtube .embed-responsive-16by9:nth-child(2)").hide();
}
}
if(typeof(__pvid)!="undefined"){
if(__pvid == "228055"){
$(".articulo h2").hide();
}
}
});
$(window).on("load", function () {
// Validar la miga de pan
if ($(".breadcrumb").length > 0) {
}
});
$(function () {
$(".blank a").prop("target","_blank");
});
//animacion imagenes
$(function() {
$("#section-01 .titulo").addClass('fadeInLeft animated');
$("#section-01 .imagen").addClass('fadeInRight animated');
});
$(window).scroll(function () {
if ($("#section-02").length > 0) {
if ($(window).scrollTop() + 300 > $("#section-02").offset().top) {
$("#section-02").addClass('fadeInUp animated');
}
}
if ($("#section-03 .recuadro:first-child").length > 0) {
if ($(window).scrollTop() + 300 > $("#section-03 .recuadro:first-child").offset().top) {
$("#section-03 .recuadro:first-child .link_youtube").addClass('fadeInRight animated');
$("#section-03 .recuadro:first-child .content").addClass('fadeInLeft animated');
}
}
if ($("#section-03 .recuadro:last-child").length > 0) {
if ($(window).scrollTop() + 300 > $("#section-03 .recuadro:last-child").offset().top) {
$("#section-03 .recuadro:last-child .link_youtube").addClass('fadeInLeft animated');
$("#section-03 .recuadro:last-child .content").addClass('fadeInRight animated');
}
}
if ($("#section-04").length > 0) {
if ($(window).scrollTop() + 300 > $("#section-04").offset().top) {
$("#section-04").addClass('fadeInUp animated');
}
}
});
-->