/**
 * Handles Account
 */

(function(){
    if(!window.cs) {
        return;
    }
    
    var account = window.cs.account = {
        // default options/settings
        empty: null
    };
    
    account.init = function() {
        // initialize default actions
        
        // Sets up Email/Mobil Tabs
        if(location.href.indexOf('mobile') == -1) {
            $("#notifications").tabs({ selected: 1 });
        } else {
            $("#notifications").tabs();        
        }
        
        // Change Picture
        $(".changePicture").click(function(){
            $(this).hide();
            $("#userAvatar").show();
            return false;
        });
        
        // Public Profile URL
        $("#profileURL").focus(function(){
            // Select input field contents
            this.select();
        });                     
        // Disable Submit on Enter
        $("#account_form").keypress(function(e) {
            if (e.which == 13) {
                return false;
            }
        });
		
    };
})();
