CI = {};
CI.Lang = {};
CI.Lang.fullnamehead = "Full Name";
CI.Lang.fullnamepara = "Please enter your first and last name in the box provided.";
CI.Lang.usernamehead = "User Name";
CI.Lang.usernamepara = 'Please enter a username for CloudIgniter. This will be your username for FTP, SSH, MySQL, and the CloudIgniter web application, so please choose something you like and will remember.';
CI.Lang.passwordhead = 'Password';
CI.Lang.passwordpara = 'Please enter a password. Just like your username, this password will be used for FTP, SSH, MySQL, and the CloudIgniter web application.';
CI.Lang.passwordconfirmationhead = 'Password Confirmation';
CI.Lang.passwordconfirmationpara = 'We\'re pretty sure you\'ve done this before. Make sure this password matches the one you entered above';
CI.Lang.emailhead    = 'Email Address';
CI.Lang.emailpara    = 'Please enter an email address where we can contact you if need be. Receipts and the like will also come to this address. We hate spam just as much as you do. We will never sell you email to anyone else.';
CI.Lang.domainnamehead = 'Domain Name';
CI.Lang.domainnamepara = 'Enter the name of the domain you would like us host for you (you can add more if your plan permits, once you are logged in). If you have selected the free Mist plan, your domain must look like "example.getcloudigniter.com". Otherwise, enter a full domain name including TLD, such as "getcloudigniter.com". "http://" is not required.';

$(document).ready(function(){

	$('.vid').colorbox({iframe:true, innerWidth:640, innerHeight:360});

    mpmetrics.track('Page View', {'page': 'Coming Soon', 'Partner': partner});

    $('#registerform input').focus(function() {
        
        $('#signup-helper').hide();
        
        field = $(this).attr('name');
        head = eval('CI.Lang.' + field + 'head');
        para = eval('CI.Lang.' + field + 'para');
        
        $('#signup-helper h3').html(head);
        $('#signup-helper p').html(para);
        
        $('#signup-helper').fadeIn();
        
    }).blur(function() {
        $('#signup-helper').fadeOut();
    });

    $('input[name=username], input[name=password]').keypress(function(e){
        if(e.which == 13)
        {
            $(this).parents('form').submit();
            e.preventDefault();
        }
    });

});

