Jquery/Js - Strip out text from URL
<p>Here is my url:</p>

<pre><code>https://sub.domain.com/core/subsite/piano/page/...
</code></pre>

<p>I need to take the string <code>'piano'</code>, and then apply it to elements on the page. <strong>The string will not always be 'piano', i need to take the 3rd section of the URL.</strong></p>

<p>(Below is what I currently have which uses the breadcrumb of the page to identify what page the users is currently viewing) however I'd like to take <code>'piano'</code> as the class to apply:</p>

<pre><code>$(function() {
    $('span .breadcrumb').each(function(){
        $('#Nav').addClass($(this).text());
        $('#Content').addClass($(this).text());
        $('.xpanding_footer').addClass($(this).text())
        $('#footer').addClass($(this).text());
    });
});
</code></pre>
