App.Collections.Settings = Backbone.Collection.extend({
	model: App.Models.Settings,
	activeAccount: App.primaryAccount,

	url: function(){
		return App.baseUrl + '/inbox/settings';
	}

});

App.Collections.Settings.prototype.getActiveAccount = function(){
	return this.activeAccount;
}

App.Collections.Settings.prototype.setActiveAccount = function(account){
	this.activeAccount = account;
}

App.Collections.Settings.prototype.getActiveAccountSettings = function(){
	var model = null;

	_.each(this.models,function(m,i){
		if(m.get('Account') == App.settings.activeAccount){
			model = m;
		}
	});
	return model;
}
