             # alter offset
             offset += layout.font_stretch * width
 
+    validate: -> 
+      # init result var
+      result = null
+      
+      # split and reverse number
+      chars = @number.split("")
+      
+      # init counter
+      counter = 0
+      
+      # loop through chars
+      $.each chars, (key, value) ->
+        
+        # check if odd
+        if key % 2 is 0
+          
+          # count up counter
+          counter += parseInt(value, 10)
+
+        else
+          
+          # count up counter
+          counter += 3 * parseInt(value, 10)
+      
+      # check if result % 10 is 0
+      if (counter % 10) is 0
+        result = true
       else
-        # fire onError callback
-        settings.onError.call this
-
-) jQuery+        result = false
+
+      alert result
+      
+      # return result
+      result
+
+  # create plugin object
+  $.fn[pluginName] = (options) ->
+    @each ->
+      if !$.data(@, "plugin_#{pluginName}")
+        $.data(@, "plugin_#{pluginName}", new Plugin(@, options))
        code += z[parts[i]]
        i++

      # check if canvas-element is available
      if canvas.getContext

        # get draw context
        context = canvas.getContext("2d")

        # set fill color
        context.fillStyle = settings.color

        # init var for offset in x-axis
        left = (if settings.prefix then canvas.width * layout.prefix_offset else 0)

        # get chars of code for drawing every line
        lines = code.split("")

        context.fillRect left, 0, item_width, border_height

        # add number representation if settings.number == true
        if @settings.number

          # set font style
          context.font = layout.font_size * height + "px monospace"

          # get prefix
          prefix = @number.substr(0, 1)

          # print prefix
          context.fillText prefix, 0, border_height * layout.font_y  if @settings.prefix

          # init offset
          offset = item_width * 3 + ((if @settings.prefix then layout.prefix_offset * @element.width else 0))

          # split number
          chars = @number.substr(1, 6).split("")

          # loop though left chars
          $.each chars, (key, value) ->
