...
<div id="block" class="first"></div>
...
...
var $block = $('#block');
$block.click(function(){
$block.removeClass('first');
$block.addClass('second')
});
...
...
var $label = $('#label');
$block.click(function(){
$label.text("Открыть")
});