var ShellModel = function() {

    var _self = this;
    this.configData = null;
    this.isPlaying = true;

    this.user_details = {
        title: "Client",
        userName: {
            'firstName': 'first_1',
            'lastName': 'last_1',
            'course': "Employbridge",
            'aid': "",
            'cid': "",
            'wid': ""
        },
        isFirstTime: 1,
        // lesson_status: _cMNo+'_'+_cPNo,
        lesson_status: '',
        // pr: _cMNo+'_'+_cPNo,
        // sts:    "0: Not Attempted", "1:Inprogress", "2:Visited"
        suspend_data: [],
        sts: 0,
        // status:    "0:Not Attempted", "1:In completed", "2:Completed"
        sr: 0
    }

    this.init = function(config) {
     //   console.log('ShellModel:   init');
        let _config = config || 'shell_config'
        Utils.parseJson('./shell/data/'+_config+'.json', updateConfigData)
    }

    let updateConfigData = function(data) { 
        _self.configData = JSON.parse(data);       
        _self.user_details['title'] = _self.configData['title'];
        _self.user_details['userName']['course'] =  _self.configData['title']; 
        _self.updateTitle(); 
        $("#global_wrapper").trigger('configLoaded');      
    }

    this.updateTitle = function(){
       $("title").html(_self.configData['title'])
       $("#shell_body .course_heading").html(_self.configData['heading'])
    }



    return this;
}