document.writeln("  <script type=\'text/javascript\'>");
document.writeln("                jQuery(document).ready(function($)");
document.writeln("                {");
document.writeln("                    // Reveal Login form");
document.writeln("                    setTimeout(function(){ $(\'.fade-in-effect\').addClass(\'in\'); }, 1);");
document.writeln("");
document.writeln("");
document.writeln("                    // Validation and Ajax action");
document.writeln("                    $(\'form#login\').validate({");
document.writeln("                        rules: {");
document.writeln("                            username: {");
document.writeln("                                required: true");
document.writeln("                            },");
document.writeln("");
document.writeln("                            passwd: {");
document.writeln("                                required: true");
document.writeln("                            }");
document.writeln("                        },");
document.writeln("");
document.writeln("                        messages: {");
document.writeln("                            username: {");
document.writeln("                                required: \'请输入您的账号.\'");
document.writeln("                            },");
document.writeln("");
document.writeln("                            passwd: {");
document.writeln("                                required: \'请输入您的密码.\'");
document.writeln("                            }");
document.writeln("                        },");
document.writeln("");
document.writeln("                        // Form Processing via AJAX");
document.writeln("                        submitHandler: function(form)");
document.writeln("                        {");
document.writeln("                            show_loading_bar(70); // Fill progress bar to 70% (just a given value)");
document.writeln("");
document.writeln("                            var opts = {");
document.writeln("                                \'closeButton\': true,");
document.writeln("                                \'debug\': false,");
document.writeln("                                \'positionClass\': \'toast-top-full-width\',");
document.writeln("                                \'onclick\': null,");
document.writeln("                                \'showDuration\': \'300\',");
document.writeln("                                \'hideDuration\': \'1000\',");
document.writeln("                                \'timeOut\': \'5000\',");
document.writeln("                                \'extendedTimeOut\': \'1000\',");
document.writeln("                                \'showEasing\': \'swing\',");
document.writeln("                                \'hideEasing\': \'linear\',");
document.writeln("                                \'showMethod\': \'fadeIn\',");
document.writeln("                                \'hideMethod\': \'fadeOut\'");
document.writeln("                            };");
document.writeln("");
document.writeln("                          $.ajax({");
document.writeln("                                url: \'{:url(\'login/login/veify\')}\',");
document.writeln("                                method: \'POST\',");
document.writeln("                                dataType: \'json\',");
document.writeln("                                data: {");
document.writeln("                                    do_login: true,");
document.writeln("                                    username: $(form).find(\'#username\').val(),");
document.writeln("                                    passwd: $(form).find(\'#passwd\').val(),");
document.writeln("                                },");
document.writeln("                                success: function(resp)");
document.writeln("                                {");
document.writeln("                                    if(resp.code==\'1\')");
document.writeln("                                    {");
document.writeln("                                        window.location=\'{:url(\'index/common/common\')}\';");
document.writeln("                                    }else{");
document.writeln("                                        $(\'#alert\').html(\'<span style=\'color: #fff\'>\'+resp.ret+\'</span>\')");
document.writeln("                                    }");
document.writeln("");
document.writeln("                                }");
document.writeln("                            });");
document.writeln("");
document.writeln("                        }");
document.writeln("                    });");
document.writeln("");
document.writeln("                    // Set Form focus");
document.writeln("                    $(\'form#login .form-group:has(.form-control):first .form-control\').focus();");
document.writeln("                });");
document.writeln("            </script>");