function Card(type, cost, vp, id, img) {
  this.type = type;
  this.gold = false;
  this.cost = cost;
  this.vp = vp;
  this.id = id;
  this.img = img;
  this.builtAt = "";

  this.produce = function() {
    if (this.type == 'p') {
      this.gold = deck.draw();
      this.drawGoldAt(this.builtAt);
    }
  }

  this.trade = function() {
    if (this.type == 'p') {
      this.gold = false;
      this.drawSmallAt(this.builtAt);
    }
  }

  this.drawSmallAt = function(docId) {
    document.getElementById(docId).childNodes[0].src = "images/small/" + this.img + ".jpg";
  }

  this.drawGoldAt = function(docId) {
    if (this.type == 'p') {
      document.getElementById(docId).childNodes[0].src = "images/gold/" + this.img + ".jpg";
    }
  }

  this.showLarge = function() {
    document.getElementById("largePic").childNodes[0].src = "images/large/" + this.img + ".jpg";
    document.getElementById("largePic").style.visibility = "visible";
  }

  this.hideLarge = function() {
    document.getElementById("largePic").style.visibility = "hidden";
  }
}
