function colorCardSort(a, b) {
      var colorA = a['c'] || 'X',
        colorB = b['c'] || 'X';
      if (colorA > colorB) {
        return 1;
      } else if (colorA < colorB) {
        return -1;
      } else {
        return alphabeticalCardSort(a, b);
      }
    }
// sort by color of cards, then alphabetically
sort by color of cards, then alphabetically
sort by color of cards then alphabetically
function colorCardSort(a, b) {
      var colorA = a['c'] || 'X',
        colorB = b['c'] || 'X';
      if (colorA > colorB) {
        return 1;
      } else if (colorA < colorB) {
        return -1;
      } else {
        return alphabeticalCardSort(a, b);
      }
    }
function colorCardSort ( a , b ) { var colorA = a [ 'c' ] || 'X' , colorB = b [ 'c' ] || 'X' ; if ( colorA > colorB ) { return 1 ; } else if ( colorA < colorB ) { return - 1 ; } else { return alphabeticalCardSort ( a , b ) ; } }
sort by color of cards, then alphabetically
sort by color of cards then alphabetically