+ $overlay.css({position: 'absolute', height: h, left: x, top: y, width: '95%'});
+ $($origin[0].offsetParent).append($overlay);
+ $origin.data('edit-overlay', $overlay);
+
+ this.model.getXMLPart($origin, function(path, data) {
+ $('textarea', $overlay).val(data);
+ });
+
+ if($origin.is("*[x-annotation-box]"))
+ {
+ var $b = $origin.parent();
+ if(this.currentFocused) {
+ // if some other is focused
+ if($b[0] != this.currentFocused[0]) {
+ this.unfocusAnnotation();
+ this.focusAnnotation($b);
+ }
+ // already focues
+ }
+ else { // nothing was focused
+ this.focusAnnotation($b);
+ }
+ }
+ else { // this item is not focusable
+ if(this.currentFocused) this.unfocusAnnotation();
+ }
+
+ this.currentOpen = $origin;
+ $origin.attr('x-open', 'open');
+