<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -54,6 +54,72 @@ Becomes:
    .../body&gt;
 &lt;/pre&gt;
 
+h2. Designate Comment Textarea with id=&quot;comment&quot;
+
+This step is very important! You will need to give the target textarea an ID *'comment'*.
+
+This:
+
+&lt;pre&gt;
+   &lt;body...
+&lt;code&gt;
+   &lt;form method=&quot;post&quot; id=&quot;commentform&quot;&gt;
+      &lt;h3&gt;Leave a Reply&lt;/h3&gt;
+      ...
+      &lt;p&gt;&lt;textarea name=&quot;comment&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
+      &lt;p&gt;&lt;input name=&quot;submit&quot; type=&quot;submit&quot; id=&quot;submit&quot; value=&quot;Submit Comment&quot; /&gt;
+      &lt;/p&gt;
+   &lt;/form&gt;
+&lt;/code&gt;
+   .../body&gt;
+&lt;/pre&gt;
+
+Becomes:
+
+&lt;pre&gt;
+   &lt;body...
+&lt;code&gt;
+   &lt;form method=&quot;post&quot; id=&quot;commentform&quot;&gt;
+      &lt;h3&gt;Leave a Reply&lt;/h3&gt;
+      ...
+      &lt;p&gt;&lt;textarea name=&quot;comment&quot; id=&quot;comment&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
+      &lt;p&gt;&lt;input name=&quot;submit&quot; type=&quot;submit&quot; id=&quot;submit&quot; value=&quot;Submit Comment&quot; /&gt;
+      &lt;/p&gt;
+   &lt;/form&gt;
+&lt;/code&gt;
+   .../body&gt;
+&lt;/pre&gt;
+
+h2. [NEW FEATURE] Get a lightbox, live preview, and generate HTML on the fly instead of the TextArea
+
+To get form enhancements on your site all you need to do is add the class *'encouraged-form'* for your comment form. Once you do this users will no longer be forced to the bottom of your page. Instead, your form will be temporarily transported into a lightbox and then put back if the user cancels out. Additionally, the directive and quote are stored in javascript and the user is given a manner to remove the quote / directive from their comment if they'd like. This is validated / communicated to the user as they will see a live preview of their comment, generated for them as they type! Any of these features can be toggled off and if you don't add the encouraged-form class everything behaves as it once did before.
+
+This:
+
+&lt;pre&gt;
+   &lt;body...
+&lt;code&gt;
+   &lt;form method=&quot;post&quot; id=&quot;commentform&quot;&gt;
+      &lt;h3&gt;Leave a Reply&lt;/h3&gt;
+      ...
+   &lt;/form&gt;
+&lt;/code&gt;
+   .../body&gt;
+&lt;/pre&gt;
+
+Becomes:
+
+&lt;pre&gt;
+   &lt;body...
+&lt;code&gt;
+   &lt;form method=&quot;post&quot; id=&quot;commentform&quot; class=&quot;encouraged-form&quot;&gt;
+      &lt;h3&gt;Leave a Reply&lt;/h3&gt;
+      ...
+   &lt;/form&gt;
+&lt;/code&gt;
+   .../body&gt;
+&lt;/pre&gt;
+
 h2. Quotable Comments
 
 For quotable comments things are a little different. Here you must *refrain from using the quotable class* and instead follow some basic conventions in your comment markup. First, give the HTML object that contains all of your comments the class 'commentlist' then make sure every individual comment has the class 'comment' applied to it.
@@ -178,7 +244,7 @@ Becomes:
 
 h3. Designate Comment Authors
 
-Next, you will need to designate the element in your HTML containing the comment's author name. Simply add the class *'comment-author'* to this element.
+Next, you will need to designate the element in your HTML containing the comment's author name. Simply add the class *'comment-author-name'* to this element.
 
 This:
 
@@ -375,19 +441,63 @@ Becomes:
 &lt;/code&gt;
 &lt;/pre&gt;
 
+h2. Disable Comment Lightbox: 
+
+To *turn this feature off* add the class &quot;no-lightbox&quot; to the comment list container in your HTML.
+
+This:
+
+&lt;pre&gt;
+&lt;code&gt;
+   &lt;h3 id=&quot;comments&quot;&gt;3 Comments&lt;/h3&gt;
+   &lt;ol class=&quot;commentlist&quot;&gt;
+&lt;/code&gt;
+&lt;/pre&gt;
+
+Becomes:
+
+&lt;pre&gt;
+&lt;code&gt;
+   &lt;h3 id=&quot;comments&quot;&gt;3 Comments&lt;/h3&gt;
+   &lt;ol class=&quot;commentlist no-lightbox&quot;&gt;
+&lt;/code&gt;
+&lt;/pre&gt;
+
+h2. Disable Comment Preview: 
+
+To *turn this feature off* add the class &quot;no-preview&quot; to the comment list container in your HTML.
+
+This:
+
+&lt;pre&gt;
+&lt;code&gt;
+   &lt;h3 id=&quot;comments&quot;&gt;3 Comments&lt;/h3&gt;
+   &lt;ol class=&quot;commentlist&quot;&gt;
+&lt;/code&gt;
+&lt;/pre&gt;
+
+Becomes:
+
+&lt;pre&gt;
+&lt;code&gt;
+   &lt;h3 id=&quot;comments&quot;&gt;3 Comments&lt;/h3&gt;
+   &lt;ol class=&quot;commentlist no-preview&quot;&gt;
+&lt;/code&gt;
+&lt;/pre&gt;
+
 h1. Dependencies
 
 This project relies on &quot;jQuery&quot;:http://jquery.com and the &quot;jQuery ScrollTo plugin&quot;:http://plugins.jquery.com/project/ScrollTo.
 
 h1. Next Steps / Ideas
 
-*Build Quote HTML on Submit:* Instead of embedding straight HTML, add a user control to the comment form showing the quote and target author. This will allow the user to enter their comment in as normal while having the HTML output created on form submit.
+*IE6/7/8 Support:* It looks like there is an error with the text highlight functionality in IE. If a user highlights some text in IE7 and responds to a comment the directive is not caught. I believe it has something to do with the target that is being captured from the onMouseUp listener.
 
-*Add live preview support:* Allow the user to see a live preview of their comment with response and target author as they type their comment. This will provide the user better feedback as to what has happened now that they have utilized this advanced commenting system.
+-*Build Quote HTML on Submit:* Instead of embedding straight HTML, add a user control to the comment form showing the quote and target author. This will allow the user to enter their comment in as normal while having the HTML output created on form submit.-
 
-*Lightbox Form:* Users are not anticipating the page scroll to the bottom of the page. Instead it may be more applicable to present the comment form in a lightbox.
+-*Add live preview support:* Allow the user to see a live preview of their comment with response and target author as they type their comment. This will provide the user better feedback as to what has happened now that they have utilized this advanced commenting system.-
 
-*IE6/7/8 Support:* It looks like there is an error with the text highlight functionality in IE. If a user highlights some text in IE7 and responds to a comment the directive is not caught. I believe it has something to do with the target that is being captured from the onMouseUp listener.
+-*Lightbox Form:* Users are not anticipating the page scroll to the bottom of the page. Instead it may be more applicable to present the comment form in a lightbox.-
 
 -*Looser coupling:* The code in my example is very tightly coupled to my markup. It would be better to provide a good convention which would allow others to incorporate this functionality into their site without overhauling their markup.-
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -25,19 +25,29 @@ var quote;
 var preview;
 var noLightbox;
 var noPreview;
+var sortedCommentary;
+var noRelatives;
+var noReplies;
+var noQuoteControl;
+var noReplyControl;
 
 $(document).ready( function() {   
    //
-   // Check for vars within the dom.
+   // Check for vars within the DOM.
    //
-   form = $($('.encouraged-form').get(0));
+   form = $('.encouraged-form').get(0);
+   if(form) {
+      form = $(form);
+   } else {
+      form = false;
+   }
    commentList = $($('.commentlist').get(0));
-   var sortedCommentary = commentList.hasClass('sorted-commentary');
-   var noRelatives = commentList.hasClass('no-relatives');
-   var noReplies = commentList.hasClass('no-replies');
+   sortedCommentary = commentList.hasClass('sorted-commentary');
+   noRelatives = commentList.hasClass('no-relatives');
+   noReplies = commentList.hasClass('no-replies');
    noPreview = commentList.hasClass('no-preview');
-   var noQuoteControl = commentList.hasClass('no-quote-control');
-   var noReplyControl = commentList.hasClass('no-reply-control');
+   noQuoteControl = commentList.hasClass('no-quote-control');
+   noReplyControl = commentList.hasClass('no-reply-control');
    noLightbox = commentList.hasClass('no-lightbox');
    
    //
@@ -86,7 +96,7 @@ $(document).ready( function() {
          directive = &quot;&lt;p&gt;&lt;a href=\&quot;&quot;+permalink+&quot;\&quot;&gt;@&quot;+author+&quot;&lt;/a&gt;:&lt;/p&gt;\n&quot;
       }
       quote = directive+&quot;&lt;blockquote&gt;&quot;+quote+&quot;&lt;/blockquote&gt;\n&lt;p&gt;\n&quot;;
-      if(noLightbox) {
+      if(noLightbox || !form) {
          if(!form) {
             $('#comment').val(quote+&quot;&lt;!-- Start your comment below this line. --&gt;\n\n&lt;/p&gt;&quot;);
          }
@@ -254,13 +264,15 @@ $(document).ready( function() {
    //
    // Handle form submission.
    //
-   form.submit(function(){
-      $($('#comment').get(0)).val(preview.html());
-      if(form.find('input[type=&quot;submit&quot;]').get(0)) {
-         $(form.find('input[type=&quot;submit&quot;]').get(0)).attr(&quot;disabled&quot;,true);
-      };
-      return true;
-   });
+   if(form) {
+      form.submit(function(){
+         $($('#comment').get(0)).val(preview.html());
+         if(form.find('input[type=&quot;submit&quot;]').get(0)) {
+            $(form.find('input[type=&quot;submit&quot;]').get(0)).attr(&quot;disabled&quot;,true);
+         };
+         return true;
+      });
+   }
 });
 
 /*
@@ -351,14 +363,16 @@ function getAnchor(href){
    Grabs the HTML comment form and leaves an invisible anchor in it's place.
 */
 function setupLightbox() {
-   if(!$('#encouraged-comment-form-anchor').get(0)) {
-      lightbox.after('&lt;a href=&quot;#&quot; id=&quot;encouraged-comment-form-anchor&quot;&gt;&lt;/a&gt;');
+   if(form){
+      if(!$('#encouraged-comment-form-anchor').get(0)) {
+         lightbox.after('&lt;a href=&quot;#&quot; id=&quot;encouraged-comment-form-anchor&quot;&gt;&lt;/a&gt;');
+      }
+      lightbox.html(form);
+      lightbox.append('&lt;a href=&quot;#&quot; id=&quot;encouraged-comment-lightbox-toggle&quot;&gt;Close&lt;/a&gt;');
+      $('#encouraged-comment-lightbox-toggle').click(hideLightbox);
+      lightbox.fadeIn(&quot;normal&quot;);
+      lightboxBackground.show().fadeTo(&quot;slow&quot;,0.3);
    }
-   lightbox.html(form);
-   lightbox.append('&lt;a href=&quot;#&quot; id=&quot;encouraged-comment-lightbox-toggle&quot;&gt;Close&lt;/a&gt;');
-   $('#encouraged-comment-lightbox-toggle').click(hideLightbox);
-   lightbox.fadeIn(&quot;normal&quot;);
-   lightboxBackground.show().fadeTo(&quot;slow&quot;,0.3);
 };
 
 /*
@@ -370,6 +384,7 @@ function hideLightbox() {
    lightbox.hide();
    $($('#encouraged-comment-form-anchor').get(0)).after(form);
    lightboxBackground.fadeOut(&quot;slow&quot;);
+   return false;
 };
 
 /*
@@ -409,7 +424,7 @@ function setupComment(target,quoted) {
    
    quote = directive + quote;
    
-   if(noLightbox) {
+   if(noLightbox || !form) {
       if(noPreview) {
          $('#comment').val(quote+&quot;\n&lt;p&gt;\n&lt;!-- Start your comment below this line. --&gt;\n\n&lt;/p&gt;&quot;);
       }</diff>
      <filename>javascript/jquery/encouraged-commentary.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0bf09cc99d45775350d0b8af8590d165e1b12b97</id>
    </parent>
  </parents>
  <author>
    <name>Jimmy Jeffers</name>
    <email>jim@sumocreations.com</email>
  </author>
  <url>http://github.com/jimjeffers/encouraged-commentary/commit/6af61a5882dcaf98cffc51e5829f5d6a4f5e56fe</url>
  <id>6af61a5882dcaf98cffc51e5829f5d6a4f5e56fe</id>
  <committed-date>2009-01-17T23:31:13-08:00</committed-date>
  <authored-date>2009-01-17T23:31:13-08:00</authored-date>
  <message>Improved documentation and resolved minor bugs causing the script to crash if 'encouraged-form' was not setup.</message>
  <tree>1874d3dfc9c5cb1745d7bf0b2318a62666428cbd</tree>
  <committer>
    <name>Jimmy Jeffers</name>
    <email>jim@sumocreations.com</email>
  </committer>
</commit>
