title: Setting the opt group property dynamically to Select
body: <p>I am adding new options to a select menu by the following way:</p>
  
  <pre><code>var options1 = {
      val1 : 'text1',
      val2 : 'text2'
  };
  $.each(options1, function(val, text) {
      $('#SelectMenu').append( new Option(text,val) );
  });
  </code></pre>
  
  <p>How can we add a opt group to the select menu?</p>