\usetheme{Rochester}

\RequirePackage{pgf}

\pgfdeclareimage[width=1.0\paperwidth]{octave-header}{octave-header}

\setbeamertemplate{blocks}[rounded][shadow=true]

\beamer@headheight=0.13\paperwidth

\definecolor{octaveorange}{HTML}{F7800A}
\definecolor{octavegray}{HTML}{686868}
\definecolor{octavelightgray}{HTML}{EEEEEE}
\definecolor{octaveblue}{HTML}{236EAF}
\setbeamercolor*{Title bar}{fg=white}
\setbeamercolor*{Location bar}{fg=octaveorange,bg=octavelightgray}
\setbeamercolor*{frametitle}{parent=Title bar}
\setbeamercolor*{block title}{bg=octaveblue,fg=white}
\setbeamercolor*{block body}{bg=octavelightgray,fg=octavegray}
\setbeamercolor*{normal text}{bg=white,fg=octavegray}
\setbeamercolor*{section in head/foot}{bg=octaveblue,fg=white}

\usecolortheme[named=octaveorange]{structure}

\setbeamerfont{section in head/foot}{size=\tiny,series=\normalfont}
\setbeamerfont{frametitle}{size=\Large}

%\setbeamertemplate{headline}
\setbeamertemplate{frametitle}
{
  \vskip-0.25\beamer@headheight
  \vskip-\baselineskip
  \vskip-0.2cm
  \hskip0.7cm\usebeamerfont*{frametitle}\insertframetitle
  \vskip-0.10em
  \hskip0.7cm\usebeamerfont*{framesubtitle}\insertframesubtitle
}

\setbeamertemplate{headline}
{
  \pgfuseimage{octave-header}
  \vskip -1.95cm
  \linethickness{0.0pt}

  \framelatex{
  \begin{beamercolorbox}[wd=\paperwidth,ht=0.3\beamer@headheight]{Title bar}
    \usebeamerfont{section in head/foot}%
    \insertsectionnavigationhorizontal{0pt}{\hskip0.22cm}{}%
  \end{beamercolorbox}}

  \framelatex{
  \begin{beamercolorbox}[wd=\paperwidth,ht=0.7\beamer@headheight]{Title bar}
  \end{beamercolorbox}}
}

\setbeamertemplate{footline}
{
  \linethickness{0.25pt}
  \framelatex{
  \begin{beamercolorbox}[leftskip=.3cm,wd=\paperwidth,ht=0.3\beamer@headheight,sep=0.1cm]{Location bar}
    \usebeamerfont{section in head/foot}%
    \insertshortauthor~|~\insertshorttitle
    \hfill
    \insertframenumber/\inserttotalframenumber
  \end{beamercolorbox}}
}

