$(document).ready(function () { if (location.href.split("?next=")[1] != undefined) { next = location.href.split("?next=")[1].substr(3); } else { next = ""; } $('.login-box form').attr('action', "/Login@Process?next=%2F" + next); $('.social-login a').each(function () { $(this).attr('href', $(this).attr('href') + "&next=%2F" + next); }); $('.login-box-group input').on('input', function () { if (this.value == "") { $(this).parent().removeClass('active'); } else { $(this).parent().addClass('active'); } }); }); function ResendVerification(obj, id) { $.post("/Verify@ResendVerification", { ID: id }, function () { $(obj).attr('onclick', ''); $(obj).html('Verification email sent again.'); }); } function loginComplete() { error = false; $('#login_email, #login_pass').each(function () { if ($(this).val() == "") { error = true; $(this) .animate({ marginLeft: -10 }, 100) .delay(0) .animate({ marginLeft: 10 }, 100) .delay(0) .animate({ marginLeft: -10 }, 100) .delay(0) .animate({ marginLeft: 10 }, 100) .delay(0) .animate({ marginLeft: "" }, 100); } }); if (!error) $('#login-box form')[0].submit(); else return false; }