Can I manipulate a <div> with jQuery?

So if I have:
<div id="the-div">
<div id="div-2">
Text
</div>
</div>

Can I change class names, and add further HTML, e.g. to create this:
<div id="the-div" class="new-class">
<div id="div-2">
Text
</div>
<div id="new-div">
</div>
</div>

Can someone point me in the right direction?