<% var _lang = (options.locales || config.locales || 'en-US').substring(0,2) %>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="<%= _lang %>"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang="<%= _lang %>"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang="<%= _lang %>"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="<%= _lang %>"> <!--<![endif]-->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Language" content="<%= _lang %>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="<%- isomorphicSharedConfig.jsMountPoint + config.styleFileName %>">
    <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
    <%- options.http.headTags.join(' ') %>
    <link rel="subresource" href="<%- config.polyfillPath + '?h=' + options.ushash %>">
    <link rel="subresource" href="<%- isomorphicSharedConfig.jsMountPoint + config.assetFileName %>">
    <link rel="subresource" href="<%- config.reactCDNUrl %>">
    <link rel="subresource" href="<%- isomorphicSharedConfig.jsMountPoint + config.componentFileName %>">
    <link rel="subresource" href="<%- isomorphicSharedConfig.jsMountPoint + (options.locales || config.locales || 'en-US') + '.js' %>">
    <% if(config.googleExperiments && config.googleExperiments.bootloaderPath) { %><link rel="subresource" href="<%- config.googleExperiments.bootloaderPath %>"><% } %>
    <script>window.__pellet__config = <%- JSON.stringify(isomorphicSharedConfig) %>;<% if(ctx) {%>window.__pellet__ctx = <%- ctx %>;<% } %></script>
    <script>!function(e,t,r){function n(){for(;d[0]&&"loaded"==d[0][f];)c=d.shift(),c[o]=!i.parentNode.insertBefore(c,i)}for(var s,a,c,d=[],i=e.scripts[0],o="onreadystatechange",f="readyState";s=r.shift();)a=e.createElement(t),"async"in i?(a.async=!1,e.head.appendChild(a)):i[f]?(d.push(a),a[o]=n):e.write("<"+t+' src="'+s+'" defer></'+t+">"),a.src=s}(document,"script",[
      "<%- config.polyfillPath + '?h=' + options.ushash %>",
      "<%- isomorphicSharedConfig.jsMountPoint + config.assetFileName %>",
      <% if(config.googleExperiments && config.googleExperiments.bootloaderPath) { %>"<%- config.googleExperiments.bootloaderPath %>",<% } %>
      "<%- config.reactCDNUrl %>",
      "<%- isomorphicSharedConfig.jsMountPoint + config.componentFileName %>",
      "<%- isomorphicSharedConfig.jsMountPoint + (options.locales || config.locales || 'en-US') + '.js' %>"
    ])
    </script>
  </head>
  <body class="uninitialized lang <%= _lang %>" locales="<%= (options.locales || config.locales || 'en-US') %>">
    <!--[if lt IE 7]>
        <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
    <![endif]-->

    <div id="__PELLET__" class="loading_and_uninitialized">
      <%- html %>
    </div>

    <script>
      (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
      function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
      e=o.createElement(i);r=o.getElementsByTagName(i)[0];
      e.src='//www.google-analytics.com/analytics<%- (config.googleDebug?'_debug':'') %>.js';
      r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
      <% if(config.googleDebug === 'trace') { %>
      window.ga_debug = {trace: true};
      <% } %>
      ga('create','<%- config.googleTrackID %>', 'auto');
      <%- (function() {
        var i, altTrack='';
        if(config.googleTrackID) {
          for(i in pellet.options.googleAltTrackID) {
            altTrack += 'ga(\'create\',\'' + pellet.options.googleAltTrackID[i] + '\', \'auto\', {\'name\':\''+i+'\'});';
          }
        }
        return altTrack;
        })()
      %>
    </script>
  </body>
</html>
