title: call different functions based on a variable
body: <p>Really, I'm looking at the pattern in my code and realizing it could potentially be simplified. So, that's the ultimate goal. This is for a plugin I'm writing that calls different functions based on the existence of certain data attributes.</p>
  
  <pre><code>var a = $.extend({},$.bcplugins.defaults,options);
  var b;
  
  // a variable for each plugin's data attribute
  var crumbsInstances = doc.find('[data-bcp-crumbs]'),
      copyrightInstances = doc.find('[data-bcp-copyright]'),
      activeNavInstances = doc.find('[data-bcp-activenav]');
  
  
  // Determine wich functions get called
  if (crumbsInstances.length) {
      crumbsInstances.each(function() {
          b = {};
          b = $$.extend({}, b, $(this).data(a.dataOptions));
          crumbs(a,b);
      });
  }
  if (copyrightInstances.length)  {
      copyrightInstances.each(function()  {
          b = {};
          b = $$.extend({}, b, $(this).data(a.dataOptions));
          copyright(a,b);
      });
  }
  if (activeNavInstances.length)  {
      activeNavInstances.each(function()  {
          b = {};
          b = $$.extend({}, b, $(this).data(a.dataOptions));
          activeNav(a,b);
      });
  }
  </code></pre>
  
  <p>This plugin will have a growing number of functions over time. Can I reduce this down to one if statement through variables?</p>