<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>

<head>

<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />

$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$

$if(date-meta)$
<meta name="date" content="$date-meta$" />
$endif$

<title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title>

$for(header-includes)$
$header-includes$
$endfor$

$if(highlightjs)$
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet"
      href="$highlightjs$/$if(highlightjs-theme)$$highlightjs-theme$$else$default$endif$.css"
      $if(html5)$$else$type="text/css" $endif$/>
<script src="$highlightjs$/highlight.js"></script>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>
<script type="text/javascript">
if (window.hljs && document.readyState && document.readyState === "complete") {
   window.setTimeout(function() {
      hljs.initHighlighting();
   }, 0);
}
</script>
$endif$

$if(highlighting-css)$
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
$highlighting-css$
</style>
$endif$

$for(css)$
<link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
$endfor$

</head>

<body>

$for(include-before)$
$include-before$
$endfor$

<div id="content" data-toggle="wy-nav-shift">

<!-- tabsets -->
<script>
$$(document).ready(function () {
  window.buildTabsets("$idprefix$TOC");
});
</script>

<!-- code folding -->
$if(code_folding)$
<script>
$$(document).ready(function () {
  window.initializeCodeFolding("$code_folding$" === "show");
});
</script>
$endif$

<nav id="nav-top" role="navigation" aria-label="top navigation">
    <a role="button" href="#" data-toggle="wy-nav-top"><span class="glyphicon glyphicon-menu-hamburger"></span></a>
</nav>

$if(code_folding)$
<div class="btn-group pull-right">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="text-muted">Code</span> <span class="text-muted caret"></span></button>
<ul class="dropdown-menu" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All</a></li>
</ul>
</div>
$endif$

$if(title)$
<div id="$idprefix$header">
<h1 class="title">$title$</h1>
$if(subtitle)$
<h1 class="subtitle">$subtitle$</h1>
$endif$
</div>
$endif$


<div id="table-of-contents">
    <h2><a href="#content">$title$</a></h2>
    <div id="text-table-of-contents">
      $toc$
    </div>
</div>

<div id="main">
$body$
</div>


</div>

<div id="postamble" data-toggle="wy-nav-shift" class="status">
$for(author)$
$if(author.name)$
<p class="author"><span class="glyphicon glyphicon-user"></span> $author.name$
$if(author.affiliation)$
<br /><span class="author_affil">$author.affiliation$</span>$endif$
$if(author.email)$
<br /><a class="author_email" href="mailto:#">$author.email$</a>
$endif$
</p>
$else$
<p class="author"><span class="glyphicon glyphicon-user"></span> $author$</p>
$endif$
$endfor$
$if(date)$
<p class="date"><span class="glyphicon glyphicon-calendar"></span> $date$</p>
$endif$
</div>

$for(include-after)$
$include-after$
$endfor$

<script>
$$(document).ready(function () {
 	$if(thumbnails)$
 	$$('#content img')
 	  .addClass("image-thumb");
  $endif$
  $if(lightbox)$
  $$('#content img')
 	  .addClass("image-lb");
  $$('#content').magnificPopup({
	      type:'image',
	      closeOnContentClick: false,
	      closeBtnInside: false,
	      delegate: 'img',
	      gallery: {enabled: $gallery$ },
	      image: {
	        verticalFit: true,
          titleSrc: 'alt'
	      }
 	    });
 	$endif$
});
</script>


$if(mathjax-url)$
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "$mathjax-url$";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>
$endif$

</body>
</html>
