var self = this;
$(args.annotations).each(function (i,x) {

if ( this.type in self.annotations ) {
self.annotations[ this.type ].push(this);
return
}

self.annotations[ this.type ] = [ this ] ;

var label = $('<label>').appendTo(div)
.append( $('<input>', {
type: "checkbox",
value: this.type,
click: function() { self.toggleAnnotationType( $(this).val() ) }
} )
)
.append( this.type );
} );