/*jslint laxbreak:true */
/*jslint laxcomma:true */
/*jslint loopfunc:true */
/*jslint strict:true */
/*jslint browser:true */
/*jslint devel:true */
define([
	"underscore"
	, "backbone"

	, "models/server"

	, "backbone-localstorage"
]
, function (_, Backbone, ServerModel) {
	"use strict";

	var Server		= Backbone.Collection.extend({
		model:			ServerModel

		, localStorage:	new Backbone.LocalStorage("daap-servers")

		, initialize:	function () {
			_.bindAll(this, "relayClientTrigger");

			//this.on("all", this.relayClientTrigger);

			return Server.__super__.initialize.call(this, arguments);
		}
/*
		, relayClientTrigger:	function() {
			var eventName	=  arguments[0]
			;
console.log(eventName);
			if (eventName.indexOf("client") === 0) {
				delete arguments[0];
				//this.trigger(eventName, _.values(arguments));
			}
		}*/
	});

	return Server;
});