How to put a lot of siblings into a div

Posted: - Source : stackoverflow

I have six divs like this:

<div style="display:none">div1</div>
<div style="display:none">div2</div>
<div style="display:none">div3</div>
<div style="display:none">div4</div>
<div style="display:none">div5</div>
<div style="display:none">div6</div>

I want to put the first 4 divs into a hidden div, and the 2 next div into another hidden div, resulting in a DOM like this:

<div class="glob" style="display:none">
    <div style="display:none">div1</div>
    <div style="display:none">div2</div>
    <div style="display:none">div3</div>
    <div style="display:none">div4</div>
</div>

<div class="glob" style="display:none">
    <div style="display:none">div5</div>
    <div style="display:none">div6</div>
</div>

And after doing this, i want to add a combo with 2 values, when you click on the first choice it shows the first "global" div, and when you click on the second choice it shows the second "global" div. I have no idea how to do the first thing.