code refactoring for card.js.coffee
Merge pull request #514 from shinnn/refactoring

code refactoring for card.js.coffee