title: Uncaught TypeError: Cannot read property 'PhotoSwipe' of undefined in javascript
body: <p>I'm trying to implement swiping of image using html and javascript for phonegap application, following this demo <a href="http://www.photoswipe.com/latest/examples/01-default.html" rel="nofollow">PhotoSwipe</a> there it works fine, but after adding into my project, not able to swipe the images. and even linked the js files correctly still i get this error in logcat "<code>Uncaught TypeError: Cannot read property 'PhotoSwipe' of undefined at file:///android_asset/www/examples/01-default.html:26"
  </code> any idea on my issue? Thanks.</p>
  
  <p>swipe code</p>
  
  <pre><code>&lt;title&gt;PhotoSwipe&lt;/title&gt;
  &lt;meta name="author" content="Ste Brennan - Code Computerlove - http://www.codecomputerlove.com/" /&gt;
  &lt;meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /&gt;
  &lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;
  &lt;link href="styles.css" type="text/css" rel="stylesheet" /&gt;
  
  &lt;link href="css/photoswipe.css" type="text/css" rel="stylesheet" /&gt;
  
  &lt;script type="text/javascript" charset="utf-8" src="js/cordova-1.9.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
  &lt;script type="text/javascript"&gt;
  
  (function(window, PhotoSwipe){
  
      document.addEventListener('DOMContentLoaded', function(){
  
          var
              options = {},
              instance = PhotoSwipe.attach(   window.document.querySelectorAll('#Gallery a'), options );
  
      }, false);              
    }(window, window.Code.PhotoSwipe));
  
     &lt;/script&gt;
  
  &lt;script type="text/javascript" src="js/cordova-1.9.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/libs/klass.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/code.photoswipe.jquery-3.0.5.min.js"&gt;      &lt;/script&gt;
  &lt;script type="text/javascript" src="js/code.photoswipe.jquery-3.0.5.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/code.photoswipe-3.0.5.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/code.photoswipe-3.0.5.js"&gt;&lt;/script&gt;  
      &lt;script type="text/javascript" src="photoswiper.js"&gt;&lt;/script&gt; 
  }
  </code></pre>