DeathCat.disable_login_form_links=function(){$('.reglink').hide();$('.reglink').unbind('click',DeathCat.show_regform);$('.loginlink').unbind('click',DeathCat.show_loginform);};DeathCat.enable_login_form_links=function(){$('.reglink').show();$('.reglink').bind('click',DeathCat.show_regform);$('.loginlink').bind('click',DeathCat.show_loginform);};DeathCat.cancel_login_form=function(){var loginmessage='<span class="loginspan" style="display:none;"> The fun starts after you <a class="loginlink" href="/accounts/login/?next=/">login</a>! Not a member yet? <a class="reglink" href="/accounts/register/">Join</a> now! </span>';$('.loginmessage').empty();$('.loginmessage').prepend(loginmessage);$('.loginspan').fadeIn('slow');DeathCat.enable_login_form_links();return false;};DeathCat.show_regform=function(){var rform='<form class="regform" method="post" action="/accounts/register/" style="display:none;"> '+DeathCat.csrf_token+' <div> <label for="id_username">Username:</label> <input class="rightfield" id="id_username" type="text" name="username" maxlength="30" /> </div> <div> <label for="id_password1">Password:</label> <input class="rightfield" type="password" name="password1" id="id_password1" /> </div> <div> <label for="id_password2">Confirm password:</label> <input class="rightfield" type="password" name="password2" id="id_password2" /> </div> <div> <input class="rightbutton" type="submit" value="Register" /> <input id="cancelbutton" class="rightbutton" type="button" value="Cancel" /> </div> <div> <input type="hidden" name="next" value="'+location.pathname+'" /> </div> </form>';DeathCat.disable_login_form_links();$('.loginmessage').empty();$('.loginmessage').prepend(rform);$('.regform').fadeIn('slow');$('#id_username').focus();$('#cancelbutton').bind('click',DeathCat.cancel_login_form);return false;};DeathCat.show_loginform=function(){$('.loginmessage').empty();var lform='<form class="loginform" method="post" action="/accounts/login/" style="display:none;"> '+DeathCat.csrf_token+' <div> <label for="id_username">Username:</label> <input class="rightfield" id="id_username" type="text" name="username" maxlength="30" /> </div> <div> <label for="id_password">Password:</label> <input class="rightfield" type="password" name="password" id="id_password" /> </div> <div> <input class="rightbutton" type="submit" value="Login" /> <input id="cancelbutton" class="rightbutton" type="button" value="Cancel" /> </div> <div> <input type="hidden" name="next" value="'+location.pathname+'" /> </div> </form>';$('.loginmessage').prepend(lform);$('.loginform').fadeIn('slow');$('#cancelbutton').bind('click',DeathCat.cancel_login_form);$('#id_username').focus();return false;};$(document).ready(DeathCat.enable_login_form_links);
