diff --git a/fb.js b/fb.js
index cf1f72e..01ccb10 100644
--- a/fb.js
+++ b/fb.js
@@ -8,21 +8,33 @@ FB_JS.fbu = null;
 
 /**
  * Drupal behaviors hook.
+ * Called when page is loaded, or content added via javascript.
+ */
+(function ($) {
+  Drupal.behaviors.fb = {
+    attach : function(context) {
+      FB_JS.drupalBehaviors(context);
+    }
+  };
+})(jQuery);
+
+/**
+ * Drupal behaviors hook.
  *
  * Called when page is loaded, or content added via javascript.
  */
-Drupal.behaviors.fb = function(context) {
+FB_JS.drupalBehaviors = function(context) {
   // Respond to our jquery pseudo-events
   var events = jQuery(document).data('events');
   if (!events || !events.fb_session_change) {
     jQuery(document).bind('fb_session_change', FB_JS.sessionChangeHandler);
   }
-
+  
   // Once upon a time, we initialized facebook's JS SDK here, but now that is done in fb_footer().
   if (typeof(FB) != 'undefined') {
     // Render any XFBML markup that may have been added by AJAX.
-    $(context).each(function() {
-      var elem = $(this).get(0);
+    jQuery(context).each(function() {
+      var elem = jQuery(this).get(0);
       FB.XFBML.parse(elem);
     });
 
@@ -407,34 +419,3 @@ FB_JS.showConnectedMarkup = function(fbu, context) {
   }
 };
 
-FB_JS.fbu = null;
-/**
- * Drupal behaviors hook.
- *
- * Called when page is loaded, or content added via javascript.
- */
-(function ($) {
-  Drupal.behaviors.fb = {
-    attach : function(context) {
-      // Respond to our jquery pseudo-events
-      var events = jQuery(document).data('events');
-      if (!events || !events.fb_session_change) {
-	jQuery(document).bind('fb_session_change', FB_JS.sessionChangeHandler);
-      }
-
-      // Once upon a time, we initialized facebook's JS SDK here, but now that is done in fb_footer().
-      if (typeof(FB) != 'undefined') {
-        // Render any XFBML markup that may have been added by AJAX.
-        $(context).each(function() {
-          var elem = $(this).get(0);
-          FB.XFBML.parse(elem);
-        });
-      }
-
-      FB_JS.showConnectedMarkup(Drupal.settings.fb.fbu, context);
-      // Markup with class .fb_show should be visible if javascript is enabled.  .fb_hide should be hidden.
-      jQuery('.fb_hide', context).hide();
-      jQuery('.fb_show', context).show();
-    }
-  };
-})(jQuery);
