\ProvidesPackage{beamerouterthemeNPBT_FOM_ifes}[2018/08/15 v4.1 Beamer Outer Theme FOM ifes-Version]
% ===========================================================================
% beamerouterthemeNPBT_FOM_ifes.sty
% =================================------------------------------------------
% 
% (C) in 2011-2018 by Norman Markgraf (nmarkgraf(at)hotmail(dot)com)
%
% ---------------------------------------------------------------------------
%
\mode<presentation>
% ---------------------------------------------------------------------------

\def\titleboxwidth{0.90\linewidth}

% ---------------------------------------------------------------------------
%
% title page: in FOM ifes Design
%
\setbeamertemplate{title page}
{
  \begin{tikzpicture}[remember picture, overlay]
    \node[inner sep=0pt] at (current page.center){%
              \includegraphics[width=\myPaperWidth,height=\myPaperHeight]{\backgroundimage}%
      };%
      \node[shift={(\logoxshift,\logoyshift)},inner sep=0pt] at (current page.north east){%
              \includegraphics[width=\logowidth,height=\logoheight]{\logoimage}%
      };%
    % Überschrift
    \node[anchor=west, inner sep=5pt] at (current page.west){%
    	\begin{tabular}{b{\titleboxwidth}}
    	{%
    		\usebeamercolor[fg]{title in titlepage}%
    		\usebeamerfont{title in titlepage}%
    		\inserttitle %
    	}\\
    	\end{tabular}
    };%
    % ifes informationen hardcoded!
    \node[anchor=west, yshift=-1.5cm,inner sep=5pt] at (current page.west){%
    	\begin{tabular}{b{\titleboxwidth}}
    	{%
    		\usebeamercolor[fg]{institute in titlepage}%
             \usebeamerfont{institute in titlepage}
    		ifes Institut für Empirie \& Statistik%
    	}\\
     	{%
    		\usebeamercolor[fg]{firm in titlepage}%
             \usebeamerfont{firm in titlepage}
    		FOM Hochschule für Oekonomie \& Management%
    	}\\
    	\end{tabular}
    };%
    % Linie
    \node[anchor=west, inner sep=12pt, yshift=-2.5cm] at (current page.west){
     \includegraphics[%
            width=0.9\paperwidth%
            ]{%
                \lineimage%
            }%
    };
    \node[anchor=east, xshift=0cm, yshift=-1cm, inner sep=40pt] at (current page.south east){%
    \begin{minipage}[b][0.6\paperheight][t]{\linewidth}
          \begin{FlushRight}
            {%
             \usebeamercolor[fg]{author in titlepage}%
             \usebeamerfont{author in titlepage}%
             \insertauthor \par%
             }

            \vspace*{1.5em}
            \par

             {%
     		    \usebeamercolor[fg]{subtitle in titlepage}%
    	      	\usebeamerfont{subtitle in titlepage}%
    	      	\insertsubtitle %
             }
          \end{FlushRight}
        \end{minipage}
    };%
  \end{tikzpicture}%
}

% ---------------------------------------------------------------------------
%
% Frame title template:
%
\defbeamertemplate*{frametitle}{mydefault}
{
  \leavevmode
  \hbox{%
  \begin{beamercolorbox}[ht=6ex,leftskip=.25cm,wd=\paperwidth]{frametitle}%
        \begin{tikzpicture}[remember picture, overlay]
         % Sectiontitle
          \node[anchor=west, yshift=-0.55cm, inner sep=10pt] at (current page.north west){%
            {%
            \usebeamercolor[fg]{section in head}%
            \usebeamerfont{section in head}%
            \NoHyper%
            \insertsection
            \endNoHyper%
            }%
          };
         % Frametitle
          \node[anchor=west, yshift=-1.1cm, inner sep=10pt] at (current page.north west){%
            {%
            \usebeamercolor[fg]{frametitle in head}%
            \usebeamerfont{frametitle in head}%
            \insertframetitle
            }%
          };
          \node[shift={(\logoxshift,\logoyshift)},inner sep=0pt] at (current page.north east){%
              \includegraphics[%
                  width=\logowidth,%
                  height=\logoheight%
                ]{\logoimage}%
          };%
          \node[anchor=west, inner sep=8pt, yshift=-\logoheight-3pt] at (current page.north west){
                \includegraphics[%
                  width=0.78\paperwidth%
                ]{\lineimage}%
          };
        \end{tikzpicture}%
  \end{beamercolorbox}%
  }%
}
\defbeamertemplate{frametitle}{inverse}
{
  \leavevmode
  \hbox{%
  \begin{beamercolorbox}[ht=6ex,leftskip=.25cm,wd=\paperwidth]{frametitle}%
        \begin{tikzpicture}[remember picture, overlay]
         % Sectiontitle
          \node[anchor=west, yshift=-0.55cm, inner sep=10pt] at (current page.north west){%
            {%
            \usebeamercolor[fg]{section in head}%
            \usebeamerfont{section in head}%
            \hypersetup{hidelinks}%
            \insertsection
            }%
          };
          \node[anchor=west, inner sep=8pt, yshift=-\logoheight+3pt] at (current page.north west){
                \includegraphics[%
                  width=0.80\paperwidth%
                ]{\titlebackgroundimage}%
          };
         % Frametitle
          \node[anchor=west, yshift=-1.25cm, inner sep=10pt] at (current page.north west){%
            {%
            \usebeamercolor[fg]{whiteframetitle in head}%
            \usebeamerfont{frametitle in head}%
            \insertframetitle
            }%
          };
          \node[shift={(\logoxshift,\logoyshift)},inner sep=0pt] at (current page.north east){%
              \includegraphics[%
                  width=\logowidth,%
                  height=\logoheight%
                ]{\logoimage}%
          };%
        \end{tikzpicture}%
  \end{beamercolorbox}%
  }%
}


% ---------------------------------------------------------------------------
%
% Footline template
%
\setbeamertemplate{footline}{% Skip first frame == Title frame !!!
  \ifthenelse{\equal{\insertframenumber}{1}}{%
  }{%
        \hspace*{10pt}%
        \includegraphics[%
           width=0.9\paperwidth%
        ]{%
           \lineimage%
        }

        \vspace*{1em}

        \leavevmode%

        \hbox{%
            \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,left]{copyright in footer}%
                \usebeamerfont{copyright in footer}%
                \hspace*{10pt}%
                \fontsize{7}{10}%
                \selectfont%
                ~© ifes 2017  $|$  www.fom-ifes.de\hspace*{2em}
            \end{beamercolorbox}%
            \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in footer}%
                \usebeamerfont{title in footer}%
                \fontsize{7}{10}%
                \selectfont%
                \hypersetup{hidelinks}\insertshorttitle \phantom{©}
            \end{beamercolorbox}%
            \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{framenumber in footer}%
                \usebeamerfont{framenumber in footer}%
                \fontsize{7}{10}%
                \selectfont%
                \phantom{©}\insertframenumber{} \hspace*{2ex}
            \end{beamercolorbox}%
         }%
        \vspace*{1em}
  }
}
% ---------------------------------------------------------------------------

\setbeamertemplate{section page}{}
\setbeamertemplate{subsection page}{}

% ---------------------------------------------------------------------------

\newcommand{\setnormaltitle}{\setbeamertemplate{frametitle}[mydefault]}
\newcommand{\setinversetitle}{\setbeamertemplate{frametitle}[inverse]}

% ---------------------------------------------------------------------------
\mode<all>
%
% ===========================================================================
%