!function(e){jQuery.plot.plugins.push({init:function(e){function o(o){i.locked||-1!=i.x&&(i.x=-1,e.triggerRedrawOverlay())}function t(o){if(!i.locked)if(e.getSelection&&e.getSelection())i.x=-1;else{var t=e.offset();i.x=Math.max(0,Math.min(o.pageX-t.left,e.width())),i.y=Math.max(0,Math.min(o.pageY-t.top,e.height())),e.triggerRedrawOverlay()}}var i={x:-1,y:-1,locked:!1};e.setCrosshair=function(o){if(o){var t=e.p2c(o);i.x=Math.max(0,Math.min(t.left,e.width())),i.y=Math.max(0,Math.min(t.top,e.height()))}else i.x=-1;e.triggerRedrawOverlay()},e.clearCrosshair=e.setCrosshair,e.lockCrosshair=function(o){o&&e.setCrosshair(o),i.locked=!0},e.unlockCrosshair=function(){i.locked=!1},e.hooks.bindEvents.push(function(e,i){e.getOptions().crosshair.mode&&(i.mouseout(o),i.mousemove(t))}),e.hooks.drawOverlay.push(function(e,o){var t=e.getOptions().crosshair;if(t.mode){var n=e.getPlotOffset();o.save(),o.translate(n.left,n.top),-1!=i.x&&(o.strokeStyle=t.color,o.lineWidth=t.lineWidth,o.lineJoin="round",o.beginPath(),-1!=t.mode.indexOf("x")&&(o.moveTo(i.x,0),o.lineTo(i.x,e.height())),-1!=t.mode.indexOf("y")&&(o.moveTo(0,i.y),o.lineTo(e.width(),i.y)),o.stroke()),o.restore()}}),e.hooks.shutdown.push(function(e,i){i.unbind("mouseout",o),i.unbind("mousemove",t)})},options:{crosshair:{mode:null,color:"rgba(170, 0, 0, 0.80)",lineWidth:1}},name:"crosshair",version:"1.0"})}();