 ---
 ---
+# ContactFormValidation
 class ContactFormValidation
   constructor: (@form, @flashDiv) ->
 
+    # Cookie
     class Cookie
-      # Class methods
       constructor: (@name, value, expiryInDays = 0) ->
         @expiry = ''
         if expiryInDays

        catch
          unescapedValue

      save: =>
        document.cookie = "#{@name}=#{escape @value}; expires=#{@expiry}; path=/"

      del: =>
        document.cookie = "#{@name}=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path="

    # Has the user already submitted a form?
    if Cookie.find 'state'
      $ @form
        .find 'button[type="submit"]'

              obj[node.name] = node.value
              obj

            # Iterate over the array returned by jQuery("form").serializeArray()
            # and save the values in an object where the key is the input name
            # and the value is the value
            normalize normalizedValues, object for object in serializedArray

            @send url, serializedString, normalizedValues, @submitButton, @flashDiv
    # Apply mark up to the fields to alert the user if there is an error
    @markup = (field, success)->
      parentDiv = field.parentElement
      $ parentDiv
