title: Jquery plugin not merging defaults with options
body: <p>I have created my own jquery plugin. It is setup like so.</p>
  
  <pre><code>;(function ($)
  {
      $.fn.bpeditor = function (options)
      {
          return this.each(function() 
          {
              // Merge passed options with defaults
              vars.options = $.extend({}, $.fn.bpeditor.defaults, options);
  
              alert(vars.options.test);
           }
       }
  
       var vars =
       {
           options: null
       };
  
       $.bpeditor.defaults =
       {
           user: 'a',
           dkey: 'b',
           side: 'c',
           test: 'd'
       };
  
  })(jQuery);
  </code></pre>
  
  <p>I call it like so:</p>
  
  <pre><code>$('div#canvas').bpeditor
  ({
      user: 'user1',
      dkey: 'dkey1'
  });
  </code></pre>
  
  <p>As you can see, I am passing in the 'user', and 'dkey' options but not 'test'. Test has a default value and it's not being set in the plugin. The alert in the plugin should display the contents of vars.options.test which should be filled with the contents of $.bpeditor.defaults but it's coming back as undefined.</p>
  
  <p>Can anyone help?</p>
  
  <p>Thanks</p>