text: // Generated by CoffeeScript 1.3.3
  (function(){jQuery(function(){var e;return e={tags:[],currentTag:{},init:function(){return jQuery(".textLayer").live("click",e.click),jQuery("#addTag").live("click",e.addHandler),jQuery("#toolbarContainer .innerCenter").append('<button class="toolbarButton" id="tagSubmit">Submit</a>'),jQuery("#tagSubmit").live("click",e.submit)},click:function(t){var n,r,i,s,o;return i=$(this).offset(),r=t.clientX-i.left,o=t.clientY-i.top,n=$(this).height()-o,s={x:r,y:n,page:$("#pageNumber").val()},e.popup(t.pageX,t.pageY,s)},popup:function(t,n,r){var i;return e.reset(),i=$('<div id="tagger"></div>').css("top",n).css("left",t),i.html(Mustache.render($("#taggerTemplate").html(),r)),e.currentTag=r,$("body").append(i)},addHandler:function(t){var n;return t.preventDefault(),n=e.currentTag,n.name=$("#tagName").val(),n.type=$("#tagType").val(),e.add(n),e.reset(),!1},reset:function(){return $("#tagger").remove(),e.currentTag={}},add:function(t){return e.tags.push(t)},submit:function(){return alert("Here are your tags:\n\n"+JSON.stringify(e.tags))}},window.tagger=e,e.init()})}).call(this);