
Ugame.addHandlers({activatedAccount:function(success,data){feedbackWindow.hide();if(success){if(data.action=='activated'){document.location.href='/';}}},loggingIn:function(success,data){if(success){document.location.href='/';}else{Ugame.Msg.error('Invalid Login!',data.error);}},invitationCode:function(success,data){if(success){if(data.action=='register'){Ugame.Msg.info('Invite Code Valid','The invite code you have entered is valid! You are getting closer to access the BETA of UGAME. However, now you need to register. Click OK and you will be redirected to the registration page!',function(pressed){document.location.href='/register/?code='+data.code});}else if(data.action=='choose'){feedbackWindow=new Ugame.Window('Invite Code Valid',{content:data.html,width:350,zIndex:91,buttons:[{name:'activate',caption:'Activate!',handler:function(){Ugame.makeRequest({url:'/welcome/index/login/',form:'activate-form',handler:'activatedAccount'});this.hide();}},{name:'register',caption:'Register',handler:function(){document.location.href='/register/?code='+data.code;this.hide();}}]});feedbackWindow.show();}else{Ugame.Msg.info('Congratulations!','Your account has been given access to the BETA of UGAME! You can now login and test the site out. We\'re anxiously looking for your feedback, so don\'t be shy sending it to us, even if it\'s bad!');}}else{Ugame.Msg.error('Invalid Code',data.error);}},signedUp:function(success,data){if(success){Ugame.Msg.info('Signed Up!','Your e-mail has been saved in our database! Thanks for showing your interest, we will notify you as soon as we have something to show you!');}else{Ugame.Msg.error('Already Signed Up','It appears that your e-mail is already in our database. This may be because you have registered before on one of our partner sites (Fnatic Team and TehWire) or that you have already shown your interest here.');}}});$(function(){function resizeCheck(){if($(window).width()<=1024){$(document.body).addClass('small');}else{$(document.body).removeClass('small');}};resizeCheck();$(window).resize(resizeCheck);$('a.about-text, a.about-icon').click(function(ev){ev.preventDefault();ev.target.blur();var showField=$(this).stripId();$('.about-text').removeClass('active');$('#text-'+showField).addClass('active');$('.ugame-text-box').addClass('hide');$('#field-'+showField).removeClass('hide');});$('#text-open').click();$('#login-button').click(function(ev){ev.preventDefault();ev.target.blur();$('#login-form').submit();});$('#login-form').submit(function(ev){ev.preventDefault();Ugame.makeRequest({url:'/welcome/index/login/',handler:'loggingIn',form:'login-form'});return false;});$('#invitation-submit').click(function(ev){ev.preventDefault();ev.target.blur();$('#invitation-form').submit();});$('#invitation-form').submit(function(ev){ev.preventDefault();Ugame.makeRequest({url:'/welcome/index/invitation/',form:'invitation-form',handler:'invitationCode'});return false;});$('.signup-here').click(function(ev){ev.preventDefault();ev.target.blur();$('#signup-form').submit();});$('#signup-form').submit(function(ev){ev.preventDefault();Ugame.makeRequest({url:'/welcome/index/signup/',form:'signup-form',handler:'signedUp'});return false;});})