<!DOCTYPE html>
<html class="no-js" lang="eng-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Search</title>
    <link rel="stylesheet" href="theme/css/foundation.min.css">
    <link rel="stylesheet" href="theme/css/app.css">
    
    
  </head>
  <body>
    <div class="expanded row">
      <div class="small-12 medium-12 large-12 columns align-self-top">
        <div class="row">
          
          <header class="large-12 columns align-self-top a_header">
            <div class="row">
              <div class="large-12 columns a_limited top-bar">
                <div class="top-bar-left">
                  <p>Skylark</p>

                </div>
                <div class="top-bar-right align-right row">
                  
                  
                    <form action="site-search.html" method="get" class="align-right a_search">
                      <input name="q" type="search"  placeholder="Search
" >
                      <button><img alt="&#1F50D;" src="theme/images/search.svg" /></button>
                    </form>
                  
                </div>
              </div>
            </div>
          </header>
          
          <div class="small-12 medium-12 large-12 columns align-self-top a_limited a_main">
            <div class="row">
              
              <main class="columns large-order-2 sections" id="_sections">
                
                
  <h1 id="search" class="a_section" data-magellan-target="search">Search<a class="a_hlink" href="#search"></a></h1>
<p>From here you can search all pages. Enter the search terms below and click the search button. Note that the search function will search for a combination of <em>all</em> search terms.</p>


   
     <noscript> <blockquote class="warning">
<p>This page requires JavaScript. Please enable JavaScript in your browser.</p>
</blockquote>
 </noscript> 
  

  <div id="_main_search" style="display: none">
    <form action="site-search.html" method="get" class="a_search">
      <input id="_q" name="q" type="search"  placeholder="" >
      <button class="button"><img alt="&#1F50D;" src="theme/images/search-white.svg" /></button>
    </form>
    <div id="_res" style="display: none">
      <p id="_rescount" ></p>
      <ul id="_reslist" class="a_searchresults">
      </ul>
    </div>
  </div>

              </main>
              
              
                <div data-sticky-container class="small-12 medium-12 large-2 large-order-1 columns a_sitenav_container">
                  <nav class="a_sitenav" data-sticky data-sticky-on="large" data-anchor="_sections">
                    
                  <ul>
                     
  <li >
    
      <a href="introduction.html">Introduction</a>
    
    
  </li>
  
  <li >
    
      <a href="measure.html">Measure</a>
    
    
  </li>
  
  <li >
    
      <a href="taylor.html">Taylor series: a complete example</a>
    
    
  </li>
 
                  </ul>
                  </nav>
                </div>
              
              
              
            </div>
          </div>
        </div>
      </div>
      
      <footer class="small-12 medium-12 large-12 columns align-self-bottom a_footer">
        <div class="row">
          <div class="small-12 medium-12 large-12 columns top-bar">
            <div class="top-bar-left">
              <p>© Quantarray, LLC</p>

            </div>
            <div class="top-bar-right">
              <p>Generated with <a href="https://github.com/szeiger/ornate">Ornate</a>.</p>

            </div>
          </div>
        </div>
      </footer>
    </div>
    <script src="theme/js/jquery.min.js"></script>
    <script src="theme/js/what-input.min.js"></script>
    <script src="theme/js/foundation.min.js"></script>
    
    <script src="theme/js/app.js"></script>
    
   <script src="search-index.js"></script> 
  <script src="theme/js/elasticlunr.min.js"></script>
  <script type="text/javascript" />
    $("#_main_search").css("display", "block");
    var searchCount0 = "No matching pages found.",
      searchCount1 = "Found one matching page:",
      searchCountN = "Found # matching pages:";

    function getParams() {
      var match, search = /([^&=]+)=?([^&]*)/g,
        decode = function (s) { return decodeURIComponent(s.replace(/\+/g, " ")); },
        query = window.location.search.substring(1), p = {};
      while(match = search.exec(query)) p[decode(match[1])] = decode(match[2]);
      return p;
    }

    var index = elasticlunr.Index.load(window._searchIndex.idx);
    var indexData = window._searchIndex.data;
    window._searchIndex = null;

    var currentQuery = "";
    function updateResults(query) {
      if(query === currentQuery) return;
      currentQuery = query;
      var reslist = $("#_reslist"), count = -1;
      reslist.empty();
      if(query !== "") {
        res = index.search(query, { fields: { t: {boost: 2}, k: {boost: 2}, b: {boost: 1} }, bool: "AND" });
        count = res.length;
        for(var i=0; i < count; i++) {
          var data = indexData[parseInt(res[i].ref)]
          var li = document.createElement("li");
          var a = document.createElement("a");
          a.setAttribute("href", data[2]);
          a.appendChild(document.createTextNode(data[0]));
          li.appendChild(a);
          var p = document.createElement("p");
          p.appendChild(document.createTextNode(data[1]));
          li.appendChild(p);
          reslist.append(li);
        }
      }
      if(count == 0) $("#_rescount").text(searchCount0);
      else if(count == 1) $("#_rescount").text(searchCount1);
      else if(count > 1) $("#_rescount").text(searchCountN.replace(/\#/g, ""+count));
      else $("#_rescount").empty();
      $("#_res").css("display", "block");
    }

    window.onpopstate = function() {
      var params = getParams();
      var query = "";
      if(params.q) query = params.q;
      $("#_q")[0].value = query;
      updateResults(query);
    };

    function pushSearch(q) {
      var url = window.location.href.split('?')[0];
      var href = url + "?q=" + encodeURIComponent(q);
      history.pushState({}, "", href);
      window.onpopstate();
      return false;
    }

    $("main .a_search button").click(function() {
      return pushSearch($("#_q").val());
    });
    $(".top-bar-right .a_search button").click(function() {
      return pushSearch($(".top-bar-right .a_search input").val());
    });

    window.onpopstate();
    $("#_q").focus();
  </script>

  </body>
</html>
