var username = 0; var password = 0; $(function() { $('#sign-in-action').click(function() { var sign_in = document.getElementById('sign-in'); if (sign_in.style.display == 'none') { $('#sign-in').fadeIn('fast'); $('#slogan, .header-inner').animate({left:"-1500px"}); document.getElementById('user-name').focus(); return false; } else { $('#sign-in').fadeOut('fast'); $('#slogan, .header-inner').animate({left:"20px"}); return false; }; }); $('#user-name').keyup(function(event) { if ($('#user-name').val().length > 0) { $('#user-name-label').hide(); } else { $('#user-name-label').show(); }; }); $('#user-password').keyup(function(event) { if ($('#user-password').val().length > 0) { $('#user-password-label').hide(); } else { $('#user-password-label').show(); }; }); if ($('#user-name').val().length > 0) { $('#user-name-label').hide(); } else { $('#user-name-label').show(); }; if ($('#user-password').val().length > 0) { $('#user-password-label').hide(); } else { $('#user-password-label').show(); }; });