title: Usage of yepnope (relative paths, css and js)
body: <p>I want to include fancybox only when there is no touch device involved. This is my code so far:</p>
  
  <pre><code>&lt;script&gt;
      yepnope([{
          test : Modernizr.touch,
          nope  : './js/lib/fancybox/jquery.fancybox.pack.js',
          callback : {
              "jquery.fancybox.pack.js": function () {
                  console.log("fancybox loaded!");
              }
          }
      }]);
  &lt;/script&gt;
  </code></pre>
  
  <p>This code is placed before the closing body tag. I get the error <code>TypeError: k.apply is not a function</code> but this doesn't help me.</p>
  
  <p>My questions:</p>
  
  <ul>
  <li>Can I load the js file with this relative path?</li>
  <li>Where does my relative path starts? From the path where yepnope lies?</li>
  <li>How can I conditionally load a JS and a CSS file?</li>
  </ul>
  
  <p><strong>Update:</strong></p>
  
  <p>Now I tried a different way:</p>
  
  <pre><code>&lt;script&gt;
  Modernizr.load([
      {
          test  : Modernizr.mq('screen and (max-width: 31.25em)'),
          yep  : {
              'photoswipe' : ['/js/klass.min.js', '/js/code.photoswipe-3.0.5.min.js']
          },
          nope : {
              'fancybox' : ['/js/lib/fancybox/jquery.fancybox.pack.js', '/js/lib/fancybox/jquery.fancybox.css']
          },
          callback : {
              'photoswipe': function (url, result, key) {
                  var myPhotoSwipe = $("a.fancy").photoSwipe({ enableMouseWheel: false , enableKeyboard: false });
              },
              'fancybox': function (url, result, key) {
                  $('a.fancy').fancybox();
              }
          }
      }
  ]);
  &lt;/script&gt;
  </code></pre>
  
  <p>I get the following error <code>TypeError: a.split is not a function</code>. What I'm doing wrong?</p>