<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="default" />
    <link rel="apple-touch-icon" href="./icons/icon57.png" />
    <link rel="apple-touch-icon" sizes="72x72" href="./icons/icon72.png" />
    <link rel="apple-touch-icon" sizes="114x114" href="./icons/icon114.png" />
    <link rel="apple-touch-icon" sizes="144x144" href="./icons/icon144.png" />
    <meta name="msapplication-TileColor" content="#123456"/>
    <meta name="msapplication-TileImage" content="./icons/icon144.png"/>

    <title>{{=it.title}}</title>

    <script type="text/javascript" src="resources/jQuery/jquery-1.11.0.min.js?v={{=it.version}}"></script>
    <script type="text/javascript" src="resources/jquery-cookie/jquery.cookies.js?v={{=it.version}}"></script>
    <script type="text/javascript" src="resources/jquery-sortelements/jquery.sortElements.js?v={{=it.version}}"></script>
{{? it.server_side_rendering == 0}}
    <script type="text/javascript" src="resources/Magnific-Popup/jquery.magnific-popup.min.js?v={{=it.version}}"></script>
    <link rel="stylesheet" type="text/css" href="resources/Magnific-Popup/magnific-popup.css?v={{=it.version}}" media="screen" />
    <script type="text/javascript" src="resources/doT/doT.min.js?v={{=it.version}}"></script>
    <script type="text/javascript" src="resources/lru/lru.js?v={{=it.version}}"></script>
    <script type="text/javascript" src="resources/typeahead/typeahead.js?v={{=it.version}}"></script>
{{?}}
    <script type="text/javascript" src="util.js"></script>
    <link rel="related" href="{{=it.opds_url}}" type="application/atom+xml;profile=opds-catalog" title="{{=it.title}}" />
    <link rel="icon" type="image/vnd.microsoft.icon" href="{{=it.favico}}" />

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">

    <!-- Optional theme -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap-theme.min.css">

    <!-- Latest compiled and minified JavaScript -->
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>

    <style media="screen" type="text/css">
    .demo{
        margin-bottom: -99999px;
        padding-bottom: 99999px;
        border:1px solid #efefef;
    }

    .panel-body { padding: 5px; }

    .bottomright {position:absolute; bottom:0;  margin-bottom:25px; right: 20px;}

    </style>

{{? it.server_side_rendering == 0}}
    <script type="text/javascript">
        $(document).ready(function() {
            initiateAjax ("{{=it.getjson_url}}", "{{=it.template}}");
        });
    </script>
{{?}}
</head>