# libs
window.$ = require('jquery')

# on load
$ ->
  # libs requiring full DOM
  io = require 'socket.io-client'

  # style sheet
  require './style/custom.scss'

  # init Socket.IO
  socket = io()

  $('form[name="fftcg-login"]').submit ->
    data =
      uname:    $('input[name="uname"]').val()
      password: $('input[name="password"]').val()
    @reset()
    socket.emit 'login', data
    false
