Index: disqus.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/disqus/Attic/disqus.module,v
retrieving revision 1.1.2.15
diff -u -r1.1.2.15 disqus.module
--- disqus.module	29 Nov 2008 09:59:51 -0000	1.1.2.15
+++ disqus.module	18 Jan 2009 23:34:40 -0000
@@ -76,10 +76,16 @@
 
             // Inject the script
             $developer = variable_get('disqus_developer', FALSE);
-            $disqus = theme('disqus_comments', $domain, $title, $message, $developer);
-			
+
+            // Create the URL
+            $url = url($_GET['q'], array(
+              'absolute' => TRUE,
+              'alias' => TRUE,
+            ));
+
+            // Output the Disqus comments.
             $node->content['disqus'] = array(
-              '#value' => $disqus,
+              '#value' => theme('disqus_comments', $domain, $title, $message, $url, $developer),
               '#weight' => 50,
             );
           }
@@ -103,15 +109,7 @@
         'attributes' => array('title' => t('Jump to the comments of this posting.')),
         'fragment' => 'disqus_thread',
       );
-      static $disqus_js_added = FALSE;
-      if ($disqus_js_added === FALSE) {
-        $disqus_js_added = TRUE;
-        $domain = variable_get('disqus_domain', '');
-		if (!empty($domain)) {
-          $disqus_js = theme('disqus_comments_num', $domain);
-          drupal_add_js($disqus_js, 'inline', 'footer');
-        }
-      }
+      disqus_add_js('disqus_thread');
     }
   }
   return $links;
@@ -237,64 +235,84 @@
   return array(
     'disqus_comments' => array(
       'arguments' => array(
-  	  	'domain' => NULL,
   	  	'title' => NULL,
   	  	'message' => NULL,
   	  	'developer' => NULL,
         'url' => NULL,
       ),
     ),
-    'disqus_comments_num' => array(
-      'arguments' => array('domain' => NULL),
-    ),
   );
 }
 
 /**
  * Renders the JavaScript to display the Disqus thread for the current page.
  * @param $domain
- *   The domain associated with this Disqus account.
+ *   The Disqus domain associated with this account.
  * @param $title
  *   The title of the thread.
  * @param $message
  *   The teaser of the thread.
- * @param $developer
- *   Whether or not testing is enabled.
  * @param $url
  *   The disqus_url variable (http://disqus.com/docs/help/#faq-16).
+ * @param $developer
+ *   Whether or not testing is enabled.
  */
-function theme_disqus_comments($domain, $title = '', $message = '', $developer = FALSE, $url = NULL) {
-  $view = t('View the forum thread.');
-  $developer = $developer ? '1' : '0';
-  $url = isset($url) ? 'var disqus_url = "'. $url .'";' : '';
-  $disqus = <<<EOT
-<script type="text/javascript">var disqus_title = "$title";var disqus_message = "$message";var disqus_developer = $developer;$url</script><div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/$domain/embed.js"></script><noscript><a href="http://$domain.disqus.com/?url=ref">$view</a></noscript>
-EOT;
-  return $disqus;
+function theme_disqus_comments($domain, $title, $message, $url, $developer) {
+  disqus_add_js(FALSE, array(
+    'title' => $title,
+    'message' => $message,
+    'url' => $url,
+    'developer' => $developer,
+    'container_id' => 'disqus_thread',
+  ));
+  return l(t('Discuss this topic on Disqus.'), "http://$domain.disqus.com/?url=ref", array(
+    'attributes' => array(
+      'id' => 'disqus_thread',
+    )
+  ));
 }
 
 /**
- * Renders the JavaScript to change all Disqus comment links to the correct number of comments.
- * 
- * @param $domain
- *   The Disqus domain associated with this account.
- */
-function theme_disqus_comments_num($domain) {
-  $disqus_js = <<<EOT
-//<[CDATA[
-(function() {
-    var links = document.getElementsByTagName('a');
-    var query = '?';
-    for(var i = 0; i < links.length; i++) {
-      if(links[i].href.indexOf('#disqus_thread') >= 0) {
-        query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
-      }
-    }
-    document.write('<script type="text/javascript" src="http://disqus.com/forums/$domain/get_num_replies.js' + query + '"></' + 'script>');
-  })();
-//]]>
-EOT;
-  return $disqus_js;
+ * Adds the jQuery Disqus plugin, as well as the Drupal Disqus behavior.
+ *
+ * @param $link_fragment
+ *   Tells Drupal that we want to evaluate comments on the page with the given fragment.
+ * @param $thread
+ *   The array of options to be used when creating the Disqus thread. Leave empty
+ *   to not create the thread.
+ */
+function disqus_add_js($link_fragment = FALSE, $thread = array()) {
+  static $added = FALSE;
+  static $added_links = FALSE;
+  static $added_thread = FALSE;
+  if ($added === FALSE) {
+    drupal_add_js(drupal_get_path('module', 'disqus') . '/disqus/jquery.disqus.js');
+    drupal_add_js(drupal_get_path('module', 'disqus') . '/disqus.js');
+    $settings = array(
+      'domain' => variable_get('disqus_domain', ''),
+    );
+    drupal_add_js(array('disqus' => $settings), 'setting');
+    $added = TRUE;
+  }
+
+  // Check if we're adding the number of links.
+  if ($added_links === FALSE && $link_fragment !== FALSE) {
+    $settings = array(
+      'comments' => array(
+        'fragment' => $link_fragment,
+      ),
+    );
+    drupal_add_js(array('disqus' => $settings), 'setting');
+    $added_links = TRUE;
+  }
+
+  if ($added_thread === FALSE && !empty($thread)) {
+    $settings = array(
+      'disqus' => $thread,
+    );
+    drupal_add_js(array('disqus' => $settings), 'setting');
+    $added_thread = TRUE;
+  }
 }
 
 /**
Index: disqus.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/disqus/Attic/disqus.views.inc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 disqus.views.inc
--- disqus.views.inc	21 Aug 2008 03:00:46 -0000	1.1.2.2
+++ disqus.views.inc	18 Jan 2009 23:34:41 -0000
@@ -24,20 +24,12 @@
     parent::construct();
     $this->additional_fields['type'] = 'type';
   }
-  
+
   /**
    * Before rendering the field, add the required JavaScript.
    */
   function pre_render($values) {
-  	static $js_added = FALSE;
-	if ($js_added === FALSE) {
-      $domain = variable_get('disqus_domain', '');
-	  if (!empty($domain)) {
-        $disqus_js = theme('disqus_comments_num', $domain);
-        drupal_add_js($disqus_js, 'inline', 'footer');
-      }
-	  $js_added = TRUE;
-	}
+    disqus_add_js('disqus_thread');
   }
 
   /**
@@ -50,8 +42,8 @@
     $node->type = $values->{$this->aliases['type']};
     $types = variable_get('disqus_nodetypes', array());
     if (!empty($types[$node->type]) && user_access('view disqus comments')) {
-	  $text = !empty($this->options['text']) ? $this->options['text'] : t('Comments');
-	  return l($text, "node/$node->nid", array('fragment' => 'disqus_thread'));
-	}
+      $text = !empty($this->options['text']) ? $this->options['text'] : t('Comments');
+      return l($text, "node/$node->nid", array('fragment' => 'disqus_thread'));
+    }
   }
 }
Index: disqus.js
===================================================================
RCS file: disqus.js
diff -N disqus.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ disqus.js	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,31 @@
+// $Id$
+
+/**
+ * @file
+ * Provides the Drupal Disqus behavior.
+ */
+
+/**
+ * The Drupal Disqus behavior.
+ */
+Drupal.behaviors.disqus = function() {
+  // Create the kill switch.
+  if (Drupal.settings.disqusLoaded != true) {
+    // Process if there are any comment threads on the page.
+    if (Drupal.settings.disqus.disqus) {
+      $('#' + Drupal.settings.disqus.disqus.container_id).Disqus(jQuery.extend({
+        domain: Drupal.settings.disqus.domain
+      }, Drupal.settings.disqus.disqus));
+    }
+
+    // Process if there are any links to comment threads available.
+    if (Drupal.settings.disqus.comments) {
+      $('a').DisqusComments({
+        domain: Drupal.settings.disqus.domain,
+        fragment: Drupal.settings.disqus.comments.fragment
+      });
+    }
+
+    Drupal.settings.disqusLoaded = true;
+  }
+};
Index: disqus/jquery.disqus.js
===================================================================
RCS file: disqus/jquery.disqus.js
diff -N disqus/jquery.disqus.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ disqus/jquery.disqus.js	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,866 @@
+// $Id$
+
+/**
+ * jQuery Disqus Plugin
+ *
+ * Applies Disqus comments to a page using a simple jQuery call.
+ *
+ * Copyright (c) 2008-2009 Rob Loach (http://www.robloach.net)
+ * Dual licensed under the MIT and GPL licenses:
+ *   http://www.opensource.org/licenses/gpl-2.0.php
+ *   http://www.opensource.org/licenses/mit-license.php
+ *
+ * There are two functions associated with the Disqus interactions. One is to
+ * create the actual threads (Disqus), and the other to create the number of
+ * comment links (DisqusComments).
+ *
+ * To create the Disqus thread, use the Disqus function:
+ * <div id="disqus_thread"></div>
+ *
+ * $(document).ready(function(){
+ *   $('#disqus_thread').Disqus({
+ *     domain: "MyDisqusDomain", // REQUIRED -- Your Disqus username/domain
+ *     title: "", // Optional -- The title of the current thread
+ *     url: top.location.href, // Optional -- The url of the current thread
+ *     message: "", // Optional -- A description of the current thread
+ *     developer: 0, // Optional -- Determines whether or not we're working in a development environment
+ *     container_id: "disqus_thread" // Optional -- The container ID for the thread
+ *   });
+ * );
+ *
+ * To create the number of comments links, use the DisqusComments function:
+ *
+ * <a href="http://example.com/my-other-page#disqus_thread">Comments</a>
+ *
+ * $(document).ready(function() {
+ *   $('a').DisqusComments({
+ *     domain: 'MyDisqusDomain', // REQUIRED -- Your Disqus username/domain
+ *     fragment: 'disqus_thread' // Optional -- The Disqus thread hash name
+ *   });
+ * };
+ */
+
+/**
+ * Creates the Disqus comment thread.
+ *
+ * Usage:
+ * $(document).ready(function(){
+ *   $.Disqus({
+ *     domain: "MyDisqusDomain", // REQUIRED -- Your Disqus username/domain
+ *     title: "", // Optional -- The title of the current thread
+ *     url: top.location.href, // Optional -- The url of the current thread
+ *     message: "", // Optional -- A description of the current thread
+ *     developer: 0, // Optional -- Determines whether or not we're working in a development environment
+ *     container_id: "disqus_thread" // Optional -- The container ID for the thread
+ *   });
+ * );
+ * <div id="disqus_thread"></div>
+ *
+ * This will create the Disqus comment thread within #disqus_thread.
+ */
+jQuery.fn.Disqus = function(options) {
+  // Load the settings with defaults
+  var settings = jQuery.extend({
+    domain: "",
+    fragment: "disqus_thread",
+    title: "",
+    url: top.location.href,
+    message: "",
+    developer: 0,
+    container_id: 'disqus_thread'
+  }, options);
+
+  if (settings.domain != "") {
+
+    // Set the global Disqus variables
+    disqus_developer = settings.developer;
+    this.replaceWith('<div id="' + settings.container_id + '></div>');
+    disqus_container_id = settings.container_id;
+    disqus_message = settings.message;
+    disqus_title = settings.title;
+    disqus_url = settings.url;
+    window.disqus_no_style = true; // Keep Disqus from changing the CSS (prevents white screen).
+
+    // Call the Disqus script to create the Disqus comment thread
+    jQuery.getScript('http://disqus.com/forums/' + settings.domain + '/embed.js');
+
+    // Use jQuery to load the CSS stylesheet
+    jQuery('head').append('<style type="text/css" media="screen">\
+        #dsq-content #dsq-comments .dsq-comment{\
+          list-style-type: none;\
+          padding: 0;\
+          margin: 0;\
+          margin-top: 20px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-rate{\
+          line-height: 1.22em; /* daniel */\
+          position: absolute;\
+          margin-left: 4px;\
+          margin-top: 32px;\
+          *margin-top: 30px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-rate a,\
+          #dsq-content #dsq-comments .dsq-comment-rate img {\
+          border: 0;\
+          margin: 0;\
+          padding: 0;\
+          background-color: transparent;\
+          }\
+          #dsq-content #dsq-comments .dsq-arrows,\
+          #dsq-content #dsq-comments .not-votable .dsq-arrows:hover {\
+          opacity: .25;\
+          filter: alpha(opacity=25);\
+          _width: 16px;\
+          _height: 14px;\
+          }\
+          #dsq-content #dsq-comments .dsq-arrows.voted {\
+          opacity: .5;\
+          filter: alpha(opacity=50);\
+          }\
+          #dsq-content #dsq-comments .dsq-arrows:hover {\
+          opacity: 1;\
+          filter: alpha(opacity=100);\
+          }\
+          #dsq-content #dsq-comments .dsq-arrows img {\
+          _width: 16px;\
+          _height: 14px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header{\
+          margin-left: 0px;\
+          height: 30px;\
+          background: transparent url(\'http://media.disqus.com/images/embed/transp-line-10.png\') repeat-x bottom center;\
+          line-height: 30px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment.special .dsq-comment-header {\
+          background: transparent url(\'http://media.disqus.com/images/embed/transp-line-10.png\') repeat-x bottom center;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header a {\
+          text-decoration: none; /* daniel */\
+          }\
+          #dsq-content #dsq-comments .dsq-header-avatar{\
+          float: left;\
+          width: 32px;\
+          height: 34px;\
+          margin-top: -2px;\
+          margin-left: -3px;\
+          margin-right: 3px;\
+          }\
+          #dsq-content #dsq-comments .dsq-header-avatar.dsq-menu-on,\
+          #dsq-content #dsq-comments .dsq-header-avatar:hover{\
+          background: url(\'http://media.disqus.com/images/embed/avatar-frame-24.png\') no-repeat top left;\
+          cursor: pointer;\
+          z-index: 9999;\
+          }\
+          #dsq-content #dsq-comments .dsq-header-avatar img{\
+          float: left;\
+          margin: 4px;\
+          width: 24px;\
+          height: 24px;\
+          }\
+          #dsq-content #dsq-comments .dsq-header-avatar .dsq-menu img {\
+          height: 8px;\
+          width: 7px;\
+          display: inline;\
+          float: none;\
+          margin-bottom: -1px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header cite{ /* daniel */\
+          float: left;\
+          font-style: normal;\
+          font-weight: bold;\
+          margin: 0 3px;\
+          line-height: inherit;\
+          cursor: pointer;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header cite a {\
+          line-height: inherit;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header .dsq-header-meta {/* daniel */\
+          font-size: 90%;\
+          line-height: inherit;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-body{\
+          margin-top: 5px;\
+          margin-left: 40px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-footer{ /* daniel */\
+          margin-left: 40px;\
+          /* daniel */\
+          font-size: 90%;\
+          padding-top: 10px;\
+          }\
+          #dsq-content #dsq-comments a.dsq-header-time{\
+          color: inherit;\
+          margin: 0 5px; /* daniel */\
+          line-height: inherit;\
+          }\
+          #dsq-content #dsq-comments span.dsq-header-points{\
+          margin: 0 5px;\
+          color: inherit;\
+          line-height: inherit;\
+          }\
+          #dsq-content #dsq-comments .dsq-header-avatar .dsq-menu{\
+          display: none;\
+          }\
+          #dsq-content #dsq-comments .dsq-header-avatar .dsq-menu{\
+          float: left;\
+          left: 0px;\
+          position: relative;\
+          _position: absolute;\
+          _left:;\
+          background: #f0f0f0;\
+          z-index: 2;\
+          border-left: 1px solid #888;\
+          border-right: 1px solid #888;\
+          border-bottom: 1px solid #888;\
+          -moz-border-radius: 0px 0px 4px 4px;\
+          -webkit-border-bottom-right-radius: 4px;\
+          -webkit-border-bottom-left-radius: 4px;\
+          display: inline;\
+          padding: 5px 10px 5px 0;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu li{\
+          float: left;\
+          clear: both;\
+          line-height: 1.3em;\
+          font-size: 12px;\
+          margin-bottom: 2px;\
+          margin-left: 4px;\
+          white-space: nowrap;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu li a.dsq-admin-toggle {\
+          font-weight: bold;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu li.dsq-admin-email,\
+          #dsq-content #dsq-comments .dsq-menu li.dsq-admin-ip {\
+          color: #555;\
+          font-style: italic;\
+          cursor: default;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu li.dsq-admin-ip {\
+          padding-bottom: 3px;\
+          border-bottom: 1px dotted #aaa;\
+          cursor: default;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu li a{\
+          text-decoration: none;\
+          color: #333;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu li a:hover {\
+          color: #869AAD;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu-clout{\
+          margin: 6px 0;\
+          width: 72px;\
+          height: 32px;\
+          background: url(\'http://media.disqus.com/images/embed/clout-background.png\') no-repeat top left;\
+          }\
+          #dsq-content #dsq-comments .dsq-menu-clout.unverified{\
+          background: url(\'http://media.disqus.com/images/embed/unverified-background.png\');\
+          }\
+          #dsq-content #dsq-comments li.dsq-menu-clout a{\
+          float: left;\
+          width: 100%;\
+          text-align: center;\
+          color: #FFF;\
+          font-size: 16px;\
+          margin-top: 5px;\
+          font-weight: bold;\
+          }\
+          #dsq-content #dsq-comments li.dsq-menu-clout.unverified a{\
+          font-size: 10px;\
+          font-weight: normal;\
+          }\
+          #dsq-content #dsq-comments li.dsq-menu-clout a:hover {\
+          color: #fff;\
+          }\
+          img.dsq-record-img {\
+          border: 0;\
+          padding: 0;\
+          margin: 0;\
+          float: none;\
+          text-indent: 0;\
+          background: none;\
+          }\
+          a.dsq-brlink {\
+          font-size: 90%;\
+          color: #666;\
+          text-decoration: none;\
+          font-family: Trebuchet MS, Trebuchet, Verdana, Arial, sans-serif;\
+          }\
+          span.disqus {\
+          font-family: Trebuchet MS, Trebuchet, Verdana, Arial, sans-serif;\
+          font-size: 90%;\
+          text-transform: uppercase;\
+          color: #64747d;\
+          }\
+          span.logo-disqus {\
+          font-family: Trebuchet MS, Trebuchet, Verdana, Arial, sans-serif;\
+          font-size: 95%;\
+          text-transform: uppercase;\
+          color: #64747d;\
+          font-weight: bold;\
+          }\
+          span.logo-disq {\
+          font-family: Trebuchet MS, Trebuchet, Verdana, Arial, sans-serif;\
+          font-size: 95%;\
+          text-transform: uppercase;\
+          color: #64747d;\
+          font-weight: bold;\
+          }\
+          span.logo-us {\
+          font-family: Trebuchet MS, Trebuchet, Verdana, Arial, sans-serif;\
+          font-size: 95%;\
+          text-transform: uppercase;\
+          color: #ff9300;\
+          font-weight: bold;\
+          }\
+          #disqus_thread #dsq-content {\
+          text-align: left;\
+          font-family: inherit;\
+          font-size: 12px;\
+          }\
+          #disqus_thread #dsq-content iframe {\
+          overflow-y: auto;\
+          overflow-x: hidden;\
+          *overflow-x: visible;\
+          width: 100%;\
+          background-color: transparent;\
+          <!--[if IE 7]>\
+          width: 0px;\
+          <![endif]-->\
+          }\
+          #disqus_thread #dsq-content iframe.dsq-post-video {\
+          height: 370px;\
+          overflow: hidden;\
+          }\
+          #disqus_thread #dsq-content a.dsq-post-report {\
+          /*  color: #c03000;*/\
+          /*  background-color: #fff;*/\
+          }\
+          .clearfix:after {\
+          content:".";\
+          display: block;\
+          height: 0;\
+          clear: both;\
+          visibility: hidden;\
+          }\
+          #dsq-content #dsq-comments img.icon-adjust {\
+          margin-bottom: -3px;\
+          }\
+          #disqus_thread #dsq-content ul,\
+          #disqus_thread #dsq-content li,\
+          #disqus_thread #dsq-content ol,\
+          #disqus_thread #dsq-content cite,\
+          #disqus_thread #dsq-content img, /* dsq-content */\
+          #dsq-content #dsq-comments ul,\
+          #dsq-content #dsq-comments li,\
+          #dsq-content #dsq-comments ol,\
+          #dsq-content #dsq-comments div,\
+          #dsq-content #dsq-comments p,\
+          #dsq-content #dsq-comments a,\
+          #dsq-content #dsq-comments cite,\
+          #dsq-content #dsq-comments img {\
+          border: 0;\
+          padding: 0;\
+          margin: 0;\
+          float: none;\
+          text-indent: 0;\
+          background: none;\
+          }\
+          #disqus_thread #dsq-content cite,\
+          #dsq-content #dsq-comments cite {\
+          font-style: normal;\
+          }\
+          #dsq-content #dsq-comments img {\
+          max-width: none;\
+          }\
+          #disqus_thread #dsq-content li,\
+          #disqus_thread #dsq-content ul,\
+          #disqus_thread #dsq-content ol,\
+          #dsq-content #dsq-extra-links li,\
+          #dsq-content #dsq-comments ul,\
+          #dsq-content #dsq-comments li,\
+          #dsq-content #dsq-comments ol {\
+          list-style-type: none;\
+          list-style-image: none;\
+          background: none;\
+          display: block;\
+          }\
+          #dsq-content #dsq-extra-links li:before,\
+          #dsq-content #dsq-comments li:before {\
+          content: "";\
+          }\
+          #dsq-content #dsq-content #dsq-post-add {\
+          margin: 0 0 10px 0;\
+          }\
+          #dsq-content #dsq-comments {\
+          width: 100%;\
+          list-style-type: none;\
+          padding: 0;\
+          border: 0;\
+          }\
+          #dsq-content #dsq-comments .dsq-remove-message {\
+          color: #555;\
+          list-style-type: none;\
+          margin: 10px 0;\
+          padding: 5px;\
+          border: 1px solid #c03000;\
+          background-color: #FDDFD0;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-alert,\
+          #dsq-content #dsq-alerts p {\
+          font-weight: bold;\
+          color: #555;\
+          margin: 15px 0;\
+          padding: 5px;\
+          background-color: #fdf1d0;\
+          border: 1px solid #fad163;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header .dsq-hl-up {\
+          background-color: #92C72A;\
+          color: #fff;\
+          margin:0pt 5px;\
+          padding:0 2px;\
+          }\
+          #dsq-content #dsq-comments .dsq-comment-header .dsq-hl-down {\
+          background-color: #c03000;\
+          color: #fff;\
+          margin:0pt 5px;\
+          padding:0 2px;\
+          }\
+          #dsq-content #dsq-comments .dsq-hl-anchor {\
+          background-color: #ffff99 !important;\
+          color: #000 !important;\
+          }\
+          #dsq-content #dsq-comments .dsq-hl-anchor p {\
+          color: #000 !important;\
+          }\
+          #dsq-content #dsq-comments .dsq-hl-anchor a {\
+          color: #000 !important;\
+          }\
+          /* ------ outside comment list ------ */\
+          #dsq-content #dsq-auth .dsq-auth-header{\
+          margin-bottom: 10px;\
+          }\
+          #dsq-content h3 { margin: 10px 0; }\
+          #disqus_thread #dsq-content h3 {\
+          font-weight: bold;\
+          }\
+          #dsq-content #dsq-auth .dsq-by {\
+          float: right;\
+          }\
+          #dsq-content #dsq-auth img,\
+          #dsq-content #dsq-options-toggle img {\
+          border: 0;\
+          margin: 0;\
+          padding: 0;\
+          max-width: none;\
+          float: none;\
+          }\
+          #dsq-content #dsq-options {\
+          margin-bottom: 20px;\
+          }\
+          #dsq-options .dsq-extra-meta {\
+          background: transparent url(\'http://media.disqus.com/images/embed/transp-line-10.png\') repeat-x top center;\
+          margin-top:10px;\
+          padding-top:10px;\
+          }\
+          #dsq-extra-links {\
+          margin-top: 15px;\
+          font-size: 90%;\
+          }\
+          #dsq-extra-links img {\
+          margin-bottom: -3px;\
+          }\
+          /* ------- pagination -------- */\
+          #dsq-content #dsq-pagination {\
+          margin-bottom: 20px;\
+          }\
+          #dsq-content #dsq-pagination a {\
+          font-weight: bold;\
+          }\
+          /* ------- popup div -------- */\
+          #dsq-popup-profile h4,\
+          #dsq-popup-profile ul,\
+          #dsq-popup-profile li,\
+          #dsq-popup-profile ol,\
+          #dsq-popup-profile div,\
+          #dsq-popup-profile p,\
+          #dsq-popup-profile a,\
+          #dsq-popup-profile cite,\
+          #dsq-popup-profile img {\
+          border: 0;\
+          padding: 0;\
+          margin: 0;\
+          float: none;\
+          text-indent: 0;\
+          background: none;\
+          }\
+          #dsq-popup-profile img {\
+          max-width: none;\
+          }\
+          #dsq-popup-profile ul,\
+          #dsq-popup-profile li,\
+          #dsq-popup-profile ol {\
+          list-style-type: none;\
+          list-style-image: none;\
+          background: none;\
+          display: block;\
+          }\
+          #dsq-popup-profile li:before {\
+          content: "";\
+          }\
+          #dsq-popup-profile {\
+          padding: 0;\
+          border: 0;\
+          }\
+          .dsq-popupdiv,\
+          .dsq-reblogdiv {\
+          color: #333;\
+          display: none;\
+          position: absolute;\
+          z-index: 9999;\
+          }\
+          .dsq-popupdiv p {\
+          color: #222;\
+          line-height: 1.22em;\
+          }\
+          .dsq-popupdiv a {\
+          color: #1C5392;\
+          }\
+          .dsq-popupdiv a:hover {\
+          color: #869AAD;\
+          }\
+          #dsq-popup-profile {\
+          text-align: left;\
+          width: 520px;\
+          _background: transparent url(http://media.disqus.com/images/embed/popup-body.png) repeat-y;\
+          }\
+          #dsq-popup-profile #dsq-popup-top {\
+          position: relative;\
+          text-align: right;\
+          width: 520px;\
+          height: 20px;\
+          background: transparent url(http://media.disqus.com/images/embed/popup-top.png) no-repeat;\
+          }\
+          #dsq-popup-profile #dsq-popup-top img {\
+          margin: 12px 13px 0 0;\
+          *margin: 12px 13px 0 0;\
+          }\
+          #dsq-popup-profile #dsq-popup-bottom {\
+          text-align: right;\
+          width: 520px;\
+          height: 20px;\
+          background: transparent url(http://media.disqus.com/images/embed/popup-bottom.png) no-repeat;\
+          }\
+          #dsq-popup-profile #dsq-popup-body div.show-more{\
+          padding-left: 10px;\
+          font-size: 95%;\
+          color:#7aa5d5;\
+          }\
+          #dsq-popup-profile #dsq-popup-body div.powered-by{\
+          font-size: 90%;\
+          text-align: right;\
+          padding-right: 15px;\
+          }\
+          #dsq-popup-profile #dsq-popup-body div.powered-by a {\
+          color: #888;\
+          text-decoration:none;\
+          }\
+          #dsq-popup-profile  #dsq-popup-body {\
+          width: 520px;\
+          background: transparent url(http://media.disqus.com/images/embed/popup-body.png) repeat-y;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-body-padding {\
+          padding: 0 10px;\
+          font-size: 13px;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-header {\
+          background-color: #e5ebed;\
+          padding: 0 10px;\
+          position: relative;\
+          padding-bottom: 10px;\
+          border-bottom: 1px solid #445460;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-header a.dsq-close-link {\
+          color:#7aa5d5;\
+          position: absolute;\
+          top:-10px;\
+          right: 5px;\
+          text-decoration:none;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-header img {\
+          border: 1px solid #fff;\
+          width: 32px;\
+          height: 32px;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-body-padding cite {\
+          margin-left: 5px;\
+          top: 8px;\
+          position: absolute;\
+          font-style: normal;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile #dsq-popup-body #dsq-popup-body-padding cite {\
+          position: static;\
+          margin: 0;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-body-padding cite span {\
+          font-weight: bold;\
+          font-size: 150%;\
+          font-style: normal;\
+          margin-right: 10px;\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-body-padding cite a{\
+          /* pass */\
+          }\
+          #dsq-popup-profile #dsq-popup-body #dsq-popup-body-padding .dsq-popup-profilelink {\
+          margin: 0 0 0 5px;\
+          font-size: 90%;\
+          }\
+          #dsq-popup-profile .dsq-clout {\
+          float: left;\
+          width: 72px;\
+          height: 32px;\
+          line-height: 32px;\
+          background: url(\'http://media.disqus.com/images/embed/clout-background.png\') no-repeat top left;\
+          }\
+          #dsq-popup-profile .dsq-clout.unverified {\
+          background: url(\'http://media.disqus.com/images/embed/unverified-background.png\') no-repeat top left;\
+          line-height: 24px;\
+          }\
+          #dsq-popup-profile .dsq-clout a{\
+          float: left;\
+          width: 100%;\
+          text-align: center;\
+          color: #FFF;\
+          font-size: 16px;\
+          font-weight: bold;\
+          text-decoration: none;\
+          }\
+          #dsq-popup-profile .dsq-clout.unverified a{\
+          font-size: 11px;\
+          font-weight: normal;\
+          }\
+          #dsq-popup-profile .dsq-clout a:hover {\
+          color: #fff;\
+          }\
+          #dsq-popup-profile #dsq-profile-services {\
+          padding: 10px;\
+          background-color: #f0f0f0;\
+          border-bottom: 1px solid #aaa;\
+          height: 1%;\
+          overflow: hidden;\
+          }\
+          #dsq-popup-profile #dsq-profile-services a.dsq-profile-badge {\
+          font-size: 95%;\
+          color: #fff;\
+          text-decoration: none;\
+          font-weight: bold;\
+          float: left;\
+          display: block;\
+          padding: 0 3px;\
+          text-align: center;\
+          background-color: #ffaf42;\
+          border: 1px solid #dc7f00;\
+          }\
+          #dsq-popup-profile #dsq-profile-services a.dsq-profile-badge.anon {\
+          border-color: #888;\
+          background-color: #aaa;\
+          color: #666;\
+          }\
+          #dsq-popup-profile #dsq-profile-services ul {\
+          margin-left: 15px;\
+          float: left;\
+          }\
+          #dsq-popup-profile #dsq-profile-services ul li{\
+          display: inline;\
+          margin-right: 15px;\
+          }\
+          #dsq-popup-profile #dsq-profile-services span.dsq-services-description {\
+          font-size: 85%;\
+          color: #555;\
+          position: absolute;\
+          top: 25px;\
+          left: 5px;\
+          display: none;\
+          white-space: nowrap;\
+          }\
+          #dsq-popup-profile #dsq-clout-label {\
+          margin-top: 5px;\
+          font-size: 85%;\
+          color: #555;\
+          visibility: hidden;\
+          clear: both;\
+          padding-left: 10px;\
+          }\
+          #dsq-popup-profile #dsq-profile-services img {\
+          border:2px solid #fff;\
+          }\
+          #dsq-popup-profile a#dsq-profile-follow {\
+          color:#7aa5d5;\
+          }\
+          #dsq-popup-profile #dsq-profile-status,\
+          #dsq-popup-profile #dsq-profile-recentcomments {\
+          clear: both;\
+          padding: 10px;\
+          }\
+          #dsq-popup-profile #dsq-profile-status h4,\
+          #dsq-popup-profile #dsq-profile-recentcomments h4 {\
+          font-size: 110%;\
+          border-bottom: 2px solid #D7DBDD;\
+          margin-bottom: 10px;\
+          }\
+          #dsq-popup-profile #dsq-profile-status h4 span,\
+          #dsq-popup-profile #dsq-profile-recentcomments h4 span {\
+          background-color: #D7DBDD;\
+          padding: 2px 5px;\
+          color: #555;\
+          font-weight: bold;\
+          }\
+          #dsq-popup-profile p.dsq-profile-label {\
+          font-family: Trebuchet MS, Trebuchet, Verdana, sans-serif;\
+          font-size: 95%;\
+          color: #aaa;\
+          }\
+          #dsq-popup-profile ul#dsq-profile-commentlist {\
+          margin-top: 10px;\
+          }\
+          #dsq-popup-profile #dsq-profile-commentlist li{\
+          padding: 5px 0;\
+          border-bottom: 2px solid #e9ebed;\
+          }\
+          #dsq-popup-profile #dsq-profile-commentlist li img.avatar-small {\
+          width: 24px;\
+          height: 24px;\
+          border: 1px solid #DDD;\
+          float: left;\
+          }\
+          #dsq-popup-profile #dsq-profile-commentlist li .comment-message {\
+          margin-left: 30px;\
+          *float: left;\
+          *margin-left: 5px;\
+          }\
+          #dsq-popup-profile #dsq-profile-commentlist li span.comment-meta {\
+          clear: both;\
+          margin-left: 30px;\
+          display: block;\
+          font-size: 90%;\
+          }\
+          #dsq-popup-profile #dsq-profile-commentlist span{\
+          color: #666;\
+          font-size: 95%;\
+          }\
+          /* Reblog */\
+          .dsq-reblogdiv #dsq-popup-profile cite {\
+          font-size:115%;\
+          font-weight: bold;\
+          color: #333;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile #dsq-reblog-form {\
+          padding: 10px;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile #dsq-blogauth-form {\
+          margin: 10px 0;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile #dsq-blogauth-form li {\
+          margin-bottom: 5px;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile #dsq-blogauth-form li input {\
+          width: 250px;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile #dsq-blogauth-form li label {\
+          width: 100px;\
+          display: block;\
+          float: left;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile ul.dsq-reblog-input {\
+          margin: 10px 0;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile ul.dsq-reblog-input li {\
+          margin-bottom: 10px;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile ul.dsq-reblog-input li input {\
+          width: 450px;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile ul.dsq-reblog-input li textarea {\
+          width: 450px;\
+          font-size: 12px;\
+          font-family: Arial, Helvetica, sans-serif;\
+          height: 175px;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile ul.dsq-reblog-input li label {\
+          float: none;\
+          display: block;\
+          font-weight: bold;\
+          }\
+          .dsq-reblogdiv #dsq-popup-profile .dsq-blogauth-toggle {\
+          font-weight: bold;\
+          }\
+          p.dsq-reblog-supported {\
+          font-size: 90%;\
+          color: #555;\
+          }\
+          /* Trackbacks and Pingbacks */\
+          #disqus_thread #dsq-content ul#dsq-references li {\
+          margin-bottom: 20px;\
+          display: list-item;\
+          list-style: disc;\
+          margin-left: 15px;\
+          }\
+          #disqus_thread #dsq-content ul#dsq-references cite {\
+          margin-bottom: 0px;\
+          padding-bottom: 0px;\
+          font-weight: bold;\
+          }\
+          #disqus_thread #dsq-content ul#dsq-references p.dsq-meta {\
+          margin-top: 0px;\
+          padding-top: 0px;\
+          font-size: 95%;\
+          }\
+          </style>\
+         ');
+  }  
+};
+
+/**
+ * Creates the number of comment links.
+ *
+ * <a href="http://example.com/my-other-page#disqus_thread">Comments</a>
+ *
+ * $(document).ready(function() {
+ *   $('a').DisqusComments({
+ *     domain: 'MyDisqusDomain', // REQUIRED -- Your Disqus username/domain
+ *     fragment: 'disqus_thread' // Optional -- The Disqus thread hash name
+ *   });
+ * };
+ */
+jQuery.fn.DisqusComments = function(options) {
+  // Load the settings with defaults
+  var settings = jQuery.extend({
+    domain: "",
+    fragment: "disqus_thread"
+  }, options);
+
+  if (settings.domain != "") {
+    // Construct the script query string.
+    var query = '?';
+    this.each(function(i, obj){
+      if (obj.href.split("#")[1] == settings.fragment) {
+        query += 'url' + i + '=' + encodeURIComponent(obj.href) + '&';
+      }
+    });
+
+    // Call the Disqus script to get the number of replies per link
+    jQuery.getScript('http://disqus.com/forums/' + settings.domain + '/get_num_replies.js' + query);
+  }
+};
+
+/**
+ * Disqus Global Variables -- Don't change these, the plugin will do it for you.
+ */
+var disqus_developer = 1;
+var disqus_container_id = 'disqus_thread';
+var disqus_message = '';
+var disqus_title = '';
+var disqus_url = '';
Index: disqus/jquery.disqus.html
===================================================================
RCS file: disqus/jquery.disqus.html
diff -N disqus/jquery.disqus.html
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ disqus/jquery.disqus.html	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>jQuery Disqus Plugin</title>
+<link rel="shortcut icon" href="http://media.disqus.com/images/dsq-favicon-16x16.ico" type="image/vnd.microsoft.icon">
+
+<!-- Require jQuery -->
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
+
+<!-- Load the jQuery Disqus plugin -->
+<script type="text/javascript" src="jquery.disqus.js"></script>
+
+</head>
+<body>
+<h1>jQuery Disqus Plugin</h1>
+<p>The jQuery Disqus plugin allows you to easily embed Disqus into web pages after the page has been completely loaded.</p>
+
+<!-- The Disqus Thread needs the disqus_thread ID -->
+<a id="disqus_thread" href="http://mydisqusdomain.disqus.com/?url=ref">View the comment thread on Disqus.</a>
+
+<!-- Linking to external links with #disqus_thread in there will give the number of comments -->
+<a href="http://disqus.disqus.com/jquery_disqus_plugin/#disqus_thread">Add a comment</a>
+
+<a href="http://example.com/my-page#disqus_thread">Add a comment</a>
+
+<script type="text/javascript">
+  // Invoke Disqus once the page is ready and loaded.
+  $(document).ready(function() {
+
+    // Create the Disqus thread.
+    $('#disqus_thread').Disqus({
+      domain: "mydisqusdomain", // REQUIRED -- Your Disqus username/domain
+      title: "jQuery Disqus Plugin", // Optional -- The title of the current thread
+      url: '', // Optional -- The url of the current thread
+      message: "Testing the jQuery Disqus Plugin.", // Optional -- A description of the current thread
+      developer: 1, // Optional -- Determines whether or not we're working in a development environment
+      container_id: 'disqus_thread' // Optional -- Forces the ID to the given value
+    });
+
+    // Make the number of comment links reflect how many comments there are.
+    $('a').DisqusComments({
+      domain: "mydisqusdomain",
+      fragment: "disqus_thread"
+    });
+  });
+
+</script>
+
+</body>
+</html>
