(function(d,p){var j,g,a,h=d.Chart,k=d.extend,m=d.each;a=["path","rect","circle"];g={top:0,left:0,center:0.5,middle:0.5,bottom:1,right:1};var o=p.inArray,l=d.merge;function f(s){var r,q;q={xAxis:0,yAxis:0,title:{style:{},text:"",x:0,y:0},shape:{params:{stroke:"#000000",fill:"transparent",strokeWidth:2}}};r={circle:{params:{x:0,y:0}}};if(r[s]){q.shape=l(q.shape,r[s])}return q}function i(q){return Object.prototype.toString.call(q)==="[object Array]"}function n(q){return typeof q==="number"}function e(q){return q!==j&&q!==null}function c(w,u,r,t,v){var q=w.length,s=0;while(s-1){K[w]=B.translate(K[w])}else{if(o(w,["height","y"])>-1){K[w]=q.translate(K[w])}}}if(K.width){K.width-=B.toPixels(0)-B.left}if(K.x){K.x+=B.minPixelPadding}if(v.shape.type==="path"){c(K.d,B,q,D,C)}}if(v.shape.type==="circle"){K.x+=K.r;K.y+=K.r}z=true;s.attr(K)}A.bBox=null;if(!n(I)){r=A.getBBox();I=r.width}if(!n(G)){if(!r){r=A.getBBox()}G=r.height}if(!n(u)){u=g.center}if(!n(t)){t=g.center}D=D-I*u;C=C-G*t;if(F.animation&&e(A.translateX)&&e(A.translateY)){A.animate({translateX:D,translateY:C})}else{A.translate(D,C)}},destroy:function(){var q=this,t=this.chart,s=t.annotations.allItems,r=s.indexOf(q);if(r>-1){s.splice(r,1)}m(["title","shape","group"],function(u){if(q[u]){q[u].destroy();q[u]=null}});q.group=q.title=q.shape=q.chart=q.options=null},update:function(q,r){k(this.options,q);this.linkObjects();this.render(r)},linkObjects:function(){var s=this,u=s.chart,r=s.linkedObject,q=r&&(r.id||r.options.id),t=s.options,v=t.linkedTo;if(!e(v)){s.linkedObject=null}else{if(!e(r)||v!==q){s.linkedObject=u.get(v)}}}};k(h.prototype,{annotations:{add:function(r,v){var u=this.allItems,s=this.chart,t,q;if(!i(r)){r=[r]}q=r.length;while(q--){t=new b(s,r[q]);u.push(t);t.render(v)}},redraw:function(){m(this.allItems,function(q){q.redraw()})}}});h.prototype.callbacks.push(function(r){var q=r.options.annotations,s;s=r.renderer.g("annotations");s.attr({zIndex:7});s.add();r.annotations.allItems=[];r.annotations.chart=r;r.annotations.group=s;if(i(q)&&q.length>0){r.annotations.add(r.options.annotations)}d.addEvent(r,"redraw",function(){r.annotations.redraw()})})}(Highcharts,HighchartsAdapter));