Shorten JQuery Snippet
<p>I have the following JQuery snippet:</p>

<pre><code>(someVar.next().length == 0)?someVar.fadeOut().end().find("ul").first().fadeIn():someVar.fadeOut().next().fadeIn();
</code></pre>

<p>There is a fair amount of code duplication between the two results of the conditional - i.e. someVar.fadeOut() and .fadeIn() on both.</p>

<p>I would ideally like something like this:</p>

<pre><code>someVar.fadeOut().((someVar.next().length == 0)?end().find("ul").first():next()).fadeIn();
</code></pre>

<p>But that doesn't work :)  Safari developer tools reports a syntax error but I'm not skilled enough to work out how to do it properly.</p>

<p>If it can't be shortened, then just saying that is fine :)</p>
