title: Alternate way of defining object? Object literal works but has redundancies
body: <p>Okay so I have made myself a small object to assess the whole loading jquery with a fallback thing (and have employed it to loading all my js files, infact), using JSON:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  /* Library loading object */
  
  var ScriptLoader = {
      //values
      head_tag : document.getElementsByTagName('head')[0],
      fallback : false,
  
      //functions
      createScript: function(script_path) {
          var script_tag = document.createElement('script');
          script_tag.type = 'text/javascript';
          script_tag.src = script_path;
          return script_tag;
      },
  
      addToHead : function(tag) {
          ScriptLoader.head_tag.appendChild(tag);
      },
  
      addLoadEvent : function(func) {
          var prev = window.onload;
  
          if (typeof window.onload !== 'function') {
              window.onload = func;
          } else {
              window.onload = function() {
                  prev();
                  func();
              }
          }
      }
  };
  
  
  //Loading jquery, modernizr, and my js files when window is ready.
  
  ScriptLoader.addLoadEvent(function() {
      /* Load from jquery's cdn for speed + auto latest download */
      var scripts = ['http://code.jquery.com/jquery-latest.min.js',
          'scripts/modernizr.js',
          'scripts/script.js'],
              idx = 0;
      for (; idx &lt; scripts.length; idx++) {
          ScriptLoader.addToHead(ScriptLoader.createScript(scripts[idx]));
      }
  });
  
  //jquery fallback
  ScriptLoader.addLoadEvent(function() {
      if (typeof window.jQuery === undefined) {
          ScriptLoader.fallback = true;
          ScriptLoader.addToHead(ScriptLoader.createScript('scripts/jquery-mini-1.6.2.js'));
      }
  });
  
  //grab info
  (function() {
      setTimeout(function() {
          console.log('jquery loaded: ' + (window.jQuery !== undefined));
          console.log('used fallback: ' + ScriptLoader.fallback);
      }, 1000);
  })();
  </code></pre>
  
  <p></p>
  
  <p>Right now, this is fully working, but notice the constant calls to my object's name? Is there a way to simply just use <em>this</em> instead of that? I kind of get the whole functional-level scope only thing, and also realize that this gets assigned to the nearest enclosing function, but I'm not crystal clear on that..</p>
  
  <p>I also breifly read on but don't fully understand closures..</p>
  
  <p>Thanks :)</p>