jQuery - how to simplify the code
<pre><code>&lt;script&gt;
    $(document).ready(function () {

        var lnkAgreement = $('#lnk-agreement');
        if ($('#IsConsultant').attr('checked')) {
            lnkAgreement.attr('href', '@Url.Action("ServiceProviderAgreement", "Home")');
            lnkAgreement.text('service provider agreement');
        }
        else {
            lnkAgreement.attr('href', '@Url.Action("UserAgreement","Home")');
            lnkAgreement.text('user agreement');
        }
        $('#IsConsultant').click(function () {

            if ($('#IsConsultant').attr('checked')) {
                lnkAgreement.attr('href', '@Url.Action("ServiceProviderAgreement", "Home")');
                lnkAgreement.text('service provider agreement');
            }
            else {
                lnkAgreement.attr('href', '@Url.Action("UserAgreement","Home")');
                lnkAgreement.text('user agreement');
            }

        });
    });
&lt;/script&gt;
&lt;a href="#" id="lnk-agreement"&gt;&lt;/a&gt;
</code></pre>

<p>How to avoid from iterative blocks of the code?</p>
