Remove Class from ID if another link is clicked, vise versa
<p>I've been working to find a solution for a jQuery problem.
I have a parent container with 2 divs and a link in each. If a link is clicked in one of the divs, a class is added to the parent container (to change the background). If the other link is clicked, I wanted to check if a class has already been added from the other link's click and be removed.</p>

<p>What's going on: When I click the first link, the class <code>inside-office</code> is added. Then I click the second link and it will add that without removing the first link.</p>

<p>Here's the code I have so far with no success:</p>

<pre><code>$("a.in-office").click(function() {
    if($('#fullwrap').hasClass('outside-office')) {
    $(this).removeClass('outside-office');
    }
    $('#top_barwrap').parent().addClass('inside-office');
    $('.blockcase').fadeIn();
    $('.lead-title, .subtitle').fadeOut();
    $('#top_barwrap').animate( { height:'150px' }, { queue:false, duration: 500 });
});

$("a.out-office").click(function() {
    if($('#fullwrap').hasClass('inside-office')) {
    $(this).removeClass('inside-office');
    }
    $('#top_barwrap').parent().addClass('outside-office');
    $('.blockcase').fadeIn();
    $('.lead-title, .subtitle').fadeOut();
    $('#top_barwrap').animate( { height:'150px' }, { queue:false, duration: 500 });
});
</code></pre>
