/***
TiddlySpace extensions for [[chrjs]]
***/
//{{{
(function($) {

tiddlyweb.routes.identities = "{host}/users/{username}/identities";
var IdentitiesCollection = function(user) {
	tiddlyweb.Collection.apply(this, ["identities", user.host, {
		username: user.username
	}]);
};
IdentitiesCollection.prototype = new tiddlyweb.Collection();
jQuery.extend(IdentitiesCollection.prototype, {
	add: function(identity, callback, errback) {
		var tiddler = new tiddlyweb.Tiddler(identity);
		tiddler.bag = new tiddlyweb.Bag("MAPUSER", this.host);
		tiddler.put(callback, errback);
	},
	get: function(callback, errback) {
		var uri = this.route();
		jQuery.ajax({
			type: "get",
			dataType: "json",
			url: uri,
			success: function(uris, status, xhr) {
				callback(uris, status, xhr);
			},
			error: function(xhr, error, exc) {
				errback(xhr, error, exc, self);
			}
		});
	}
});

tiddlyweb.User.prototype.identities = function() {
	return new IdentitiesCollection(this);
};

});
//}}}

@@ -634,22 +634,17 @@
 te();%0A%09%09
-jQuery
+$
 .ajax(%7B%0A
@@ -964,16 +964,24 @@
 ;%0A%7D;%0A%0A%7D)
+(jQuery)
 ;%0A//%7D%7D%7D%0A

make sure identitity code actually gets run