javascript document.write vs jQuery replaceWith
<p>I have some pages that will use the path portion of the URL to place text on the page, like so..</p>

<pre><code>urlPath=window.location.pathname; 

urlPathArray = urlPath.split('/'); 


urlPath2=urlPathArray[2]; 
if (urlPath2 == "sometext")
    {
    document.write("Title for Some Text")
    }
else if (urlPath2 == "othertext")
    {
    document.write("Title for Other Text")
    }
else 
    {
    document.write ("Generic Title")
     }
</code></pre>

<p>Is it worth figuring out how to do this with jQuery and the replaceWith function?</p>
