title: Javascript/jQuery string manipulation?
body: <p>I'm trying to either grab only part of this URL or inject part of a string into it (whichever is simplest).</p>
  
  <p>Here's the URL:</p>
  
  <pre><code>http://www.goodbuytimeshare.com/listings/min:1000/max:150000/agreements:rent,buy/properties:apartment,condo,hotel,resort/show:4/
  </code></pre>
  
  <p>I figure I either need to be able to tim it down to:</p>
  
  <pre><code>/listings/min:1000/max:150000/agreements:rent,buy/properties:apartment,condo,hotel,resort/
  </code></pre>
  
  <p>Or turn it into:</p>
  
  <pre><code>http://www.goodbuytimeshare.com/listings/ajax/min:1000/max:150000/agreements:rent,buy/properties:apartment,condo,hotel,resort/show:4/start:1/end:100/
  </code></pre>
  
  <p>(Same URL but "ajax/" would be added after the ".com/")</p>
  
  <p>Which of these would be simpler?</p>