If-statement never reaches the else part
<p>I'm trying to change the text of a button with the following code.</p>

<pre><code>// hide unavailable courses
$("#availability_button").click(function () {
    $(".availability_red").toggle();
        if ($(this).val('Show Unavailable')){
            $(this).html('Hide Unavailable');
        } else {
            $(this).html('Show Unavailable');
        }
});
</code></pre>

<p>The button text changes the first time I use it, but never again. Not sure why that is and I have pretty much hit the limits of my JS debugging knowledge. </p>

<p>I put an alert into it and proved it never reaches down to the else path. </p>

<p>What am i doing wrong?</p>
