
function submitLairForVoting(){new Ajax.Request('/index.php',{method:'post',asynchronous:false,parameters:{actionType:'ajax',action:'spotlight',subAction:'submitMyLairForVoting'},onSuccess:function(transport){var response=transport.responseText.evalJSON();switch(response.status){case'success':$('submitLairBtn').hide();$('submittedLair').show();Stackbox.get().deactivate();updateNavAvatarInfo();break;case'error':Stackbox.get().activate({content:response.msg});break;case'redirect':window.location.href=response.redirect;break;}}});}
function submitAvatarForVoting(){new Ajax.Request('/index.php',{method:'post',asynchronous:false,parameters:{actionType:'ajax',action:'spotlight',subAction:'submitMyAvatarForVoting'},onSuccess:function(transport){var response=transport.responseText.evalJSON();switch(response.status){case'success':$('submitAvatarBtn').hide();$('submittedAvatar').show();Stackbox.get().deactivate();updateNavAvatarInfo();break;case'error':Stackbox.get().activate({content:response.msg});break;case'redirect':window.location.href=response.redirect;break;}}});}
function showAvatarSubmission(){new Ajax.Request('/index.php',{method:'post',asynchronous:false,parameters:{actionType:'ajax',action:'spotlight',subAction:'getAvatarSubmissionPage'},onSuccess:function(transport){var response=transport.responseText.evalJSON();switch(response.status){case'success':Stackbox.get().activate({content:response.msg});updateFlir();break;case'error':$('submitAvatarBtn').hide();$('submittedAvatar').show();break;case'redirect':window.location.href=response.msg;break;}}});}
function showLairSubmission(){new Ajax.Request('/index.php',{method:'post',asynchronous:false,parameters:{actionType:'ajax',action:'spotlight',subAction:'getLairSubmissionPage'},onSuccess:function(transport){var response=transport.responseText.evalJSON();switch(response.status){case'success':Stackbox.get().activate({content:response.msg});updateFlir();break;case'error':$('submitLairBtn').hide();$('submittedLair').show();break;case'redirect':window.location.href=response.msg;break;}}});}
function updateFlir(){FLIR.replace('h2.overlaySubmitBtn',new FLIRStyle({mode:'fancyfonts',ff_BlurEdges:true}));}
function showEmailForm(){Effect.toggle('emailAFriend','blind',{duration:0.5,afterFinish:function(){}});}
function showSpotLightSubmission(){new Ajax.Request('/index.php',{method:'post',asynchronous:false,parameters:{actionType:'ajax',action:'spotlight',pageAction:'showSpotLightSubmission'},onSuccess:function(transport){var response=transport.responseText.evalJSON();switch(response.status){case'error':Stackbox.get().activate({content:response.msg});break;case'redirect':window.location.href=response.msg;break;}}});}
