Trouble reading multinomial naive bayes notation

$C_m$: m = most likely class (wanted to write C subscript MAP for "maximum a posteriori" but couldn't do MAP with MathJax)

$C_N$: N= NB = Naive Bayes (I wanted to write C subscript NB, but couldn't do both letters as above)

x: document d is represented as $x_n$ features or words

$c_j$: I think it's a class j

Source is here on page 27: http://www.stanford.edu/class/cs124/lec/naivebayes.pdf

Anyway,

\begin{aligned} C_m &= \mathop{\text{argmax}}_{c\in C} P(c|d) \\&= \mathop{\text{argmax}}_{c \in C} \frac{P(d|c)P(c)}{P(d)} \qquad \text{(Bayes Rule)} \\&= \mathop{\text{argmax}}_{c\in C} P(d|c)P(c) \end{aligned}

Firstly, I thought Bayes Rule was just $\frac{P(d|c)}{P(d)}$, which is just conditional probability of the number of occurrences of {c & d}/d, so why is $P(c)$ multiplied by $P(d|c)$? And why is $c|d$ flipped to $d|c$?

Also, for multinomial naive bayes classifier, we have:

$$C_N = \mathop{\text{argmax}}_{c \in C} P(c_j)\prod P(x | c).$$

I'm not sure how to read that equation... Is it saying Classifiers for N = the max probability of class j * PI of x in X * Probability of (x given c)?

If someone could help break down that notation that would be great.

Thanks!

-
I attempted to rewrite main parts of your question using mathjax, please check I haven't changed any meaning anywhere. – Kirill Jul 12 '13 at 4:32
Bayes' theorem is the statement that $P(c|d) = P(d|c)P(c)/P(d)$ (it follows from the fact that $P(A|B)=P(A,B)/P(B)$). (en.wikipedia.org/wiki/Bayes'_theorem) The reason one would want to "flip" $P(c|d)$ into $P(d|c)$ is that when $d$ stands for observed data, one is supposed to know exactly what $P(d|c)$ is, but one doesn't necessarily know what $P(c|d)$ is, it needs to be calculated by Bayes' theorem. – Kirill Jul 12 '13 at 4:36
It is hard to attempt to answer the second part of your question without knowing what you mean by $N$, $x$, $c_j$, etc. Can you make the questions clearer, please? Also, there is always stats.SE for questions related to machine learning. – Kirill Jul 12 '13 at 4:38
@Kirill I've updated the question. Thanks – Growler Jul 12 '13 at 16:28