<?php
include '../config.php';
$cookieDisclaimer = "";
if($lang == 'es'){
    $cookieDisclaimer = $textcookies;
    $textosearch = "Ingresa el término de búsqueda";
    $btnsearch = "Buscar";
    $linkaviso = "/cumplimiento?s=privacidad";
    $titulologin = "Acceso Clientes";
    $multipleslogins = "Se han detectado múltiples intentos de inicio de sesión incorrectos, por motivos de seguridad, intente nuevamente en unos minutos.";
    $subtitulologin = "Ingrese los datos de acceso";
    $recargar = "Recargar";
    $loginbutton = "Iniciar sesión";
    $textosolicitud = '¿No tiene cuenta? <a id="solicite" onclick="abreacceso();">Solicite un acceso.';
    $textopass = '¿Olvidó su contraseña? <a onclick="openPass();" style="color:#48aa42;" href="#">Solicite un enlace de recuperación';

    $textocodesolicitud ="Ingrese el código de seguridad enviado a su correo";
    $textocode = "Código";
    $textocodeenviar = "Ingresar";

    $titulorpassemail ="Reestablecer contraseña";
    $textorpassemail ="Ingrese el correo de usuario, recibirá un correo con un enlace temporal de recuperación";
    $textorpassemailenviar ="Solicitar enlace";



}

if($lang == 'en'){
    $cookieDisclaimer = $textcookiesen;
    $textosearch = "Enter your search term";
    $btnsearch = "Search";
    $linkaviso = "/en/compliance?s=privacy";
    $titulologin = "Clients Access";
    $multipleslogins = "Multiple unsuccessful login attempts have been detected, for safety reasons, please try again in a few minutes.";
    $subtitulologin = "Enter your access credentials";
    $recargar = "Reload";
    $loginbutton = "Login";
    $textosolicitud = "Don't have an account yet? ".'<a id="solicite" onclick="abreacceso();">Request an access.';
    $textopass = 'Forgot your password? <a onclick="openPass();" style="color:#48aa42;" href="#">Request a reset link';
    $textocodesolicitud ="Enter the security code sent to your email";
    $textocode = "Code";
    $textocodeenviar = "Enter";

    $titulorpassemail ="Reset Password";
    $textorpassemail ="Enter the user email, you will receive a message with a reset link.";
    $textorpassemailenviar ="Request link";
    

     


}
$intentoslogin = $_COOKIE['loginattempts'];

$curlpriv = curl_init();
curl_setopt_array($curlpriv, array(
    CURLOPT_URL => $endpoint_graph_cms,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{"query":"query MyQuery {\\r\\n  __typename\\r\\n  generalidadesSitioPrivado(stage: PUBLISHED, where: {id: \\"ckuwqltrkpenm0b788cug2f0d\\"}) {\\r\\n    id\\r\\n    dominiosPermitidos\\r\\n    firmasDigitales\\r\\n    titulo\\r\\n   avisoTexto\\r\\n   avisoImagen\\r\\n   avisoLink\\r\\n  avisoTextoBoton\\r\\n  imagenLateral\\r\\n    terminosYCondiciones\\r\\n  avisoTyC\\r\\n versionTyC\\r\\n  tituloSolicitudPrivado\\r\\n  textoSolicitudPrivado\\r\\n  localizations {\\r\\n      archivoIsin\\r\\n      dominiosPermitidos\\r\\n      firmasDigitales\\r\\n      titulo\\r\\n  avisoTexto\\r\\n   avisoImagen\\r\\n   avisoLink\\r\\n  avisoTextoBoton\\r\\n    imagenLateral\\r\\n       terminosYCondiciones\\r\\n avisoTyC\\r\\n  versionTyC\\r\\n  tituloSolicitudPrivado\\r\\n  textoSolicitudPrivado\\r\\n    }\\r\\n    archivoIsin\\r\\n  }\\r\\n}","variables":{}}',
    CURLOPT_HTTPHEADER => array(
      'Content-Type: application/json',
      'Cookie: __cfduid=da2693cdfd39b7377a8a05e305da45b8f1613001694'
    ),
  ));
  
$responsepriv = curl_exec($curlpriv);

curl_close($curlpriv);
//echo $responsepriv;



$jsonrespuestapriv = json_decode($responsepriv, true);
$id = $jsonrespuestapriv['data']['generalidadesSitioPrivado']['id'];

if($lang == 'es'){
   $tituloSolicitudprivado = $jsonrespuestapriv['data']['generalidadesSitioPrivado']['localizations'][0]['tituloSolicitudPrivado'];
   $textoSolicitudprivado = $jsonrespuestapriv['data']['generalidadesSitioPrivado']['localizations'][0]['textoSolicitudPrivado'];
    
}

if($lang == 'en'){

   $tituloSolicitudprivado = $jsonrespuestapriv['data']['generalidadesSitioPrivado']['tituloSolicitudPrivado'];
   $textoSolicitudprivado = $jsonrespuestapriv['data']['generalidadesSitioPrivado']['textoSolicitudPrivado'];

}
?>

<!-- Clients-->
<section id="ligas">
    <div class="container" style="background:#fff;">
        <div class="row enlacesinteres">
        <h5><?php if($lang=='es'){echo 'Ligas de interés';}else{
            echo 'Links of interest';
        }
        ?></h5>

        <div class="ligas">
        <?php 
            foreach ($array['data']['ligasDeInteres'] as $item) {
                echo '
                <div>
                    <a target="_blank" href="'.$item['link'].'"><img class="img-fluid d-block mx-auto" src="'.$cloudfront.$item['logotipo'].'" alt="" /></a>
                </div>
                ';
            }
            ?> 
        </div>


            
        </div>
    </div>
</section>
<!-- Footer-->
<footer class="footer bg-footer text-white text-left">
    <div class="container">
        <div class="row columnasfooter">
            <div class="col-md-4" id="colfooter1">
                <h6><?php echo urldecode($textoCol1);?></h6><br>
                <?php 
                    foreach ($array['data']['enlacesFooter'] as $item) {
                        if($item['columnaFooter'] == "Columna_1"){
                            
                            if($lang == 'en'){
                                echo '<a href="'.$item['link'].'">'.urldecode($item['tituloEnlace']).'</a><br><br>';
                            }

                            if($lang == 'es'){
                                foreach ($item['localizations'] as $subitem) {
                                    echo '<a href="'.$subitem['link'].'">'.urldecode($subitem['tituloEnlace']).'</a><br><br>';
                                }
                                
                            }
                        }
                    }
                ?> 
            </div>	
	
            <div class="col-md-4" id="colfooter2">
                <h6><?php echo urldecode($textoCol2);?></h6><br>
                <?php 
                    foreach ($array['data']['enlacesFooter'] as $item) {
                        if($item['columnaFooter'] == "Columna_2"){
                            
                            if($lang == 'en'){
                                echo '<a href="'.$item['link'].'">'.urldecode($item['tituloEnlace']).'</a><br><br>';
                            }

                            if($lang == 'es'){
                                foreach ($item['localizations'] as $subitem) {
                                    echo '<a href="'.$subitem['link'].'">'.urldecode($subitem['tituloEnlace']).'</a><br><br>';
                                }
                                
                            }
                        }
                    }
                ?> 
            </div>	
            <div class="col-md-4" id="colfooter3">
                <h6><?php echo urldecode($textoCol3);?></h6><br>
                <?php 
                    foreach ($array['data']['enlacesFooter'] as $item) {
                        if($item['columnaFooter'] == "Columna_3"){
                            
                            if($lang == 'en'){
                                echo '<a href="'.$item['link'].'">'.urldecode($item['tituloEnlace']).'</a><br><br>';
                            }

                            if($lang == 'es'){
                                foreach ($item['localizations'] as $subitem) {
                                    echo '<a href="'.$subitem['link'].'">'.urldecode($subitem['tituloEnlace']).'</a><br><br>';
                                }
                                
                            }
                        }
                    
                    }
                ?> 
            </div>
       	
            	
        </div>
        
        
        
    </div>
</footer>

<div class="container">
<div class="row align-items-center whitefooter">
            <div class="col-lg-4 col-md-4 direccion">
                <b><?php echo urldecode($copyright); ?></b><br>
                <?php echo urldecode($direccion); ?>
            </div>
            <div class="col-lg-3 col-md-3 redes">

            <?php 
                foreach ($array['data']['redesSociales'] as $item) {
                    echo '<a aria-label-tooltip="'.$item['nombre'].'" data-balloon-pos="up"  target="_blank" class="btn" href="'.$item['link'].'"><i class="'.$item['icono'].'"></i></a>';
                }
            ?>  
            </div>
            <div class="col-lg-3 col-md-3" style="text-align: center;">
                <a target="_blank" href="<?php echo $buzonLink; ?>" class="linkbuzon"><p class="textoBuzon"><img src="<?php echo $cloudfront.$buzonImagen; ?>" class="img-fluid imgbuzon"><?php echo urldecode($buzonTexto);?></p></a>
            </div>
            <div class="col-lg-2 col-md-2">
                <img src="<?php echo $cloudfront.$logoFooter; ?>" class="img-fluid logofooter">
            </div>
        </div>
</div>

<style>
<?php

if($lang == 'en'){
echo '#colfooter2{display:none;}';
echo '.cookieconsenten .cookiesen {display: none;}';
}

if($lang == 'es'){
    echo '.cookieconsent .cookieses {display: none;}';
    }

?>

div#modalSolicitud {
    padding: 5%;
}
.field-icon {
  float: right;
  margin-left: -25px;
  margin-top: -25px;
  position: relative;
  z-index: 2;
}
    .row.columnasfooter {
    padding: 30px 10px;
}
.ligas img {
    width: 90px;
    padding: 0;
    height: auto;
    object-fit: contain;
}
    .ligas {
        width: 100%;
    }
    section#ligas {
    padding: 30px 0;
    margin: 0;
    width:100%;
    display:inline-block;
}
    .redes {
        text-align: center;
    }
    .redes * {
        color: #2b4365;
    }

.row.enlacesinteres h5 {
    color: #2b4365;
    font-size: 15px;
    width: 100%;
    padding-top: 30px;
    padding-bottom: 0;
    margin: 0;
    padding: 20px 15px;
    text-align:left;
    /* float: left; */
}
    hgroup { 
        text-align:center;
        margin-top: 0;
    }
    .modal-title {
        margin-bottom: 0;
        line-height: 1.5;
        font-size: 30px;
        color: #2b4365;
        text-align: center;
        width: 100%;
    }
    .modal-body h1 {
        font-size: 15px;
    }
    .contactform {
        width: 100%;
        margin: 10px auto;
        padding: 3em 2em 2em 2em;
        background: #fafafa;
        /* min-width: 1500px; */
        border-radius: 10px;
        font-size: 12px;
        font-family: "Montserrat";
    }
    .contactform .group { 
        position: relative; 
        margin-bottom: 35px; 
    }

    .contactform input, .contactform textarea  {
        font-size: 18px;
        padding: 10px 10px 10px 5px;
        -webkit-appearance: none;
        display: block;
        background: #fafafa;
        color: #636363;
        width: 100%;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #757575;
    }

    .contactform input:focus { outline: none; }


    /* Label */

    .contactform label {
        color: #999; 
        font-size: 18px;
        font-weight: normal;
        position: absolute;
        pointer-events: none;
        left: 5px;
        top: 10px;
        transition: all 0.2s ease;
    }


    /* active */

    .contactform input:focus ~ label, .contactform input.used ~ label, .contactform textarea:focus ~ label, .contactform textarea.used ~ label  {
        top: -20px;
    transform: scale(.75); left: -2px;
        /* font-size: 14px; */
        color: #2b4365;
    }


    /* Underline */

    .contactform .bar {
        position: relative;
        display: block;
        width: 100%;
    }

    .contactform .bar:before, .contactform .bar:after {
        content: '';
        height: 2px; 
        width: 0;
        bottom: 1px; 
        position: absolute;
        background: #2b4365; 
        transition: all 0.2s ease;
    }

    .contactform .bar:before { left: 50%; }

    .contactform .bar:after { right: 50%; }


    /* active */

    .contactform input:focus ~ .bar:before, .contactform input:focus ~ .bar:after { width: 50%; }


    /* Highlight */

    .contactform .highlight {
        position: absolute;
        height: 60%; 
        width: 100px; 
        top: 25%; 
        left: 0;
        pointer-events: none;
        opacity: 0.5;
    }


    /* active */

    .contactform input:focus ~ .highlight {
        animation: inputHighlighter 0.3s ease;
    }


    /* Animations */

    @keyframes inputHighlighter {
        from { background: #2b4365; }
        to 	{ width: 0; background: transparent; }
    }


    /* Button */

    .contactform .button {
    position: relative;
    display: inline-block;
    padding: 12px 24px;
    margin: .3em 0 1em 0;
    width: 100%;
    vertical-align: middle;
    color: #fff;
    font-size: 16px;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
    text-align: center;
    letter-spacing: 1px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid #48aa42;
    cursor: pointer;
    transition: all 0.15s ease;
    }
    .contactform .button:focus { outline: 0; }


    /* Button modifiers */

    .contactform .buttonBlue {
    background: #2b4365;
    text-shadow: 1px 1px 0 #48aa42;
    }

    .contactform .buttonBlue:hover { background: #48aa42; }


    /* Ripples container */

    .contactform .ripples {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
    }


    /* Ripples circle */

    .contactform .ripplesCircle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    }

    .contactform .ripples.is-active .ripplesCircle {
    animation: ripples .4s ease-in;
    }

    .btn-primary {
        font-family: "Montserrat", sans-serif;
    }
    /* Ripples animation */

    @keyframes ripples {
    0% { opacity: 0; }

    25% { opacity: 1; }

    100% {
        width: 200%;
        padding-bottom: 200%;
        opacity: 0;
    }
    }

    p.textoBuzon {
        font-weight: bold;
        text-transform: uppercase;
        text-align: center;
        line-height: 1.3;
        font-size: 11px;
        color: #48aa42;
        padding-top: 10px;
    }
    p.textoBuzon span {
        color: #2b4365;
    }
    .img-fluid.imgbuzon {
        max-width: 35px;
        filter: invert(1);
        padding: 2.5px;
        margin-right: 5px;
    }
    .direccion {
        font-size: 12px;
        padding: 15px 0;
        padding-right:15px;
    }
    :root {
    --balloon-color:  #48aa42;
    }
    .whitefooter {
        margin-left: 0px;
    }
    .notif {
    width: 300px;
    position: fixed;
    background: rgba(255,255,255,.7);
    background-image: url(<?php echo $cloudfront.$imagenMarketData;?>);
    background-size: 50px;
    background-repeat: no-repeat;
    bottom: 150px;
    right: -300px;
    z-index: 999;
    transition: .35s all ease;
    height: 70px;
    padding: 10px;
    background-position: 10px;
    padding-left: 60px;
    /* top: 0; */
    border-radius: 10px 0 0 10px;
    box-shadow: 1px 2px 8px #dbdbdb;
    cursor:pointer;
}
    .notif.open {
        right: -230px;
    }
    .notif.open:hover {
        right: -100px;
    }
    .notif p {
        font-weight: bold;
        padding: 20px;
        font-size: 15px;
        font-family: "Montserrat";
    }
    .closenotif{
        position:absolute;
        right:10px;
        top:10px;
    }
    @media(max-width:768px){

        body, html{overflow-x:hidden;}
        #services .container {
            padding-top: 0px;
        }
                
        .whitefooter {
            padding: 15px;
        }
        .redes {
            text-align: center;
        }
        .redes a {
            font-size: 20px;
            padding: 0 15px;
        }
        .row.enlacesinteres h5 {
            padding: 20px;
        }
        .img-fluid.imgbuzon {
            width: 35px;
            vertical-align: middle;
            margin-top: -5px;
        }
        .textoBuzon {
            float: left;
            width: auto;
            margin-left: 10px;
        }
        p.textoBuzon {
            font-size: 13px;
            padding-top: 0;
            width: 100%;
            padding-bottom: 0;
            /* margin: 0; */
        }

        .direccion {
            font-size: 13px;
            padding:0;
            text-align: center;
        }


        .row.columnasfooter a {
            font-size: 13px;
        }
        .row.columnasfooter {
            margin-bottom: 20px;
            padding-bottom: 30px;
        }
    }
    p.errormsg {
        color: red;
    }
    p.successmsg {
        color: #03b703;
        text-align: center;
    }
    .slick-dots li button:before {
        font-family: 'slick';
        font-size: 6px;
        line-height: 20px;
        position: absolute;
        top: 0;
        left: 0;
        width: 7.5px;
        height: 7.5px;
        content: '•';
        text-align: center;
        opacity: .25;
        color: black;
        background: #2b4365;
        border-radius: 50%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    .slick-dots {
        bottom: -40px;
    }
    form.contactform .group {
        width: 50%;
        float: left;
        padding: 0 15px;
    }
    form.contactform .group.full {
        width: 100%;
        float: left;
        padding: 0 15px;
    }
    .modal-dialog {
        max-width: 900px;
        margin: 1.75rem auto;
    }
    div#searchpanel {
        position: fixed;
        width: 92.5%;
        max-width: 550px;
        top: 0;
        height: 100%;
        background: #fff;
        right: -100%;
        box-shadow: 1px 2px 15px #d1d1d1;
        z-index: 9999;
        padding: 30px;
        transition:.4s all ease;

    }
    div#searchpanel.opensearch {
        right: 0;

    }

    .searchinputcont {
        text-align: center;
        /* font-size: 12px; */
    }
    .searchinputcont {
        text-align: center;
        padding:0;
        display: inline-block;
        width: 100%;
        margin-bottom:15px;
    }
    .searchinputcont h3 {
        font-size: 15px;
        text-align: left;
        width: 100%;
        padding: 0 30px 0 0;
    }
    .searchinputcont input {
        width: 100%;
        height: 30px;
        border: 0;
        border-bottom: 1px solid #757575;
        margin-bottom: 20px;
    }
    .searchinputcont a {
        background: #2b4365;
        padding: 7.5px 30px;
        border-radius: 8px;
        color: #fff!important;
        font-weight: bold;
        font-size: 13px;
    }
    .btnsearch {
        background: #2b4365;
        padding: 7.5px 30px;
        border-radius: 8px;
        color: #ffffff!important;
        font-weight: bold;
        width: 100%;
        display: inherit;
        border: 1px solid #2b4365;
        font-family: "Montserrat";
        cursor:pointer;
        text-decoration:none;
        transition:.35s all ease;
        border:0;
    }

    .btnsearch:hover {
        background: #48aa42;
        text-decoration:none;
    }
    .searchinputcont input {
        width: 100%;
        height: 30px;
        border: 0;
        border-bottom: 1px solid #757575;
        outline: none;
        margin-bottom: 20px;
        padding: 5px;
        
    }
    p.errorsearch {
        text-align: center;
        font-size: 12px;
        color: #da1919;
    }
    .resultssearch {
        overflow-x: hidden;
        overflow-y: auto;
        max-height: 80vh;
        padding-bottom: 50px;
    }
    .result {
        background: #eeeeee;
        padding: 20px;
        font-size: 12px;
        display:inline-block;
        margin-bottom:20px;
        width:100%;
        /* line-height: 1.1; */
    }
    .result h6 {
        font-size: 14px;
    }

    .result p {
        line-height: 1.35;
        margin-bottom: 5px;
    }
    .result .btn {
        float: right;
        position: relative;
        margin-top: 0;
        font-size: 14px;
        width: 25%;
        padding: 5px;
        font-size: 13px;
        top:0;
    }
    .resultcont h3 {
        padding: 10px 0;
        font-size: 17.5px;
    }

    .resultcont {
        display:none;
    }
    span.counter {
        opacity: .5;
        font-size: 10px;
        padding-left: 0;
        width: 100%;
        display: inline-block;
    }
    .counter i {
        font-style: normal;
        opacity: 1;
        font-weight: bold;
        color: #28a745;
        font-size: 11px;
    }
    .sinresultados {
        margin-top: 10vh;
    }
    .sinresultados img {
        opacity: .2;
        width: 100px;
    }
    .sinresultados {
        text-align: center;
    }

    .sinresultados h4 {
        font-size: 12px;
        margin-top: 15px;
        opacity: .5;
    }
    .textresult{
        float: left;
        width: 70%;
    }

    .headresult.hasimg img {
        width: 40px;
        height: 40px;
        position: absolute;
        border: 2px solid  #28a745;
        border-radius: 50%;
        object-fit: cover;
        left: 0;
        top: 5%;
    }
    .headresult.hasimg {
        padding-left: 50px;
        position: relative;
        min-height:45px;
    }
    .result h6 span {
        color: #48aa42;
        font-size: 8px;
        text-transform: uppercase;
        display: inline-block;
        width: 100%;
        font-weight: normal;
        letter-spacing: 2px;
        text-align: left;
        position: relative;
        margin-bottom: 5px;
    }
    .lds-ripple {
        display: inline-block;
        position: relative;
        width: 80px;
        margin: 0 auto;
        height: 80px;
        margin-top: 10vh;
        margin-left: calc(50% - 40px);
    }
    .lds-ripple div {
    position: absolute;
    border: 4px solid #28a745;
    opacity: 1;
    border-radius: 50%;
    animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }
    .lds-ripple div:nth-child(2) {
    animation-delay: -0.5s;
    }
    @keyframes lds-ripple {
    0% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        top: 0px;
        left: 0px;
        width: 72px;
        height: 72px;
        opacity: 0;
    }
    }

    ul.textresult {
        padding-left: 15px;
    }
    .headresult.hasimg i {
        position: absolute;
        left: 0;
        top: 5%;
        width: 40px;
        height: 40px;
        border: 2px solid #f8f9fa;
        border-radius: 50%;
        text-align: center;
        padding: 7.5px;
        font-size: 20px;
        color: #fff;
        background: #2b4365;
        transition:.35s all ease;
    }


    .headresult.hasimg i:hover {
        background: #48aa42;
        transform:scale(1.1);
    }
    a.btnsearch i {
        padding-left: 20px;
    }
    select#searchfilters {
        border: 1px solid #ccc;
        width: 100%;
        height: 35px;
        color: #666;
        font-family: "Montserrat";
        font-size: 13px;
        padding: 5px;
        /* border-radius: 8px; */
        margin-top: 10px;
    }
    .zeynep-overlay {
        z-index: 9999;
    }
    .container.menumobile {
        z-index: 99999;
        box-shadow: 1px 2px 6px #e3e3e3;
        
    }
    .zeynep.opened {
        z-index: 99999;
    }
    div#searchpanel {
        z-index: 99999;
    }
    .cookies {
        position: fixed;
        bottom: -300px;
        z-index: 99;
        background: rgba(255, 255, 255, .9);
        box-shadow: 1px 2px 15px #ccc;
        font-size: 12px;
        padding: 30px 7.55%;
        transition: .5s all ease;
        width: 100%;
        max-width: 100vw;
    }
    .cookies .contbtn {
        width: 100%;
        display: inline-block;
    }
    a.closecookies.btncookies {
        background: #2b4365;
        color: #fff;
        padding: 5px 30px;
        font-weight: bold;
        font-size: 12px;
        cursor:pointer;
    }
    .cookies.closedcookies {
        bottom: -300px!important;
    }

    @media(max-width:700px){
        .notif {
            bottom: 200px;
        }
        .cookies {
            font-size: 10.5px;
            padding: 20px 20px;
            text-align: justify;
        }
        .redes {
            text-align: center;
            padding: 20px 0;
        }
        .row.enlacesinteres {
            text-align: center;
        }
        .textresult {
            float: left;
            width: 100%;
        }
        .result .btn {
            float: right;
            position: relative;
            margin-top: 10px;
            font-size: 14px;
            width: 50%;
            padding: 5px;
            font-size: 13px;
            margin-top: 10px!important;
            margin-bottom: 5px;
        }
        .result {
            background: #eeeeee;
            padding: 15px;
            font-size: 12px;
            display: inline-block;
            margin-bottom: 20px;
            width: 100%;
            /* line-height: 1.1; */
        }
        .headresult h6 {
            padding-top: 0!important;
        }
        div#searchpanel {
            padding: 15px;
        }
        .accordion .content {
        padding: 0;
    }
                        
    }

    .slick-prev:before, .slick-next:before {
        font-family: 'slick';
        font-size: 15px;
        line-height: 1;
        opacity: .5;
        color: #2b4365;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    .slick-dots li.slick-active button:before {
        content: "";
    }
    .carousel-caption h5 {
        color: #fff;
    }

    table tr:nth-child(even) td{
        background:#e6eff5;
    }
    table tr:nth-child(odd) td{
        background:#fff;
    }
    td, th, tr {
        border: 2px solid #fff;
        padding: 10px;
    }

    table th *, table tr:first-child * {
        font-weight: bold!important;
        font-family: "Montserrat", sans-serif!important;
        line-height: 1.4;
        color: #fff;
        background: #2b4365;
        margin:0;
    }
    table tr:first-child td {
        background: #2b4365;
        color:#fff;
    }
    table th {
        padding: 20px 10px!important;
    }
    table.bt tfoot th::before, table.bt tfoot td::before, table.bt tbody td::before {
        content: attr(data-th) ": ";
        display: inline-block;
        -webkit-flex-shrink: 0;
        -ms-flex-shrink: 0;
        flex-shrink: 0;
        font-weight: bold;
        min-width: 40%;
        color: #fff;
        padding-right: 20px;
        line-height: 1.2;
        background: #2b4365;
        padding: 10px;
        margin-left: -10px;
        margin-top: -10px;
        vertical-align: middle;
        font-family: "Montserrat", sans-serif;
        font-size: 13px;
    }
    span.bt-content {
        padding: 10px 15px;
        font-size: 12.5px;
    }
        
    ::-moz-selection { background:  #48aa42; color:#fff; }
    ::selection { background:  #48aa42; color:#fff;}

    .slick-dots li button:before {
        color: transparent!important;
    }
    nav#mainNav {
        background: #fff;
        padding-top: 15px;
        padding-bottom: 0;
    }

    .producto .page-section .container li {
        margin-left: 15px;
    }

    p.ampliafoto {
        display:none;
    }

    a.newfancy {
        border: 0 !important;
        margin-bottom: 10px;
        width: 100% !important;
        height: auto;
        padding: 0;
    }
    .newfancy::after {
        display: none;
    }
    .linea .ampliafoto {
        display: none;
    }
    .contprod h2 {
        margin-top: 20px;
    }

    #solicite{
        cursor: pointer;
        color: #48aa42;
    }
    div#respuestasolicitud .errormsg {
        width: 50%;
        display: inline-block;
        border-left: 3px solid #f12f2f;
        padding: 0 8px;
    }

    @media(max-width:950px){
    .page-section {
        padding-top: 80px;
        padding-bottom: 30px;
    }
    .textmision h4 {
        padding: 0 15px;
    }
    .title h4.text-left {
        text-align: center !important;
    }
    .gobierno .col-lg-4.img-int-01 {
        margin-top: 30px;
        margin-bottom: 30px;
    }
    }

    @media(max-width:700px){
        
        p.ampliafoto {
            text-align: center;
            font-size: 10px;
            padding: 10px;
            color:  #48aa42;
            display:inline-block;
            width:100%;
            margin-bottom: 0;
        }
        .select-css {
            margin: 10px auto 10px;
        }

    }
    
    
    @media(max-width:600px){
        
        .newfancy img {
            width: 100% !important;
        }

    }

</style>


<?php
if($linkMarketData != "#"){
?>

<a href="<?php echo  $linkMarketData ;?>" target="_blank">
    <div class="notif" aria-label-tooltip="<?php echo  urldecode($textoMarketData) ;?>" data-balloon-pos="left" >
        <p><?php echo  urldecode($tituloMarketData) ;?></p>
    </div>
</a>
<?php
}
?>

<!-- Modal -->
<div class="modal fade" id="Contacto" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?php echo $tituloContacto; ?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" id="modalContact">
      <hgroup>
        <h1><?php echo $textoForm;?></h1>
        </hgroup>
        <form id="contactform" class="contactform">
        <div class="group">
            <input class="forminput" id="nombre" type="text"><span class="highlight"></span><span class="bar"></span>
            <label><?php echo $etiquetaNombre;?></label>
        </div>
        <div class="group">
            <input class="forminput" id="email" type="email"><span class="highlight"></span><span class="bar"></span>
            <label><?php echo $etiquetaEmail;?></label>
        </div>
        
        <div class="group">
            <input class="forminput" id="empresa" type="text"><span class="highlight"></span><span class="bar"></span>
            <label><?php echo $etiquetaEmpresa;?></label>
        </div>

        <div class="group full">
            <textarea class="forminput" id="mensaje"></textarea><span class="highlight"></span><span class="bar"></span>
            <label><?php echo $etiquetaMensaje;?></label>
        </div>

        <div class="group">
				<input class="forminput" type="text" name="captcha" id="captcha"/><span class="highlight"></span><span class="bar"></span>
                <label>Captcha</label>
				<div id="respuestacaptcha"></div>
				
        </div>
        
        <div class="group">
				
				<p><img src="/assets/captcha/captcha.php?rand=<?php echo rand(); ?>" id='captcha_image'></p>
				<p> <a href='javascript: refreshCaptcha();'> Recargar</a></p>
        </div>

        <div id="respuesta" style="float:left;width:100%;"></div>

        <button type="button" class="button buttonBlue" onclick="sendContact();"><?php echo  $textoBotoncontacto;?>
            <div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
        </button>

        
        </form>


      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" data-toggle="modal" data-target="#Contacto" class="btn btn-primary"><?php echo $textoCerrar; ?></button>
      </div>
    </div>
  </div>
</div>

<div id="searchpanel">

    <div class="contsearch">
        <button type="button" class="close" onclick="closeSearch();" aria-label="Close"><span aria-hidden="true">×</span> </button>



        <div class="searchinputcont">
            <h3><?php echo $textosearch;?></h3>
            <input type="text" id="q" name="q">

            <a class="btnsearch"><?php echo $btnsearch;?> <i class="fas fa-search" aria-hidden="true"></i></a>
            <div class="filtrosresultados"></div>

        </div>

        <div class="resultssearch">
            <div class="sinresultados">
                <img src="/assets/img/notfound.png"> 
            </div>
        </div>

    </div>

</div>


<!-- Modal Login -->
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?php echo $titulologin; ?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" id="modalContact">
      <hgroup>
        <h1><?php echo $subtitulologin;?> </h1>
        </hgroup>
        <form id="contactformlogin" class="contactform">

        <div class="group">
            <input class="forminput" id="user" type="email"><span class="highlight"></span><span class="bar"></span>
            <label>Email</label>
        </div>
        
        <div class="group">
            <input class="forminput" id="password" type="password"><span class="highlight"></span><span class="bar"></span>
            <span toggle="#password" class="fa fa-fw fa-eye field-icon toggle-password"></span>
            <label>Password</label>
        </div>


        <div class="group">
				<input class="forminput" type="text" name="captcha2" id="captcha2"/><span class="highlight"></span><span class="bar"></span>
                <label>Captcha</label>
				<div id="respuestacaptcha2"></div>
				
        </div>
        
        <div class="group">
				
				<p><img src="/assets/captcha/2.php?rand=<?php echo rand(); ?>" id='captcha_image2'></p>
				<p> <a href='javascript: refreshCaptcha2();'> <?php echo $recargar;?></a></p>
        </div>

        

        <div id="respuestalogin" style="float:left;width:100%;"></div>

        <?php 
        //echo $_SESSION['intentos'];
        if($intentoslogin > 4){

            echo "<p class='errormsg' style='text-align: center;'>".$multipleslogins."</p>";

            echo '<button disabled type="button" class="button buttonBlue" style="opacity: .5; pointer-events: none;">'.$loginbutton.'
            <div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
        </button>';
            
            
          }
          else{

            echo '<button type="button" class="button buttonBlue" onclick="login();">'.$loginbutton.'
            <div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
        </button>';
          }
          
        ?>

        

        <br><br>

        <p style="width:100%; text-align:center;"><?php echo $textosolicitud;?></a></p>

        <p style="width:100%; text-align:center; font-size:11px;"><?php echo $textopass; ?></a></p>

        
        </form>


      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" data-toggle="modal" data-target="#login" class="btn btn-primary"><?php echo $textoCerrar;?></button>
      </div>
    </div>
  </div>
</div>


<!-- Modal Solicitud -->
<div class="modal fade" id="solicitud" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?php echo urldecode($tituloSolicitudprivado);?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" id="modalSolicitud">

      <?php echo rawurldecode($textoSolicitudprivado);?>
        



      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" data-toggle="modal" data-target="#solicitud" class="btn btn-primary"><?php echo $textoCerrar;?></button>
      </div>
    </div>
  </div>
</div>

<!-- Modal Doble Factor -->
<div class="modal fade" id="code" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" onsubmit="return false" data-backdrop="static" data-keyboard="false">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?php echo $titulologin;?></h5>
        
      </div>
      <div class="modal-body" id="modalContact">
      <hgroup>
        <h1><?php echo $textocodesolicitud;?></h1>
        </hgroup>
        <form id="contactformsolicitud" class="contactform">

        <div class="group" style="float: none; margin: 20px auto; padding: 7px;">
            <input class="forminput" id="codigo_df" type="text"><span class="highlight"></span><span class="bar"></span>
            <label><?php echo $textocode;?></label>
        </div>
        


        <div id="respuestacode" style="float:left;width:100%;"></div>

        <button type="button" class="button buttonBlue" onclick="codigo();"><?php echo $textocodeenviar;?>
            <div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
        </button>



        
        </form>



      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" data-toggle="modal" data-target="#code" class="btn btn-primary" onclick="closecodemodal();"><?php echo $textoCerrar;?></button>
      </div>
    </div>
  </div>
</div>

<style>
    #formrpassemail {
        width: 100%;
        margin: 10px auto;
        padding: 3em 2em 2em 2em;
        background: #fafafa;
        /* min-width: 1500px; */
        border-radius: 10px;
        font-size: 12px;
        font-family: "Montserrat";
    }
    #formrpassemail .group {
        position: relative;
        margin-bottom: 35px;
        width: 50%;
        float: left;
        padding: 15PX;
    }

    #formrpassemail input, #formrpassemail textarea  {
        font-size: 18px;
        padding: 10px 10px 10px 5px;
        -webkit-appearance: none;
        display: block;
        background: #fafafa;
        color: #636363;
        width: 100%;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #757575;
    }

    #formrpassemail input:focus { outline: none; }


    /* Label */

    #formrpassemail label {
        color: #999;
        font-size: 12px;
        font-weight: normal;
        position: absolute;
        pointer-events: none;
        left: 5px;
        top: 0px;
        transition: all 0.2s ease;
    }


    /* active */

    #formrpassemail input:focus ~ label, #formrpassemail input.used ~ label, #formrpassemail textarea:focus ~ label, #formrpassemail textarea.used ~ label  {
        top: -20px;
    transform: scale(.75); left: -2px;
        /* font-size: 14px; */
        color: #2b4365;
    }


    /* Underline */

    #formrpassemail .bar {
        position: relative;
        display: block;
        width: 100%;
    }

    #formrpassemail .bar:before, #formrpassemail .bar:after {
        content: '';
        height: 2px; 
        width: 0;
        bottom: 1px; 
        position: absolute;
        background: #2b4365; 
        transition: all 0.2s ease;
    }

    #formrpassemail .bar:before { left: 50%; }

    #formrpassemail .bar:after { right: 50%; }


    /* active */

    #formrpassemail input:focus ~ .bar:before, #formrpassemail input:focus ~ .bar:after { width: 50%; }


    /* Highlight */

    #formrpassemail .highlight {
        position: absolute;
        height: 60%; 
        width: 100px; 
        top: 25%; 
        left: 0;
        pointer-events: none;
        opacity: 0.5;
    }


    /* active */

    #formrpassemail input:focus ~ .highlight {
        animation: inputHighlighter 0.3s ease;
    }


    /* Animations */

    @keyframes inputHighlighter {
        from { background: #2b4365; }
        to 	{ width: 0; background: transparent; }
    }


    /* Button */

    #formrpassemail .button {
    position: relative;
    display: inline-block;
    padding: 12px 24px;
    margin: .3em 0 1em 0;
    width: 100%;
    vertical-align: middle;
    color: #fff;
    font-size: 16px;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
    text-align: center;
    letter-spacing: 1px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid #48aa42;
    cursor: pointer;
    transition: all 0.15s ease;
    }
    #formrpassemail .button:focus { outline: 0; }


    /* Button modifiers */

    #formrpassemail .buttonBlue {
    background: #2b4365;
    text-shadow: 1px 1px 0 #48aa42;
    }

    #formrpassemail .buttonBlue:hover { background: #48aa42; }


    /* Ripples container */

    #formrpassemail .ripples {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
    }


    /* Ripples circle */

    #formrpassemail .ripplesCircle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    }

    #formrpassemail .ripples.is-active .ripplesCircle {
    animation: ripples .4s ease-in;
    }

    
.formprod input, .formprod textarea {
    width: 100%;
    float: left;
    margin: 0 0 15px;
    min-height: 50px;
    border-radius: 0;
    border: 0;
    font-size: 15px;
    padding: 5px 5px 0;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    font-weight: 500;
    border-bottom: 2px solid #b4b4b4;
}
div#modaltyc {
    padding: 20px 10%;
}

.formprod .field-icon {
  float: right;
  margin-left: -25px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.formprod .button {
    position: relative;
    display: inline-block;
    padding: 12px 24px;
    margin: .3em 0 1em 0;
    width: 100%;
    vertical-align: middle;
    color: #fff;
    font-size: 16px;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
    text-align: center;
    letter-spacing: 1px;
    background: transparent;
    border: 0;
    border-bottom: 2px solid #48aa42;
    cursor: pointer;
    transition: all 0.15s ease;
}
.formprod .buttonBlue {
    background: #2b4365;
    text-shadow: 1px 1px 0 #48aa42;
}
.formprod .buttonBlue:hover {
    background: #48aa42;
}
.glyphicon-remove {
    font-size: 12px;
    color: #ed6e6e;
    margin-bottom: 5px;
}
.glyphicon-ok {
    color: #9aee9a;
    margin-bottom: 5px;
    font-size: 12px;
}

.modal-footer button.btn.btn-secondary {
    display: none;
}

    @media(max-width:600px){
        #formrpassemail .group {
            width: 100%;
            padding: 0;
        }
    }
</style>

<!-- Modal ResetPass Email -->
<div class="modal fade" id="resetpassEmail" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" onsubmit="return false">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"><?php echo $titulorpassemail;?></h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body" id="modalContact">
      <hgroup>
        <h1><?php echo $textorpassemail;?></h1>
        </hgroup>
        <form id="formrpassemail">

        <div class="group" style="float: none; margin: 20px auto; padding: 7px;">
            <input class="forminput" id="email_pass" type="email"><span class="highlight"></span><span class="bar"></span>
            <label>Email</label>
        </div>
        


        <div id="respuestarpassemail" style="float:left;width:100%; padding:5px; text-align:center;"></div>

        <button type="button" class="button buttonBlue" onclick="RecuperaPass();"><?php echo $textorpassemailenviar;?>
            <div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
        </button>



        
        </form>



      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="button" data-toggle="modal" data-target="#resetpassEmail" class="btn btn-primary"><?php echo $textoCerrar;?></button>
      </div>
    </div>
  </div>
</div>


<!-- Modal Login -->
<div class="modal fade" id="resetPass" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">DEFINE TU NUEVA CONTRASEÑA</h5>
                        
                    </div>
                    <div class="modal-body" id="modaltyc">
                    
                    <p style="padding:10px; font-size:10px;">Incluya los caracteres solicitados.</p>

                  <form class="formprod" id="formpass" enctype='multipart/form-data' autocomplete="off">
                    <input name="tokenpass" id="tokenpass" type="hidden" value="<?php echo $_GET['t']; ?>">
                    
                    <div class="formgroup">
                        <input name="passnew1" type="password" id="passnew1" placeholder="Al menos 10 caracteres">
                        <span toggle="#passnew1" class="fa fa-fw fa-eye field-icon toggle-password"></span>
                    </div>
                    
                    <div class="formgroup">
                        <input name="passnew2" type="password" id="passnew2" placeholder="Confirme la contraseña">
                        <span toggle="#passnew2" class="fa fa-fw fa-eye field-icon toggle-password"></span>
                        <div id="Length2" class="glyphicon glyphicon-remove">&#8226; Debe contener al menos 10 caracteres</div>
                        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                        <div id="UpperCase" class="glyphicon glyphicon-remove">&#8226; Al menos 1 mayúscula</div>
                        <div id="LowerCase" class="glyphicon glyphicon-remove">&#8226; Al menos 1 minúscula</div>
                        <div id="Numbers" class="glyphicon glyphicon-remove">&#8226; Al menos 1 número</div>
                        <div id="Symbols" class="glyphicon glyphicon-remove">&#8226; Al menos 1 caracter especial (*, $, #, & , etc)</div>
                       
                    </div>

                    <button id="btnNewPass" type="button" class="button buttonBlue" onclick="updatePass2();" style="opacity:.5; pointer-events:none;">Cambiar contraseña
                        <div class="ripples buttonRipples"><span class="ripplesCircle"></span></div>
                    </button>

                    <div id="respuestapass"></div>

        </form> 




                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal"></button>

                       
                        
                    </div>
                    </div>
                </div>
                </div>

<?php 
echo $cookieDisclaimer;
?>

<a id="opencontact" style="display:none;" data-toggle="modal" data-target="#Contacto"></a>
<a id="openlogin" style="display:none;" data-toggle="modal" data-target="#login"></a>	
<a id="opensolicitud" style="display:none;" data-toggle="modal" data-target="#solicitud"></a>	
<a id="openpass" style="display:none;" data-toggle="modal" data-target="#resetpassEmail"></a>	
<a id="opencode" style="display:none;" data-toggle="modal" data-target="#code"></a>	
<a id="opensearch" style="display:none;"></a>


<!-- CSS Adicional-->
<?php echo $cssAdicional; ?>


<!-- Bootstrap core JS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Third party plugin JS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
<!-- Contact form JS-->
<script src="/assets/mail/jqBootstrapValidation.js"></script>
<script src="/assets/mail/contact_me.js"></script>
<!-- Core theme JS-->
<script src="/js/scripts.js"></script>
<script src='/assets/slick/slick.min.js'></script>

<script src="/js/zeynep.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>

	
<script> 

    $.fn.onEnter = function(func) {
        this.bind('keypress', function(e) {
            if (e.keyCode == 13) func.apply(this, [e]);    
        });               
        return this; 
     };
    setTimeout(() => {
        $('a[href^="#lang"]').attr("href", '<?php if(strlen($urles) <1){$urles ='/';} if($lang == 'es'){echo "/en".$urlen;}if($lang == 'en'){echo $urles;}?>');       
    }, 100);

    $('a[href^="#search"]').click(function(){

        $("#searchpanel").addClass("opensearch");
        $(".zeynep-overlay").fadeIn();
        $("html, body").css("overflow-y", "hidden");
        $("#q").focus();


    })

    
    
    $('#solicite').click(function(){
        $('#login').modal('toggle');
        $("#opensolicitud").click();


    })
    

    function loginpop(){
        $("#resetPass").modal("toggle");
        $('#login').modal('toggle');

    }
    
    function loginSuccess(){
        $('#login').modal().hide();
        //$("#opensolicitud").click();
        $("#opencode").click();

    }
    
    $('.zeynep-overlay').click(function(){
        closeSearch();
    })

    $("#q").onEnter( function() {
        $('a.btnsearch').click();                
    });
    
    $('a.btnsearch').click(function(){
        $('.filtrosresultados').html();
        var query = $("input#q").val();
        if(query.length < 2){ 
            $(".resultssearch").html("<p class='errorsearch'>Ingresa al menos 2 caracteres</p>");
            //$(".resultssearch").html('<div class="lds-ripple"><div></div><div></div></div>');
            $("#q").focus();
        }
        else{
            $(".resultssearch").html('<div class="lds-ripple"><div></div><div></div></div>');
            $(".btnsearch").css("opacity", ".4");
            $(".btnsearch").css("pointer-events", "none");
            $.ajax({
                url : "/include/buscar.php",
                type: "GET",
                data : "q="+query+"&lang=<?php echo $lang;?>",
                success:function(data){
                    $('.resultssearch').html(data);

                    setTimeout(() => {
                        $(".btnsearch").css("opacity", "1");
                        $(".btnsearch").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        


    })
    function closeSearch(){
        $("#searchpanel").removeClass("opensearch");
        $(".zeynep-overlay").fadeOut();
        $("html, body").css("overflow-y", "auto");
    }

    function openPass(){
        $('#login').modal('toggle');
        $("#openpass").click();
    }
    $(document).ready(function() {

        $("#passnew1").on('keyup', ValidatePassword2);

        

        $('a[href^="https://stag-cloudfront.indeval.com.mx/docs/estadisticas-informacion/es/ActionCard_1625490190_es.pdf"]').each(function(){

            <?php
                if($logeado ==true ){
                    echo '$(this).attr("href", "/area-clientes");';
                }
                else{
                    echo '$(this).attr("href", "#login");';
                }
            ?>
            
        });

        $('a[href^="https://stag-cloudfront.indeval.com.mx/docs/faqs/es/faq_archivo1_es.zip"]').each(function(){

            <?php
                if($logeado ==true ){
                    echo '$(this).attr("href", "/area-clientes");';
                }
                else{
                    echo '$(this).attr("href", "#login");';
                }
            ?>

            });

        $('a[href^="#login"]').click(function(){

            $("#openlogin").click();
            $("#user").focus();


            })

        setTimeout(() => {
            $("#loader").fadeOut();
        }, 100);
        
        $('a[href^="#contacto"]').click(function(){
            $("#opencontact").click();
        });
        $('a[href^="#contact"]').click(function(){
            $("#opencontact").click();
        });
        
        $('a.contactlink').click(function(){
            $("#opencontact").click();
        });
		
        //responsive menu toggle
        $("#menutoggle").click(function() {
            $('.xs-menu').toggleClass('displaynone');

            });
        //add active class on menu
        $('ul li').click(function(e) {
            //e.preventDefault();
            $('li').removeClass('active');
            $(this).addClass('active');
        });
    //drop down menu	
            $(".drop-down").hover(function() {
                $('.mega-menu').addClass('display-on');
            });
            $(".drop-down").mouseleave(function() {
                $('.mega-menu').removeClass('display-on');
            });

    });
    
    $(window, document, undefined).ready(function() {
    
    <?php if(strlen($_GET['t']) > 7){echo '$("#resetPass").modal("toggle");';} ?>

    if(window.location.hash){
        var hash = window.location.hash;
        //alert(hash);
        if(hash == "#login"){

            $("#openlogin").click();

        }
        
    }


    $('.forminput').blur(function() {
    var $this = $(this);
    if ($this.val())
        $this.addClass('used');
    else
        $this.removeClass('used');
    });

    var $ripples = $('.ripples');

    $ripples.on('click.Ripples', function(e) {

    var $this = $(this);
    var $offset = $this.parent().offset();
    var $circle = $this.find('.ripplesCircle');

    var x = e.pageX - $offset.left;
    var y = e.pageY - $offset.top;

    $circle.css({
        top: y + 'px',
        left: x + 'px'
    });

    $this.addClass('is-active');

    });

    $ripples.on('animationend webkitAnimationEnd mozAnimationEnd oanimationend MSAnimationEnd', function(e) {
        $(this).removeClass('is-active');
    });

    });

     
  function sendContact(){
        $('#respuesta').html("");
        $("#nombre").css("border-color", "#757575");
        $("#email").css("border-color", "#757575");
        $("#mensaje").css("border-color", "#757575");
        $(".buttonBlue").css("opacity", ".5");
        $(".buttonBlue").css("pointer-events", "none");
        var nombre = $('#nombre').val();
        var email =$("#email").val();
        var empresa =$("#empresa").val();
        var mensaje =$("#mensaje").val();
        var captcha =$("#captcha").val();
	    var mailvalid = validateEmail(email);
        var  errores = false;

        if(mailvalid == false){
            $("#respuesta").append("<p class='errormsg'>El correo no es válido</p>");
            $("#email").css("border-color", "#fa5555");
            setTimeout(() => {
                    $(".buttonBlue").css("opacity", "1");
                    $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(nombre.length <2 ){
            $("#respuesta").append("<p class='errormsg'>Ingresa tu nombre</p>");
            $("#nombre").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(mensaje.length <10 ){
            $("#respuesta").append("<p class='errormsg'>Ingresa tu mensaje (al menos 10 caracteres)</p>");
            $("#mensaje").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(captcha.length <4 ){
            $("#respuesta").append("<p class='errormsg'>Ingresa el captcha</p>");
            $("#captcha").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(errores == false){
            $.ajax({
                url : "/include/enviamensaje.php",
                type: "GET",
                data : "captcha="+captcha+"&nombre="+nombre+"&email="+email+"&empresa="+empresa+"&mensaje="+mensaje+"&lang=<?php echo $lang;?>",
                success:function(data){
                    $('#respuesta').html(data);

                    setTimeout(() => {
                        $(".buttonBlue").css("opacity", "1");
                        $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }

    function resetForm(){
        $("#nombre").val("");
        $("#email").val("");
        $("#empresa").val("");
        $("#mensaje").val("");
        $("#captcha").val("");
    }
    
    function resetFormSolicitud(){
        $("#solicitud_nombre").val("");
        $("#solicitud_email").val("");
        $("#solicitud_area").val("");
        $("#solicitud_funcion").val("");
        $("#captcha3").val("");
    }

    function login(){
        $('#respuestalogin').html("");
        $("#user").css("border-color", "#757575");
        $("#password").css("border-color", "#757575");
        $(".buttonBlue").css("opacity", ".5");
        $(".buttonBlue").css("pointer-events", "none");
        var email =$("#user").val();
        var password =$("#password").val();
        var encoded = encodeURIComponent(password);
        var captcha =$("#captcha2").val();
	    var mailvalid = validateEmail(email);
        var  errores = false;

        if(mailvalid == false){
            $("#respuestalogin").append("<p class='errormsg'>El correo no es válido</p>");
            $("#user").css("border-color", "#fa5555");
            setTimeout(() => {
                    $(".buttonBlue").css("opacity", "1");
                    $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(password.length <8 ){
            $("#respuestalogin").append("<p class='errormsg'>El password debe contar con al menos 8 caracteres</p>");
            $("#password").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

        if(captcha.length <4 ){
            $("#respuestalogin").append("<p class='errormsg'>Ingresa el captcha</p>");
            $("#captcha2").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(errores == false){
            $.ajax({
                url : "/include/login.php",
                type: "GET",
                data : "captcha="+captcha+"&email="+email+"&password="+encoded+"&lang=<?php echo $lang;?>",
                success:function(data){
                    $('#respuestalogin').html(data);

                    setTimeout(() => {
                        $(".buttonBlue").css("opacity", "1");
                        $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }
    
        function codigo(){
        $('#respuestacodigo').html("");
        $("#codigo_df").css("border-color", "#757575");
        $(".buttonBlue").css("opacity", ".5");
        $(".buttonBlue").css("pointer-events", "none");
        var code =$("#codigo_df").val();
       
        var  errores = false;


        if(code.length <6 ){
            $("#respuestacode").append("<p class='errormsg'>El código debe contar con al menos 6 caracteres</p>");
            $("#codigo_df").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

       
        if(errores == false){
            $.ajax({
                url : "/include/code.php",
                type: "GET",
                data : "code="+code+"&lang=<?php echo $lang;?>",
                success:function(data){
                    $('#respuestacode').html(data);

                    setTimeout(() => {
                        $(".buttonBlue").css("opacity", "1");
                        $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }

    function codeSuccess(){
        setTimeout(() => {
            window.location.href = '<?php if($lang == 'es'){echo "/area-clientes";} if($lang == 'en'){echo "/en/clients-area";}?>';
            
        }, 1000);
        
    }
    
            /*Actual validation function*/
function ValidatePassword2() {
  /*Array of rules and the information target*/
  var rules = [{
      Pattern: "[A-Z]",
      Target: "UpperCase"
    },
    {
      Pattern: "[a-z]",
      Target: "LowerCase"
    },
    {
      Pattern: "[0-9]",
      Target: "Numbers"
    },
    {
      Pattern: "[!@@#$%^&*]",
      Target: "Symbols"
    }
  ];

  //Just grab the password once
  var password = $(this).val();

  /*Length Check, add and remove class could be chained*/
  /*I've left them seperate here so you can see what is going on */
  /*Note the Ternary operators ? : to select the classes*/
  $("#Length2").removeClass(password.length > 9 ? "glyphicon-remove" : "glyphicon-ok");
  $("#Length2").addClass(password.length > 9 ? "glyphicon-ok" : "glyphicon-remove");
  
  /*Iterate our remaining rules. The logic is the same as for Length*/
    for (var i = 0; i < rules.length; i++) {
        $("#" + rules[i].Target).removeClass(new RegExp(rules[i].Pattern).test(password) ? "glyphicon-remove" : "glyphicon-ok"); 
        $("#" + rules[i].Target).addClass(new RegExp(rules[i].Pattern).test(password) ? "glyphicon-ok" : "glyphicon-remove");
        }

        var count = $("form .glyphicon-remove").length;

        if(count > 0){
            $("#btnNewPass").css("opacity", ".4");
            $("#btnNewPass").css("pointer-events", "none");
        }
        else{
            $("#btnNewPass").css("opacity", "1");
            $("#btnNewPass").css("pointer-events", "inherit");
        }

        
    }

    function updatePass2(){
        $('#respuestapass').html("");
        $("#passnew1").css("border-color", "#fff");
        $("#btnNewPass").css("opacity", ".5");
        $("#btnNewPass").css("pointer-events", "none");
        var code =$("#passnew1").val();
        var code2 =$("#passnew2").val();
        var tokenpass =$("#tokenpass").val();
        var  errores = false;

        if(tokenpass.length<5){
            $("#respuestapass").html("<p class='errormsg'>Token no válido. Verifica el enlace de recuperación o solicita uno nuevo");
            errores = true;
            setTimeout(() => {
                        $("#btnNewPass").css("opacity", "1");
                        $("#btnNewPass").css("pointer-events", "inherit");
                    }, 2000);

        }
        if(code.length<10){
            $("#respuestapass").html("<p class='errormsg'>Al menos 10 caracteres");
            $("#passnew1").css("border-color", "#fa5555");
            setTimeout(() => {
                        $("#btnNewPass").css("opacity", "1");
                        $("#btnNewPass").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

        if(code2.length<10 ){
            $("#respuestapass").html("<p class='errormsg'>Al menos 10 caracteres");
            $("#passnew2").css("border-color", "#fa5555");
            setTimeout(() => {
                        $("#btnNewPass").css("opacity", "1");
                        $("#btnNewPass").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        
        if(code2 != code  ){
            $("#respuestapass").html("<p class='errormsg'>Las contraseñas no coinciden");
            $("#passnew2").css("border-color", "#fa5555");
            setTimeout(() => {
                        $("#btnNewPass").css("opacity", "1");
                        $("#btnNewPass").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }


        if(errores == false){
            $.ajax({
                url : "/include/updatePass.php?token="+tokenpass,
                type: "GET",
                data : "pass="+code,
                success:function(data){
                    $('#respuestapass').html(data);

                    setTimeout(() => {
                        $("#btnNewPass").css("opacity", "1");
                        $("#btnNewPass").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }
    
    function RecuperaPass(){

        $(".buttonBlue").css("opacity", ".5");
        $(".buttonBlue").css("pointer-events", "none");

        var email =$("#email_pass").val();
	    var mailvalid = validateEmail(email);
        var  errores = false;

        if(mailvalid == false){
            $("#respuestarpassemail").append("<p class='errormsg'>Email inválido</p>");
            $("#email_pass").css("border-color", "#fa5555");
            setTimeout(() => {
                    $(".buttonBlue").css("opacity", "1");
                    $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

        if(errores == false){
            $.ajax({
                url : "/include/recuperaPass.php",
                type: "GET",
                data : "email="+email+"&lang=<?php echo $lang;?>",
                success:function(data){
                    $('#respuestarpassemail').html(data);

                    setTimeout(() => {
                        $(".buttonBlue").css("opacity", "1");
                        $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }   
    
    function solicitar(){
        $('#respuestasolicitud').html("");
        $("#solicitud_nombre").css("border-color", "#757575");
        $("#solicitud_institucion").css("border-color", "#757575");
        $("#solicitud_area").css("border-color", "#757575");
        $("#solicitud_funcion").css("border-color", "#757575");
        $("#solicitud_email").css("border-color", "#757575");
        $(".buttonBlue").css("opacity", ".5");
        $(".buttonBlue").css("pointer-events", "none");
        var email =$("#solicitud_email").val();
        var nombre =$("#solicitud_nombre").val();
        var institucion =$("#solicitud_institucion").val();
        var area =$("#solicitud_area").val();
        var funcion =$("#solicitud_funcion").val();
        var captcha =$("#captcha3").val();
	    var mailvalid = validateEmail(email);
        var  errores = false;

        if(mailvalid == false){
            $("#respuestasolicitud").append("<p class='errormsg'>El correo no es válido</p>");
            $("#solicitud_email").css("border-color", "#fa5555");
            setTimeout(() => {
                    $(".buttonBlue").css("opacity", "1");
                    $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(nombre.length <3 ){
            $("#respuestasolicitud").append("<p class='errormsg'>Ingrese el nombre</p>");
            $("#solicitud_nombre").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

        if(institucion.length <2 ){
            $("#respuestasolicitud").append("<p class='errormsg'>Ingrese la Institución financiera</p>");
            $("#solicitud_institucion").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        
        if(area.length <2 ){
            $("#respuestasolicitud").append("<p class='errormsg'>Ingrese el área</p>");
            $("#solicitud_area").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        
        if(funcion.length <2 ){
            $("#respuestasolicitud").append("<p class='errormsg'>Ingrese la función desempeñada</p>");
            $("#solicitud_funcion").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

        if(captcha.length <4 ){
            $("#respuestasolicitud").append("<p class='errormsg'>Ingresa el captcha</p>");
            $("#captcha3").css("border-color", "#fa5555");
            setTimeout(() => {
                $(".buttonBlue").css("opacity", "1");
                $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        if(errores == false){
            $.ajax({
                url : "/include/solicitud.php",
                type: "GET",
                data : "captcha="+captcha+"&email="+email+"&nombre="+nombre+"&institucion="+institucion+"&area="+area+"&funcion="+funcion+"&lang=<?php echo $lang;?>",
                success:function(data){
                    $('#respuestasolicitud').html(data);

                    setTimeout(() => {
                        $(".buttonBlue").css("opacity", "1");
                        $(".buttonBlue").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }
    //////////Validar Emails
    function validateEmail(email22) {
            var reg = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{1,}))$/;
            return reg.test(email22);
        }

        setTimeout(function(){
                $(window).trigger('resize');
                $('.ligas').slick({
                    infinite: false,
                    slidesToShow: 7,
                    slidesToScroll: 1,
                    lazyLoad: 'ondemand',
                    accessibility: true,
                    arrows: true,
                    dots:true,
                    autoplay: true,
                    responsive: [
                        {
                            breakpoint: 700,
                            settings: {
                                slidesToShow: 3,
                                slidesToScroll: 2
                            }
                        },
                        {
                            breakpoint: 360,
                            settings: {
                                slidesToShow: 2,
                                slidesToScroll: 2
                            }
                        } ],
                    autoplaySpeed: 4000,
                });

                $('.navbar ul.menu-bar').slick({
                    slide: 'li',
                    slidesToShow: 5,
                    variableWidth: true,
                    slidesToScroll: 1,
                    arrows: true,
                    autoplay: false,
                    infinite: false,
                    });
            }, 10)

            //Refresh Captcha
		function refreshCaptcha(){
			var img = document.images['captcha_image'];
			img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
		}
        function refreshCaptcha2(){
			var img = document.images['captcha_image2'];
			img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
		}
        function refreshCaptcha3(){
			var img = document.images['captcha_image3'];
			img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
		}
        function refreshCaptcha4(){
			var img = document.images['captcha_image4'];
			img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
		}
        
        function reloadCaptcha(id){
            var imgcaptcha= "captcha_image_"+id;
			var img = document.images[imgcaptcha];
			img.src = img.src.substring(0,img.src.lastIndexOf("?"))+"?rand="+Math.random()*1000;
		}
        setTimeout(() => {
            $(".notif").addClass('open');
        }, 2000);

        setTimeout(() => {
            $(".contmega").each(function( ){
                var element = $(this).detach();
                $('#menumegacont').append(element);
            });
        }, 200);


        $(document).ready(function() {
            $('.nav .slick-slide').click(function() {
                $('#menumegacont ul[data-padre]').hide();
                
            })
            
            $('.navbar').on("mouseleave", function() {
                $('#menumegacont ul[data-padre]').hide();
                
            })
            $('.nav .slick-slide').on("mouseleave", function() {
                if($(this).hasClass("tienesubmenu")){
                    //$(this).find(".fas").removeClass("fa-sort-up");
                    //$(this).find(".fas").addClass("fa-caret-down");
                    $(this).removeClass("showsub");
                }
                else{
                    $('#menumegacont ul[data-padre]').hide();
                    //$('.tienesubmenu i').removeClass("fa-sort-up");
                    //$('.tienesubmenu i').addClass("fa-caret-down");
                }
               
                
            })

            $('.nav .logocont').on("mouseenter", function() {
                $('#menumegacont ul[data-padre]').hide();
               
                
            })

            $('.nav .slick-slide').on("mouseenter", function() {

                if($(this).hasClass("tienesubmenu")){

                }
                else{
                    $('#menumegacont ul[data-padre]').hide();
                }
                
               
                
            })
            $('.tienesubmenu').click(function() {
                $('.tienesubmenu').removeClass("showsub");
                $(this).addClass("showsub");

                setTimeout(() => {
                    if($(this).hasClass("showsub")){

                        $('#menumegacont ul[data-padre]').hide();
                        //$('.tienesubmenu i').removeClass("fa-sort-up");
                        //$('.tienesubmenu i').addClass("fa-caret-down");
                        var text = $(this).attr("data-texto");
                        //$(this).find(".fas").removeClass("fa-caret-down");
                        //$(this).find(".fas").addClass("fa-sort-up");
                        //alert(text);
                        $('ul[data-padre="'+text+'"]').first().css("display", "inline-block");
                    }
                    else{
                        $('#menumegacont ul[data-padre]').hide();

                    } 
                }, 100);
                
            })
        });

</script>

<script>
      $(function() {
        // init zeynepjs side menu
        var zeynep = $('.zeynep').zeynep({
          opened: function () {
            
          },
          closed: function () {
        
          }
        })

        // dynamically bind 'closing' event
        zeynep.on('closing', function () {
        
        })

        // handle zeynepjs overlay click
        $('.zeynep-overlay').on('click', function () {
          zeynep.close()
          $('#nav-icon3').toggleClass('open'); 
        })

        // open zeynepjs side menu
        $('.btn-open').on('click', function () {

          if($(this).hasClass("open")){
            zeynep.close();
            $(".zeynep-overlay").fadeOut();
            $("html, body").css("overflow-y", "auto");

          }
          else{
            zeynep.open();
            $(".zeynep-overlay").fadeIn();
            $("html, body").css("overflow-y", "hidden");
          }
        })
      })

      $(document).ready(function(){
            $('#nav-icon3').click(function(){

                setTimeout(() => {
                    $(this).toggleClass('open'); 
                    
                }, 200);
 
            });

            $("table tr:first-child td").each(function() {
                $(this).replaceWith('<th>' + $(this).text() + '</th>');
            });

            setTimeout(() => {
                $('.cookies').css("bottom", "0");
            }, 1000);
        });

        function closeCookies(){
            $('.cookies').addClass('closedcookies');
            setTimeout(() => {
                //$('.cookies').remove();
            }, 3000);
        }

        $(document).ready(function(){
            if (!!localStorage.getItem("cookieconsent")) {
                document.body.classList.add("cookieconsent")
            } 
            else {
                $(".closecookies.btncookies").click(function() {
                    localStorage.setItem("cookieconsent", "ok")
                });
            }
        });

        $(document).ready(function(){
            if (!!localStorage.getItem("cookieconsenten")) {
                document.body.classList.add("cookieconsenten")
            } 
            else {
                $(".closecookies.btncookies.btncookiesen").click(function() {
                    localStorage.setItem("cookieconsenten", "ok")
                });
            }
        });

        $('.accordion-item img').each(function () {
            $(this).wrap($('<a/>', {
                href: $(this).attr('src'),
                class: "newfancy",
                "data-fancybox": "gallery"
            }));
        });
        
        $('.contprod img').each(function () {
            $(this).wrap($('<a/>', {
                href: $(this).attr('src'),
                class: "newfancy",
                "data-fancybox": "gallery"
            }));
        });

        setTimeout(() => {

            $('a.newfancy').each(function () {

                $( '<p class="ampliafoto" googl="true">Toca la imagen para ampliarla</p>' ).insertAfter( this );
        });
            
        }, 1000);

        $(".toggle-password").click(function() {

        $(this).toggleClass("fa-eye fa-eye-slash");
        var input = $($(this).attr("toggle"));
        if (input.attr("type") == "password") {
        input.attr("type", "text");
        } else {
        input.attr("type", "password");
        }
        });

        function closecodemodal(){
            $(".modal").modal("hide");
        }
        $("#resetpassEmail input").on("keydown", function(event) {
        if(event.which == 13)
            RecuperaPass();
        });
        $("#code input").on("keydown", function(event) {
        if(event.which == 13)
            codigo();
        });
        $("#resetpassprivado input").on("keydown", function(event) {
        if(event.which == 13)
            updatePassPrivado();
        });

        $("#resetPass input").on("keydown", function(event) {
        if(event.which == 13)
            updatePass2();
        });

        $("#login input").keyup(function(event) {
            if (event.keyCode === 13) {
                $("#login .buttonBlue").click();
            }
        });

        function updatePassPrivadoClientArea(){
        //alert("Test");
        $('#respuestapriv').html("");
        $("#respuestapasspriv").html("");
        $("#passpriv1").css("border-color", "#fff");
        $("#botonupdatepasspriv").css("opacity", ".5");
        $("#botonupdatepasspriv").css("pointer-events", "none");
        var code =$("#passpriv1").val();
        var code2 =$("#passpriv2").val();
        var  errores = false;
        if(code.length<10){
            $("#respuestauser").html("<p class='errormsg'>Al menos 10 caracteres");
            $("#user").css("border-color", "#fa5555");
            setTimeout(() => {
                        $("#botonupdatepasspriv").css("opacity", "1");
                        $("#botonupdatepasspriv").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }

        if(code2.length<10 ){
            $("#respuestauser").html("<p class='errormsg'>Al menos 10 caracteres");
            $("#user2").css("border-color", "#fa5555");
            setTimeout(() => {
                        $("#botonupdatepasspriv").css("opacity", "1");
                        $("#botonupdatepasspriv").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }
        
        if(code2 != code  ){
            $("#respuestauser").html("<p class='errormsg'>Las contraseñas no coinciden");
            $("#user2").css("border-color", "#fa5555");
            setTimeout(() => {
                        $("#botonupdatepasspriv").css("opacity", "1");
                        $("#botonupdatepasspriv").css("pointer-events", "inherit");
                    }, 2000);
            errores = true;
        }


        if(errores == false){
            $.ajax({
                url : "/include/updatePassPrivado.php",
                type: "GET",
                data : "pass="+code,
                success:function(data){
                    $('#respuestapriv').html(data);

                    setTimeout(() => {
                        $("#botonupdatepasspriv").css("opacity", "1");
                        $("#botonupdatepasspriv").css("pointer-events", "inherit");
                    }, 2000);
                }
            })
        }
        
    }



        
    </script>

    <!-- JS Adicional-->
    <?php echo $jsAdicional; ?>
