jQuery(document).ready(function(){$("form.loginForm input, form.loginForm select").keyup(function(a){if(a.keyCode==13){attemptLogin()}});setAnchorsStay()});function setAnchorsStay(){$("a.sglink").click(function(){sg_click_logout=false})}function unload_site_impl(){if(false&&sg_login&&sg_click_logout){attemptLogoutSilent()}}window.onbeforeunload=unload_site_impl;function sg_continue(){sg_click_logout=false}function attemptLogoutSilent(){$.ajax({type:"POST",url:"/attemptlogout/detail/"+Math.round(Math.random()),success:function(a){}});alert("SportsGeek: Logged out")}function attemptLogout(){$("#message_modal").html('<div class="processing">Logging out, please wait ...</div>');$.ajax({type:"POST",url:"/attemptlogout/detail/"+Math.round(Math.random()),success:function(b){$("#message_modal").html(b);var a=$("#logout_valid").html();if(a!=null){setTimeout("relocate('"+liveplainurl+"logout');",50)}else{$("#message_modal").html("Logout not valid.")}}})}function attemptLogin(){var a="form.loginForm";$("#loginresponse").html('<div class="processing">Processing information, please wait ...</div>');$.ajax({type:"POST",data:$(a).serialize(),url:"/attemptlogin/detail/"+Math.round(Math.random()),success:function(d){$("#loginresponse").html(d);$("#loginresponse").show("slide",{direction:"up"},100);var b=$("#login_valid").html();if(b!=null){var c=$("#mustVerify").html();if(c!=null){setTimeout("relocate('/verify');",300)}else{setTimeout("relocate('/play');",300)}}else{setTimeout("$( '#loginresponse' ).hide( 'slide', { direction: 'up' }, 100 );",4000)}}})}function attemptValidation(){var a="form.validateForm";$("#loginresponse").html('<div class="processing">Processing information, please wait ...</div>');$.ajax({type:"POST",data:$(a).serialize(),url:"/attemptvalidation/detail/"+Math.round(Math.random()),success:function(c){$("#loginresponse").html(c);$("#loginresponse").show("slide",{direction:"up"},100);var b=$("#validation_valid").html();if(b!=null){setTimeout("relocate('"+liveplainurl+"play');",300)}else{setTimeout("$( '#loginresponse' ).hide( 'slide', { direction: 'up' }, 100 );",4000)}}})}function resendCode(){var a="form.validateForm";$("#loginresponse").html('<div class="processing">Processing information, please wait ...</div>');$.ajax({type:"POST",data:$(a).serialize(),url:"/resendvalidationcode/detail/"+Math.round(Math.random()),success:function(b){$("#loginresponse").html(b);$("#loginresponse").show("slide",{direction:"up"},100);setTimeout("$( '#loginresponse' ).hide( 'slide', { direction: 'up' }, 100 );",4000)}})}function forgotPasswordSend(){var a="form.forgotPswdForm";$("#loginresponse").html('<div class="processing">Processing information, please wait ...</div>');$.ajax({type:"POST",data:$(a).serialize(),url:"/forgotpasswordsend/detail/"+Math.round(Math.random()),success:function(c){$("#loginresponse").html(c);$("#loginresponse").show("slide",{direction:"up"},100);var b=$("#forgot_valid").html();setTimeout("$( '#loginresponse' ).hide( 'slide', { direction: 'up' }, 100 );",4000)}})};