\LoadClass[letterpaper,11pt,twoside]{article}

\usepackage[T1]{fontenc}

\usepackage{natbib}
\renewcommand{\bibfont}{\footnotesize}
\setlength{\bibsep}{0pt plus 0.3ex}
\bibliographystyle{apalike}

\usepackage[margin=1.25in]{geometry}
\usepackage{times}
\setlength{\parindent}{1em}

%% institute and email variables
\def\institute#1{\gdef\@institute{#1}}
\def\@institute{\@latex@warning@no@line{No \noexpand\institute given}}
\def\email#1{\gdef\@email{#1}}
\def\@email{\@latex@warning@no@line{No \noexpand\email given}}

%% alternating inner title and author headers
\usepackage{fancyhdr}
\pagestyle{fancy}

%% clear the default headers/footers, no header rule, zero offset
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhfoffset[LE,RO]{0pt}

%% create the headers
\fancyhead[LE]{\itshape \@title}
\fancyhead[RO]{\itshape \@author}

%% no header or footer on the first page
\thispagestyle{empty}

%% title
\renewcommand\maketitle{
\begin{center}
\large\textbf{\vskip 4em {\LARGE\@title}\\\@author}\\\@institute
\end{center}
}

%% set the section header formatting
\usepackage{titlesec}
\titleformat*{\section}{\bfseries}
\titleformat*{\subsection}{\bfseries}
\titleformat*{\subsubsection}{\itshape}
\titlespacing*{\subsubsection}{0pt}{1em}{0pt}

%% append contact info to last page
\AtEndDocument{\vskip 1em \em\small\raggedleft \@author\\\@institute\\\@email} 
