how to compress more jquery file
<p>Can anybody help me with remaking function #open("var") and .post000("var")
I mean, when I click #open2 post will be post0002 and etc. Whant one function not 4 etc...
When I push link answer it shows me a form. And this js works fine, but it's too large and not usefull. I need to make universal js...</p>

<pre><code>&lt;div id="commentwindow"&gt;
        &lt;form name="comment" action="#" method="post"&gt;
           &lt;p&gt;&lt;input class="name" type="text" maxlength="25" required placeholder="tell your name" formmethod="get"&gt;&lt;/p&gt;
           &lt;textarea  class="flud" required placeholder="insert text"&gt;&lt;/textarea&gt;
           &lt;p class="clearfix nopadding"&gt;&lt;input class="submit" type="submit" value="add comment" formaction="#"&gt;&lt;/p&gt;
        &lt;/form&gt;
    &lt;/div&gt;
    &lt;ul class="postList"&gt;
        &lt;li class="post post0004"&gt;
            &lt;header&gt;
                &lt;span class="nameaccount"&gt;name&lt;/span&gt;
                &lt;span class="time"&gt;time&lt;/span&gt;
            &lt;/header&gt;
            &lt;p&gt;text&lt;/p&gt;
            &lt;footer&gt;
                &lt;a class="link open" id="open4" href="#open4"&gt;answer&lt;/a&gt;
                &lt;div class="empty"&gt;&lt;/div&gt;
            &lt;/footer&gt;
        &lt;/li&gt;
        &lt;li class="post post0002"&gt;
            &lt;header&gt;
                &lt;span class="nameaccount"&gt;name&lt;/span&gt;
                &lt;span class="time"&gt;time&lt;/span&gt;
            &lt;/header&gt;
            &lt;p&gt;text&lt;/p&gt;
            &lt;footer&gt;
                &lt;a class="link open" id="open2" href="#open2"&gt;answer&lt;/a&gt;
                &lt;div class="empty"&gt;&lt;/div&gt;
            &lt;/footer&gt;
            &lt;ul class="answer"&gt;
                &lt;li class="post post0003"&gt;
                    &lt;header&gt;
                        &lt;span class="nameaccount"&gt;name&lt;/span&gt;
                        &lt;span class="time"&gt;time&lt;/span&gt;
                    &lt;/header&gt;
                    &lt;p&gt;&lt;/p&gt;
                    &lt;footer&gt;
                        &lt;a class="link open" id="open3" href="#open3"&gt;Answer&lt;/a&gt;
                        &lt;div class="empty1"&gt;&lt;/div&gt;
                    &lt;/footer&gt;
                &lt;/li&gt;
            &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li class="post post0001"&gt;
            &lt;header&gt;
                &lt;span class="nameaccount"&gt;name&lt;/span&gt;
                &lt;span class="time"&gt;time&lt;/span&gt;
            &lt;/header&gt;
            &lt;p&gt;&lt;/p&gt;
            &lt;footer&gt;
                &lt;a class="link open" id="open1" href="#open1"&gt;Answer&lt;/a&gt;
                &lt;div class="empty"&gt;&lt;/div&gt;
            &lt;/footer&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
    &lt;script&gt;
    $(document).ready(function () {
        $("#open1").click(function() {
            var formContent = $("#commentwindow").html();
        $(".post0001 .empty").html(formContent);
            $(".post0003 .empty").html("");
            $(".post0004 .empty").html("");
            $(".post0002 .empty").html("");
        });
    });
    $(document).ready(function () {
        $("#open2").click(function() {
            var formContent = $("#commentwindow").html();
            $(".post0002 .empty").html(formContent);
            $(".post0003 .empty1").html("");
            $(".post0004 .empty").html("");
            $(".post0001 .empty").html("");
        });
    });
    $(document).ready(function () {
        $("#open3").click(function() {
            var formContent = $("#commentwindow").html();
            $(".post0003 .empty").html(formContent);
            $(".post0004 .empty").html("");
            $(".post0002 .empty").html("");
            $(".post0001 .empty").html("");
        });
    });
    $(document).ready(function () {
        $("#open4").click(function() {
            var formContent = $("#commentwindow").html();
            $(".post0004 .empty").html(formContent);
            $(".post0003 .empty").html("");
            $(".post0002 .empty").html("");
            $(".post0001 .empty").html("");
        });
    });
&lt;/script&gt;
</code></pre>
