how to combine jquery code into a javascript function
<p>I need to add a jquery script into a javascript function and then call that function when <code>#sortby</code> is added to the url. Is this possible?</p>

<p><strong>the jQuery</strong></p>

<pre><code>$("#myselect option[value='availability']").attr("selected","selected");
</code></pre>

<p><strong>the Javascript</strong></p>

<pre><code>function sortBy(){
    performanceQuery(perfpage);
    tourQuery(tourpage);
    return false;
}
</code></pre>
