\ProvidesClass{beamerthemehit}[2011/01/31]
\mode<presentation>
\RequirePackage{helvet}
\setbeamertemplate{navigation symbols}{}
\setbeamerfont{frametitle}{size=\large}

% Color definitions
\definecolor{hitred}{rgb}{0.91,0.0,0.0}
\definecolor{hitgray}{rgb}{0.3,0.3,0.3}

\setbeamersize{text margin left=.7cm,text margin right=.7cm}

\defbeamertemplate*{background canvas}{hit theme}{\includegraphics[height=\paperheight]{fig/background.png}}
\defbeamertemplate{background canvas}{hit theme titlepage}{\includegraphics[height=\paperheight]{fig/titlepage.png}}

\newcommand{\hittitlepage}{{
	\setbeamertemplate{background canvas}[hit theme titlepage]
	\setbeamertemplate{footline}[hit theme titlepage]
	\begin{frame}%
	\titlepage%
	\end{frame}%
}}

\setbeamertemplate{blocks}[]

\defbeamertemplate*{footline}{hit theme}{
  \hbox{%
    \begin{beamercolorbox}[wd=0.8\textwidth,ht=5mm,dp=2mm,left]{footline}%
	  \vspace{-1.5mm}\hspace{2mm}\usebeamerfont{footline}\insertshorttitle
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=0.2\textwidth,ht=5mm,dp=2mm,right]{ffootline}%
	  \vspace{-1mm}\usebeamerfont{footline}\insertframenumber~\hspace{2mm}%
    \end{beamercolorbox}%
  }
}

\defbeamertemplate{footline}{hit theme titlepage}{}

\defbeamertemplate*{title page}{hit}[1][]
{%
  \vspace{0.47\paperheight}
    \begin{beamercolorbox}[sep=3pt,left,leftskip=2.5cm,#1]{title}
      \usebeamerfont{title}\inserttitle\par%
      \ifx\insertsubtitle\@empty%
      \else%
        \vskip0.25em%
        {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
      \fi%     
    \end{beamercolorbox}%
    \vskip1em\par
    \begin{beamercolorbox}[sep=3pt,left,leftskip=2.5cm,#1]{author}
      \usebeamerfont{author}\insertauthor
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=3pt,left,leftskip=2.5cm,#1]{institute}
      \usebeamerfont{institute}\insertinstitute
    \end{beamercolorbox}
    \begin{beamercolorbox}[sep=3pt,left,leftskip=2.5cm,#1]{date}
      \usebeamerfont{date}\insertdate
    \end{beamercolorbox}
  \vfill
}

\defbeamertemplate*{frametitle}{hit theme}[1][left]
{
  \@tempdima=\textwidth%
  \advance\@tempdima by\beamer@rightmargin%
  
  \begin{beamercolorbox}[sep=0cm,#1,leftskip=1cm,wd=\the\@tempdima]{frametitle}
    \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
    {\vskip 5pt\usebeamerfont{frametitle}\insertframetitle\par}%
    % \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here... 
  \end{beamercolorbox}%
}

\setbeamercolor{normal text}{fg=hitgray}
\setbeamercolor{pagenumber}{fg=black}
\setbeamercolor{footline}{fg=white}
\setbeamercolor{block title}{fg=black}
\setbeamercolor*{itemize item}{fg=hitgray}
\setbeamercolor*{itemize subitem}{fg=hitgray}
\setbeamercolor*{itemize subsubitem}{fg=hitgray}
\setbeamercolor*{enumerate item}{fg=hitgray}
\setbeamercolor*{enumerate subitem}{fg=hitgray}
\setbeamercolor*{enumerate subsubitem}{fg=hitgray}
\setbeamercolor*{title}{fg=hitred}
\setbeamercolor*{frametitle}{fg=hitred}

\defbeamertemplate*{itemize item}{hit}{--}
\defbeamertemplate*{itemize subitem}{hit}{$\bullet$}
\defbeamertemplate*{itemize subsubitem}{hit}{$\ll$}

\setbeamerfont{title}{size=\Large,series=\bfseries,shape=\scshape}
\setbeamerfont{subtitle}{size=\normalsize,shape=\upshape}
\setbeamerfont{author}{size=\normalsize,shape=\itshape}
\setbeamerfont{date}{size=\normalsize}
\setbeamerfont{institute}{size=\normalsize}
\setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}
\setbeamerfont{pagenumber}{size=\small,series=\bfseries}
\setbeamerfont{footline}{size=\footnotesize}

\mode
<all>
