You can add and remove classes with jQuery like so:
$(".first").addClass("second")
// remove a class
$(".first").removeClass("second")
By the way you can set multiple classes in your markup right away separated with a whitespace
<div class="second first"></div>