   recaptcha_verification_url: "/recaptcha_verification.php"
   recipients: []
   recaptcha_placeholder_text: "Bitte gib die 2 Worte ein..."
+  button_text: "Absenden"
   button_sending_text: "Wird Gesendet..."
   button_sent_text: "Gesendet!"
   form_el: null

    else
      $.error "the perfect contactform needs the ReCaptcha API"
  
  # set the submit button states
  set_button_states: ->
    config.btn_submit.attr
      "data-sending-text": config.button_sending_text
      "data-sent-text": config.button_sent_text
  
  # bind the forms submit event
  bind_submit_handler: ->
    config.form_el.submit (e) ->
      # prevent form from sending
      e.preventDefault()
      
      # bring submit button into sending state
      config.btn_submit.button "sending"
      
      # define params for recaptcha verification
      recaptcha_params =
        recaptcha_response_field: Recaptcha.get_response()
        recaptcha_challenge_field: Recaptcha.get_challenge()
      
      # check recaptcha
      $.post config.recaptcha_verification_url, recaptcha_params, (response) ->
        if response is 1
          # set mandrill params
          mandrill_params =
            message:
              from_email: $("#input_email").val()
              from_name: $("#input_name").val()
              to: config.recipients
              subject: $("#input_subject").val()
              text: $("#input_message").val()
          
          # send the message
          m.messages.send mandrill_params, (res) ->
            console.log res if console?
            # output message
            
            # set button into sent state
            config.btn_submit.button "sent"
            
            # reload recaptcha
            Recaptcha.reload()
            
            # reset the form
            config.form_el[0].reset()
          , (err) ->
            console.log err if console?
        else
          console.log "the recaptcha solution is wrong" if console?
      

$.fn.contactform = (method,options...) ->

  mandrill: null

methods =
  #
  # init
  #
  init: (options) ->
    # set options
    $.extend config, options
