</main>

<footer class="page-footer" style="background-color: #202020;margin-top: -20px;">
    <div class="container">
        <div class="row">
            <div class="col s12 m4 footer">
                <h5 class="white-text">Contato</h5>
                <ul>
                    <!--<li><i class="material-icons">mail</i> contato@amazoniacursos.com.br</li>-->
                    <li><i class="material-icons">language</i> www.amazoniacursos.com.br</li>
                    <li><i class="material-icons">alarm_on</i> Segunda - Sexta 7:00 - 13:00</li>
                    <li><i class="material-icons">location_on</i> Travessa Quatorze de Março, 221, Umarizal, Belém-PA, Cep 66055-490</li>
                </ul>  

            </div>
            <div class="col l5 s12">
                <h5 class="white-text">Tags Populares</h5>
                <?php
                $this->load->library('url');
                $browser = explode(' ', $this->url->getBrowser());
                $navegador = $browser[0];
                ?>
                <?php if ($navegador !== "Google") { ?>
                    <div class="chip">
                        <a href="<?php echo base_url('cursos') ?>"> Cursos Online
                            <i class="close material-icons">close</i>
                        </a>
                    </div>
                <?php } else { ?>
                    <a href="<?php echo base_url('cursos') ?>" class="btn waves-effect waves-light btn-curso" style="background-color: #263238; border-radius: 16px; "> Cursos Online</a>
                <?php } ?>
                <?php if ($navegador !== "Google") { ?>
                    <div class="chip">
                        <a href="<?php echo base_url('cursos') ?>"> 
                            Cursos Grátis
                            <i class="close material-icons">close</i>
                        </a>
                    </div>
                <?php } else { ?>
                    <a href="<?php echo base_url('cursos') ?>" class="btn waves-effect waves-light btn-curso" style="background-color: #263238; border-radius: 16px; "> 
                        Cursos Grátis
                    </a>
                <?php } ?>
                <?php if ($navegador !== "Google") { ?>
                    <div class="chip">
                        <a href="<?php echo base_url('cursos') ?>">
                            Cursos Rápidos
                        </a>
                    </div>
                <?php } else { ?>
                    <a href="<?php echo base_url('cursos') ?>" class="btn waves-effect waves-light btn-curso" style="background-color: #263238; border-radius: 16px; margin-top: 5px;">
                        Cursos Rápidos
                    </a>
                <?php } ?>
                <?php if ($navegador !== "Google") { ?>    
                <div class="chip">
                    <a href="<?php echo base_url('cursos') ?>">
                        Certificados Web
                        <i class="close material-icons">close</i>
                    </a>
                </div>
                <?php } else { ?>  
                    <a href="<?php echo base_url('cursos') ?>" class="btn waves-effect waves-light btn-curso" style="background-color: #263238; border-radius: 16px; margin-top: 5px;">
                        Certificados Web
                    </a>
                <?php } ?>    
                <?php if ($navegador !== "Google") { ?>        
                <div class="chip">
                    <a href="<?php echo base_url('cursos') ?>" >
                        Certificados Originais
                        <i class="close material-icons">close</i>
                    </a>
                </div>
                <?php } else { ?>   
                    <a href="<?php echo base_url('cursos') ?>" class="btn waves-effect waves-light btn-curso" style="background-color: #263238; border-radius: 16px; margin-top: 5px;">
                        Certificados Originais
                    </a>
                <?php } ?>     
                <?php if ($navegador !== "Google") { ?>            
                <div class="chip">
                    <a href="<?php echo base_url('cursos') ?>">
                        Cursos em Promoção
                        <i class="close material-icons">close</i>
                    </a>
                </div>
                <?php } else { ?>   
                    <a href="<?php echo base_url('cursos') ?>" class="btn waves-effect waves-light btn-curso" style=" background-color: #263238;border-radius: 16px; margin-top: 5px;">
                        Cursos em Promoção
                    </a>
                <?php } ?>        
            </div>
            <div class="col l5 s12" style="float: none; ">
                 <a href="https://www.shopify.com.br/burst/" target="_blank"><img src="https://www.cidadeaprendizagem.com.br/assets/img/burst.png" style="float: right"></a>
            </div>
            <!--<div class="col l5 s12">
                <h5 class="white-text">Fale Conosco</h5>
                <div class="form-error-contato">

                </div>
                <form action="" method="POST" id="form-contato" autocomplete="off">
                    <div class="row">
                        <div class="input-field col s12">
                            <i class="material-icons prefix">account_circle</i>  
                            <input id="nome" type="text" name="nome" required="" minlength="10">
                            <label for="nome">Nome Completo</label>
                        </div>
                    </div>
                    <div class="row">
                        <div class="input-field col s12">
                            <i class="material-icons prefix">mail</i>  
                            <input id="email" type="email" class="" required="" onkeyup="maiuscula(this)" name="email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$">
                            <label for="email" data-error="Errado" data-success="Correto">Email</label>
                        </div>
                    </div>

                    <div class="row">
                        <div class="input-field col s5 m4">
                            <i class="material-icons prefix">phone</i>
                            <input id="ddd" type="tel" class="only-number" required="" name="ddd" pattern="[0-9]+$" minlength="2" maxlength="2">
                            <label for="ddd">DDD</label>

                        </div>
                        <div class="input-field col s7 m8">
                            <i class="material-icons prefix">phone_iphone</i>
                            <input id="celular" type="tel" class="only-number" required="" name="celular" minlength="9" maxlength="9" pattern="[0-9]+$">
                            <label for="celular">Celular</label>
                        </div>
                    </div>
                    <div class="row">
                        <div class="input-field col s12">
                            <i class="material-icons prefix">mode_edit</i>
                            <textarea id="icon_prefix2" class="materialize-textarea" required="" name="mensagem"></textarea>
                            <label for="icon_prefix2">Digite a sua mensagem</label>
                        </div>   
                    </div>
                    <div class="row">
                        <div class="input-field col s12 recaptcha">
            <?php
            /* AS CONFIGURAÇÕES DO RECAPTCHA ESTÃO NO DIRETÓRIO config/recaptcha.php  */
            // echo $this->recaptcha->render();
            ?>
                        </div>   
                    </div>
                    <button class="btn waves-effect waves-light btn-curso btn-end btn-envio-contato" type="submit" name="action" style="">Enviar</button>
                </form>
            </div>-->
        </div>
    </div>
    <div class="footer-copyright" style="background-color: black">
        <div class="container">
            <span>Copyright © <?= date('Y') ?> Amazônia Cursos. Todos os direitos reservados.</span>
        </div>
    </div>
</footer>
<?php if (isset($_SESSION['aluno']) == FALSE) { ?> 
    <?php if ($titulo !== 'Página Inicial') { ?>
        <?php $this->load->view('commons/modal'); ?>
    <?php } ?>
<?php } else { ?>
    <?php $this->load->view('commons/modal_logado'); ?>
<?php } ?>
<!-- SCRITS -->
<script src="<?php echo base_url('assets/js/materialize.min.js') ?>" ></script>
<script src="<?php echo base_url('assets/js/script.js') ?>"></script>
<script src="<?php echo base_url('assets/js/jquery.mask.min.js') ?>"></script>
<script src="<?php echo base_url('assets/js/sweetalert.min.js') ?>"></script>
<?php if ($titulo !== 'Página Inicial') { ?>
    <script src="<?php echo base_url('assets/js/conteudo.js') ?>"></script>
<?php } ?>
<?php if ($titulo !== 'Página Inicial') { ?>
    <script src="<?php echo base_url('assets/js/jquery.prettyPhoto.js') ?>"></script>
<?php } ?>
<?php echo @$erro_form ?>
<?php if ($titulo == 'Login' || $titulo == 'Cadastro') { ?>
    <script>
        $(document).ready(function () {

            document.addEventListener('keydown', function (event) {

                var key = event.key;
                var keyCode = event.keyCode;

                if (keyCode == '229' || key == '@') {

                    $("#email_login").keypress(function (event) {

                        var email_valid = $(this).val();

                        var email_valid = email_valid.replace('@', '');

                        var domains = [
                            "@gmail.com",
                            "@hotmail.com",
                            "@yahoo.com",
                            "@yahoo.com.br",
                            "@outlook.com",
                            "@bol.com.br",
                            "@live.com"
                        ];

                        var user_mail = [];
                        var i;
                        for (i = 0; i < domains.length; i++) {
                            user_mail[i] = email_valid + domains[i];
                        }

                        var lista = new Object();

                        lista[user_mail[0]] = null;
                        lista[user_mail[1]] = null;
                        lista[user_mail[2]] = null;
                        lista[user_mail[3]] = null;
                        lista[user_mail[4]] = null;
                        lista[user_mail[5]] = null;
                        lista[user_mail[6]] = null;

                        $('input.autocomplete').autocomplete({
                            //Aqui declaro algumas possiveis extensoes de email para autocompletar
                            data: lista,
                            limit: 20, // The max amount of results that can be shown at once. Default: Infinity.
                            onAutocomplete: function (val) {

                            },
                            minLength: 1 // The minimum length of the input for the autocomplete to start. Default: 1.
                        });

                        //                        detectChanges();
                        //}

                    });
                }
            });

        });


        let lastLength = $('#emailAux').val().length;

        $('#email_login').on('input', function (e) {
            let countSymbol = $(this)
                    .val()
                    .match(/@/g);
            if (countSymbol) {
                if (countSymbol.length == 1) {
                    if ($('.autocomplete-content').is(':visible')) {
                        $('#emailAux').val($('#email_login').val().substr($('#email_login').val().indexOf('@')));

                        $('#emailAux').trigger(
                                jQuery.Event('keyup', {
                                    keycode: 13
                                })
                                );
                    } else {
                        $('#emailAux').val('@');
                        $('#emailAux').text('@');
                        $('#emailAux').trigger(
                                jQuery.Event('keyup', {
                                    keycode: 13
                                })
                                );
                        $('.autocomplete-content').show();
                        e.stopPropagation();
                    }
                    lastLength = $('#emailAux').val().length;

                } else {
                    $('.autocomplete-content').hide();
                }
            } else {
                $('.autocomplete-content').hide();
            }
        });

        $('#email_login').on('blur', function (e) {
            $('#emailAux').blur();
        });

        let intervalID = null;

        intervalManager(true, detectChanges, 1);

        function intervalManager(flag, animate, time) {
            if (flag)
                intervalID = setInterval(animate, time);
            else
                clearInterval(intervalID);
        }

        function detectChanges() {

            if ($('#emailAux').val().length) {
                if ($('#emailAux').val().length - lastLength > 1) {
                    $('#email_login').val($('#email_login').val().substr(0, $('#email_login').val().indexOf('@')) + $('#emailAux').val());
                    $('#email_login').focus().blur();
                    intervalManager(false);
                    $('#emailAux').val('');
                    intervalManager(true, detectChanges, 1);
                }
            }
        }

    </script>
<?php } ?>
<link href="<?= $url_api_ovumdesk ?>lightdesk/css/lightdesk.css" rel='stylesheet'> 
<script  type="text/javascript" src="<?= $url_api_ovumdesk ?>lightdesk/lightdesk.js?nocache=<?= rand() ?>" ambiente="<?= $ambiente ?>" base="<?= $url_api_ovumdesk ?>" code="<?= $codigo ?>"></script>      


<?php
// Código para identificação e captura de conversão por link da ovumlink
if (isset($_GET['ovl_code'])) {
    $this->session->set_userdata(array('ovl_code' => $_GET['ovl_code']));
}
?>





</body>
</html> 
