{% if not embedded %}
  <script type="text/javascript">
    var DOCUMENTATION_OPTIONS = {
      URL_ROOT:'{{ url_root }}',
      VERSION:'{{ release|e }}',
      COLLAPSE_INDEX:false,
      FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
      HAS_SOURCE:  {{ has_source|lower }}
    };
  </script>

  {%- for scriptfile in script_files %}
    <script type="text/javascript" src="/{{ pathto(scriptfile, 1) }}"></script>
  {%- endfor %}
{% endif %}

<script type="text/javascript" src="/_static/js/clipboard.min.js"></script>
<script type="text/javascript" src="/_static/js/jquery.waypoints.min.js"></script>

{# RTD hosts this file, so just load on non RTD builds #}
{% if not READTHEDOCS %}
  <script type="text/javascript" src="{{ pathto('/_static/js/custom.js', 1) }}"></script>
{% endif %}

{# STICKY NAVIGATION #}
{% if theme_sticky_navigation %}
  <script type="text/javascript">
    jQuery(function () {
      SphinxRtdTheme.StickyNav.enable();
    });

  </script>
{% endif %}

