Constructing the url dynamically
<p>I have <a href="http://posnation.com/pre_config/step2/Restaurant_System" rel="nofollow">this</a> site that I am currently working on which is jQuery heavy and I have another challenge that I have encountered. The links on the top on the page     </p>

<pre><code>* Standard Class
* Bussiness Class
* Premium
</code></pre>

<p>These links are not working currently because i have not implemented them yet but i have a problem with the url. This is how I am currently generation the url </p>

<pre><code>$(document).ready(function(){
  $('#final_location').click(function() {
 location.href = this.href +'/'+ encodeURIComponent($('#type_of_station').text().match(/^\S*/)[0])
     + '/'+ escape($('.number_changer').attr("id").slice(-1));

    return false;
});     
});
</code></pre>

<p>Which works great but i now need to append the value of the link selected. So i need to make the url to be:</p>

<pre><code>http://posnation.com/pre_config/step3/Restaurant/1/business_class
</code></pre>

<p>instead of </p>

<pre><code>http://posnation.com/pre_config/step3/Restaurant/1
</code></pre>

<p>Based on what is selected on the links</p>

<pre><code>&lt;div class="tabs"&gt;
  &lt;ul&gt;
        &lt;li class="active"&gt;&lt;span class="l"&gt;&lt;/span&gt;&lt;a href="#"&gt;Standard Class&lt;/a&gt;&lt;span class="r"&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="l"&gt;&lt;/span&gt;&lt;a href="#"&gt;Bussiness Class&lt;/a&gt;&lt;span class="r"&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span class="l"&gt;&lt;/span&gt;&lt;a href="#"&gt;Premium&lt;/a&gt;&lt;span class="r"&gt;&lt;/span&gt;&lt;/li&gt;
 &lt;/ul&gt;
   &lt;/div&gt;
</code></pre>

<p>here is the link </p>

<pre><code>&lt;a id="final_location" href="/pre_config/step4" class="proceed-btn right"&gt;Proceed To Next Step &amp;gt;&amp;gt;&amp;gt;&lt;/a&gt;
</code></pre>

<p>Any ideas what i need to change the jQuery to, to make the final part of the url and also if there is an easy way to keep the link active after its clicked.....thanks alot</p>
