/**
 * Collection of checked out documents.
 */
var CheckedOutCollection = Backbone.Collection.extend({
	model: CheckedOutModel,
	url: '/intranet/rest/documents/checkin/',
	is_loaded: false,

	load: function ()
	{
		this.is_loaded = true;
		this.fetch({reset: 1});
	},

	isCheckedOut: function (doc_id)
	{
		var res = this.find(function (co) { return co.get('doc_id') == doc_id; } );
		return res ? true : false;
	}

});
