//	@import com.hedgehoglab.solomon.model.CaseListModel;
//	@import com.hedgehoglab.solomon.model.TaskListModel;
//	@import com.hedgehoglab.solomon.model.NoteListModel;
//	@import com.hedgehoglab.solomon.model.UsersModel;
//	@import com.hedgehoglab.solomon.model.CaseFilterModel;
//	@import com.hedgehoglab.solomon.model.TaskTypeModel;
//	@import com.hedgehoglab.solomon.model.ContactsModel;
//	@import com.hedgehoglab.solomon.model.TagsModel;

//  @import com.hedgehoglab.solomon.view.AdminView;
//  @import com.hedgehoglab.solomon.view.UserListView;
//  @import com.hedgehoglab.solomon.view.GenericListView;

//  @import com.hedgehoglab.solomon.service.CasesService;
//  @import com.hedgehoglab.solomon.service.TasksService;
//  @import com.hedgehoglab.solomon.service.TagsService;
//  @import com.hedgehoglab.solomon.service.UsersService;
//  @import com.hedgehoglab.solomon.service.NotesService;
//  @import com.hedgehoglab.solomon.service.ContactsService;

//  @import com.hedgehoglab.solomon.controller.AdminViewController;

var USER_ID = null;

$(function(){
	
	try {
		
	var _cases_service=new CasesService({});
	var _user_service=new UsersService({});
	var _contacts_service=new ContactsService({});
	var _notes_service=new NotesService({});
	var _tasks_service=new TasksService({});
	var _tag_service=new TagsService({});
	
	var _case_model=new CaseListModel({});
	var _user_model=new UsersModel({});
	var _contacts_model=new ContactsModel({});
	var _full_contacts_model=new ContactsModel({});
	var _task_list_model=new TaskListModel({});
	var _note_list_model=new NoteListModel({});
	var _task_type_model=new TaskTypeModel({});
	var _tag_model=new TagsModel({});
	var _categorie_model=new TagsModel({});
	var _system_model=new TagsModel({});
	var _database_model=new TagsModel({});
	var _trend_model=new TagsModel({});
	
	var _tabModel = ['Users','Roles','Database','System','Trends','Tags','Categories'];
	var _tabModel = ['Users','Categories','Tags','System','Database','Trends'];
	var _tabModel = ['Users','Tags'];
	
	var _admin_view=new AdminView({element:$('.admin-application-pane'),tabModel:_tabModel});
  var _user_list_view=new UserListView({element:'#adminUsers',model:_user_model,user_service:_user_service});
  var _tag_list_view=new GenericListView({element:'#adminTags',model:_tag_model,template:'admin/tag-tab-view'});
	
  // $.each(_tabModel,function(i,n){
  //    var _varName = n.toLowerCase();
  //    if (n.charAt(n.length-1)=='s') _varName = n.substring(0,n.length-1).toLowerCase();
  //    var _temp_view = new GenericListView({element:'#admin'+n,
  //      model:eval('_'+_varName+'_model'),
  //      template:'admin/'+_varName+'-tab-view'});
  //   });
	
	var _admin_view_controller=new AdminViewController({admin_view:_admin_view,
		user_model:_user_model,
		user_service:_user_service,
		tag_model:_tag_model,
		tag_service:_tag_service});

	}
	catch (e){
		// console.log(e);
	}
});