                     @suggestionBox?.hide()
                     # domainName.setValidation domainNameValidation
                     domains.hide()
-                    extensionSelect.hide()
                     regYears.hide()
                     checkButton.hide()
                     registerButton.hide()

      for domain in userDomains
        if not domain.regYears > 0
          domainList.push {title:".#{domain.domain}", value:domain.domain}
      {domains, extensionSelect} = @forms["Domain Address"].inputs
      domains.setSelectOptions domainList
      availableTldList = ["com", "net", "org"]
      extensionsList = ({title:'.'+ext, value:ext} for ext in availableTldList)
      extensionSelect.setSelectOptions extensionsList
      extensionSelect.setDefaultValue availableTldList[0]

  checkAvailability: ->
    form = @forms["Domain Address"]
    domain            = form.inputs.domainName.getValue()
    tld               = form.inputs.extensionSelect.getValue()
    {createButton, checkButton, registerButton} = form.buttons
    unless domain.match(/^\w+$/)
      notifyUser "Please select the extension from the select box"
      checkButton.hideLoader()
      return
    @clearSuggestions()
    KD.remote.api.JDomain.getTldPrice tld, (tldPrice) => 
      KD.remote.api.JDomain.isDomainAvailable domain, tld, (avErr, status, price, suggestions) =>

    {createButton, registerButton} = form.buttons
    @clearSuggestions()

    {DomainOption, domainName, regYears, domains} = form.inputs
    domainInput       = domainName
    domainName        = form.inputs.domainName.getValue()

    domainOptionValue = DomainOption.getValue()

    if domainOptionValue is 'new'
      splittedDomain    = domainName.match(/([\w\-]+)\.(.*)/)
      domain            = splittedDomain[1]
      tld               = splittedDomain[2]
      form = @forms["Domain Address"]
      {createButton, registerButton} = form.buttons
      paymentController = KD.getSingleton('paymentController')
      group             = KD.getSingleton("groupsController").getCurrentGroup()
      registerTheDomain = ->
          KD.remote.api.JDomain.registerDomain
            domainName : domainInput.getValue()
            years      : regYears.getValue()
          , (err, domain) =>
            if err
              warn err
              console.log err
              notifyUser "An error occured. Please try again later."
            else
              @showSuccess domain
              domain.setDomainCNameToProxyDomain()
            registerButton.hideLoader()

      paymentController.getBillingInfo 'user', group, (err, account)->
        need = err or not account or not account.cardNumber
        if need
          paymentController.setBillingInfo 'user', group, (success)->
            if success
              registerTheDomain()
        else
          registerTheDomain()


    else if domainOptionValue is 'existing'
      @createDomain {domainName, regYears:0, domainType:'existing'}, (err, domain)=>
        createButton.hideLoader()
        if err
          warn err
