# tikz command fails after .cls file change

The following tex content is a part a tex file which is added to main file with command input. With a new .cls and some other unrelated changes, tex isn't compiling with error message of

! Package pgfkeys Error: I do not know the key '/tikz/every node/.style={align=
center}' and I am going to ignore it. Perhaps you misspelled it.


The related tex is as follows.

\newcommand{\graphitemize}[2]{%
\begin{tikzpicture}
[every node/.style={align=center}]
\node[minimum size=3.0cm,circle,fill=gray!40,text=white,outer sep=1cm,inner sep=.5cm,very thick](ce){#1};
\foreach \gritem [count=\xi] in {#2}
{\global\let\maxgritem\xi}
\foreach \gritem [count=\xi] in {#2}
{%
\pgfmathtruncatemacro{\angle}{360/\maxgritem*\xi}
\edef\col{\@nameuse{color@\xi}}
\node[circle,
ultra thick,
draw=white,
fill opacity=.6,
fill=\col,
minimum size=3cm] at (ce.\angle) {\gritem };}%

\end{tikzpicture}
}%

Minimal Working Example is shared in here. main.tex is the working tex file, while main2.tex has compile error. Only the \documentclass .cls file is different.
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Jubobs Mar 11 '14 at 18:59
You can consider to use smartdiagram package for this drawing: if I remember correctly the diagram you're after is called bubble diagram. –  Claudio Fiandrino Mar 11 '14 at 19:19
Thank you very much. As you said when command definition is in the preamble, the compile error goes away. If there is an explanation, why two .cls definition differs in this way, it will be great. –  Cahit Gungor Mar 11 '14 at 21:18