title: Combining JavaScript Objects into One
body: <p>I have a function called "Colorbox" (jQuery plugin) that takes a number of parameters like so:</p>
  
  <pre><code>$(this).colorbox({
      width : "500px",
      height : "500px"
  });
  </code></pre>
  
  <p>I have several different types of "this", though, each with their own properties. Like so:</p>
  
  <pre><code>var Type = {
    video: {
      width : "500px",
      height : "500px"
    },
    gallery: {
      width : "1065px",
      height : "600px"
    }
  }
  </code></pre>
  
  <p>Beyond that, I have other behaviors, logic, and a 'default' group of settings (which get overwritten by more specific ones). What I'm trying to do is push all the appropriate settings, from multiple objects, into a single Object so I can just call:</p>
  
  <pre><code>$(this).colorbox(Settings);
  </code></pre>
  
  <p>How would I transfer an unknown group of properties and their values (for example "width" and "height") from something like Type.video into Settings? The goal is to be able to call Settings.height and get back the value I pushed in. </p>