Targeting plain text with jQuery
<p>I'm trying to isolate (and then manipulate) quote block formatted in common newsreader and email-client manner.</p>

<p>The HTML:</p>

<pre><code>&lt;p&gt;
  Hello there!
  &lt;br /&gt;
  I'm great, how are you?
  &lt;br /&gt;
  &lt;br /&gt;
  Someone wrote:
  &lt;br /&gt;
  &gt; Greetings,
  &lt;br /&gt;
  &gt; How are you?
&lt;/p&gt;
</code></pre>

<p>I need to target all the lines that start with >, and hide them as a collapsable block. In the above example everything bellow "Someone wrote:" would then be hidden, saved as a variable and the end result produced by JS would be:</p>

<pre><code>&lt;p&gt;
  Hello there!
  &lt;br /&gt;
  I'm great, how are you?
  &lt;br /&gt;
  &lt;br /&gt;
  Someone wrote:
  &lt;br /&gt;
  &lt;a href="#"&gt;Click to expand&lt;/a&gt;
&lt;/p&gt;
</code></pre>

<p>Gmail does the same thing, but it serverside wraps the quotation block in a <code>&lt;div&gt;</code>, due to the specific nature of my project the complete process has to be done by JS alone.
I'm working with the jQuery framework.</p>

<p>Thanks in advance!</p>
