<?php
    require_once 'includes/inicio.php';
    $cms = 'cms/';
    $baseUrl = Util::baseUrl() . $cms;
?>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Yak || Cappen.com</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="<?php echo $baseUrl; ?>public/css/neo/stylesheet.css">
    <link rel="stylesheet" href="<?php echo $baseUrl; ?>public/css/styleLogin.css">
    <script src="<?php echo $baseUrl; ?>public/js/libs/modernizr-2.5.3.min.js"></script>
</head>
<body>
    <!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
    <div class="wrapper">
        <header>
            <h1 class="logo">YAK</h1>
            <h2><span id="left" class="separador"></span>seja bem vindo ao <strong>yak</strong><span id="right" class="separador"></span></h2>
        </header>
        <div id="main">
            <form action="<?php echo $baseUrl; ?>login/nova-senha.php" method="post" id="formLogin">
                <input type="text" value="E-mail" name="usuario" id="usuario" class="clearInput" />
                <button type="submit"><span>NOVA</span> SENHA</button>
            </form>
            <?php
                // Mensagem de Retorno
                if (Message::hasErrors()) {
                    echo '<h2 class="erro">' . Message::showErrors() . '</h2>';
                }

                // Mensagem de Retorno
                if (Message::hasSuccess()) {
                    echo '<h2 class="sucesso">' . Message::showSuccess() . '</h2>';
                }
            ?>
        </div>
    </div>
    <footer>
        <hr />
        <a href="http://www.cappen.com" target="_blank" id="cappen" title="Sistema desenvolvido pela CAPPEN"><span class="hover"><span class="logo"></span></span> Sistema desenvolvido pela CAPPEN</a>
    </footer>

    <script src="<?php echo $baseUrl; ?>public/js/libs/jquery-1.7.1.min.js"></script>
    <script src="<?php echo $baseUrl; ?>public/js/libs/jquery.easing.1.3.js"></script>
    <script src="<?php echo $baseUrl; ?>public/js/libs/jquery.clearinput.js"></script>
    <script src="<?php echo $baseUrl; ?>public/js/validacao.js"></script>
    <script>
        $(document).ready(function() {
            $('.clearInput').clearInput();

            $("button[type='submit']").on('click', function (e) {
                e.preventDefault();

                var campos = [{campo: 'usuario', valor: 'E-mail'}];
                var validacao = validaLogin(campos);

                if (validacao == true) {
                    $("#formLogin").submit();
                }
            });
        });
    </script>
</body>
</html>
