     @find(id).destroy()
 
   @change: (callbackOrParams) ->
-    if typeof callbackOrParams is "function"
-      @bind("change", callbackOrParams)
+    if typeof callbackOrParams is 'function'
+      @bind('change', callbackOrParams)
     else
-      @trigger("change", callbackOrParams)
+      @trigger('change', callbackOrParams)
 
   @fetch: (callbackOrParams) ->
-    if typeof callbackOrParams is "function"
-      @bind("fetch", callbackOrParams)
+    if typeof callbackOrParams is 'function'
+      @bind('fetch', callbackOrParams)
     else
-      @trigger("fetch", callbackOrParams)
+      @trigger('fetch', callbackOrParams)
 
   @toJSON: ->
     @recordsValues()
   
   @fromJSON: (objects) ->
     return unless objects
-    if typeof objects is "string"
+    if typeof objects is 'string'
       objects = JSON.parse(objects)
     if isArray(objects)
       (new @(value) for value in objects)


$ = @jQuery or @Zepto or (element) -> element

unless typeof Object.create is "function"
  Object.create = (o) ->
    Func = ->
    Func.prototype = o
    new Func()

isArray = (value) ->
  Object::toString.call(value) is "[object Array]"
  
makeArray = (args) ->
  Array.prototype.slice.call(args, 0)


  @find: (id) ->
    record = @records[id]
    throw('Unknown record') unless record
    record.clone()

  @exists: (id) ->
