var Ellington = window.Ellington || {};


/*
 * Shape
 */

Ellington.Shape = (function($) {
  return {
    notch: function() {
      if (!$.browser.msie) {
        var canvas = $('<canvas width="30" height="20"></canvas>');
        if (canvas.get(0).getContext) {
          var ctx = canvas.get(0).getContext('2d');
          ctx.fillStyle = 'rgba(255,255,255,1)';

          ctx.shadowOffsetX = 0;
          ctx.shadowOffsetY = 1;
          ctx.shadowBlur = 5;
          ctx.shadowColor = 'rgba(0,0,0,.3)';

          ctx.beginPath();
          ctx.moveTo(15,0);
          ctx.lineTo(30,15);
          ctx.lineTo(30,20);
          ctx.lineTo(0,20);
          ctx.lineTo(0,15);
          ctx.fill();

          ctx.shadowColor = 'rgba(0,0,0,0)';

          ctx.strokeStyle = '#ccc';
          ctx.beginPath();
          ctx.moveTo(0,15);
          ctx.lineTo(15,0);
          ctx.lineTo(30,15);
          ctx.stroke();
        }
        return canvas;
      }
      else {
        return $('<div class="canvas"></div>');
      }
    }
  };
})(jQuery);
