title: Using Skrollr and SkrollrMenu with RequireJS
body: <p>I am getting an error when using skrollr and skrollrMenu using RequireJS. This is my main.js file:</p>
  
  <pre><code>require.config({
      paths: {
          jquery: '../bower_components/jquery/jquery',
          skrollr: '../bower_components/skrollr/src/skrollr',
          skrollrMenu: '../bower_components/skrollr-menu/src/skrollr.menu'
      },
      shim: {
          skrollrMenu: {
              deps: ['skrollr']
          }
      }
  });
  
  require(['app', 'jquery', 'skrollr', 'skrollrMenu'], function (app, $) {
      'use strict';
  
      window.onload = function() {
          var s = skrollr.init();
  
          console.log(s);
          // //The options (second parameter) are all optional. The values shown are the default values.
          skrollr.menu.init(s, {
              //skrollr will smoothly animate to the new position using `animateTo`.
              animate: true,
  
              //The easing function to use.
              easing: 'sqrt',
  
              //How long the animation should take in ms.
              duration: function(currentTop, targetTop) {
                  //By default, the duration is hardcoded at 500ms.
                  return 500;
  
                  //But you could calculate a value based on the current scroll position (`currentTop`) and the target scroll position (`targetTop`).
                  //return Math.abs(currentTop - targetTop) * 10;
              },
          });
      }
  });
  </code></pre>
  
  <p>When I load the page I get the error <code>Uncaught TypeError: Cannot call method 'relativeToAbsolute' of undefined</code> at this point in the skrollr.menu file:</p>
  
  <pre><code>targetTop = _skrollrInstance.relativeToAbsolute(scrollTarget, 'top', 'top');
  </code></pre>
  
  <p>Then it is followed by the output of <code>console.log(s)</code>. Does this mean that <code>skrollr.menu.init</code> is running before <code>console.log(s)</code>?</p>