diff --git a/hotblocks-controls.css b/hotblocks-controls.css
index 95c2b4b..0983ec1 100644
--- a/hotblocks-controls.css
+++ b/hotblocks-controls.css
@@ -1,4 +1,6 @@
 
 /* Use JS to show controls on hover. */
 /* @TODO: Fail gracefully if theres no JS */
-.hotblocks_item-controls, .hotblocks-controls  { display:none; }
+.hotblocks_item-controls, .hotblocks-controls {
+  display: none;
+}
diff --git a/hotblocks.css b/hotblocks.css
index b27a4df..653a7fb 100644
--- a/hotblocks.css
+++ b/hotblocks.css
@@ -1,12 +1,40 @@
-/** These properties allow nested category items to be displayed with proper representational indentation **/
-
-.depth-0 { margin-left:0em; }
-.depth-1 , .depth-2, .depth-3, .depth-4, .depth-5, .depth-6, .depth-7, .depth-8, .depth-9 { margin-left:2em; display:none; }
-
-.hotblocks-even { background-color: #EDF5FA;}
-.hotblocks-odd { background-color: #FFFFFF;}
-.toggleRow { background-color: #F2F2F2; border-bottom:1px solid #bbb; }
-.toggleable { border:1px dotted #ddd; }
-.depth-0 { border:1px dotted #ccc; }
-.prow{ padding: .5em; border:1px solid #eee; }
-.hotblockItem-folder { font-weight:bold; }
\ No newline at end of file
+/** these properties allow nested category items to be displayed with proper representational indentation **/
+
+.depth-0 {
+  margin-left: 0em;
+}
+
+.depth-1, .depth-2, .depth-3, .depth-4, .depth-5, .depth-6, .depth-7, .depth-8, .depth-9 {
+  display: none;
+  margin-left: 2em;
+}
+
+.hotblocks-even {
+  background-color: #edf5fa;
+}
+
+.hotblocks-odd {
+  background-color: #ffffff;
+}
+
+.togglerow {
+  background-color: #f2f2f2;
+  border-bottom: 1px solid #bbb;
+}
+
+.toggleable {
+  border: 1px dotted #ddd;
+}
+
+.depth-0 {
+  border: 1px dotted #ccc;
+}
+
+.prow {
+  border: 1px solid #eee;
+  padding: .5em;
+}
+
+.hotblockitem-folder {
+  font-weight: bold;
+}
\ No newline at end of file
diff --git a/hotblocks.module b/hotblocks.module
index ae88bfa..fc76377 100644
--- a/hotblocks.module
+++ b/hotblocks.module
@@ -1,5 +1,5 @@
 <?php
-  
+
 /***********Define Constants************************/
 
 define('HOTBLOCKS_TITLE_HIDING_START', '(');
@@ -16,13 +16,13 @@ define('HOTBLOCKS_DEFAULT_TERMINOLOGY_PLURAL', 'hotblock items');
 function hotblocks_init($bReturn = false) {
   $sImagePath = base_path() . drupal_get_path('module', 'hotblocks') .'/js/thickbox/loadingAnimation.gif';
   drupal_set_html_head('<script type="text/javascript">var tb_pathToImage = "'.$sImagePath.'";</script>');
-  drupal_add_css(drupal_get_path('module', 'hotblocks') .'/js/thickbox/thickbox.css');    
-  drupal_add_js(drupal_get_path('module', 'hotblocks') .'/js/thickbox/jquery.thickbox.js');    
-  drupal_add_js(drupal_get_path('module', 'hotblocks') .'/js/hotblocks.js');    
-  drupal_add_css(drupal_get_path('module', 'hotblocks') .'/hotblocks.css');     
+  drupal_add_css(drupal_get_path('module', 'hotblocks') .'/js/thickbox/thickbox.css');
+  drupal_add_js(drupal_get_path('module', 'hotblocks') .'/js/thickbox/jquery.thickbox.js');
+  drupal_add_js(drupal_get_path('module', 'hotblocks') .'/js/hotblocks.js');
+  drupal_add_css(drupal_get_path('module', 'hotblocks') .'/hotblocks.css');
   if(variable_get('hotblocks_floating_controls', true)) {
     drupal_add_js(drupal_get_path('module', 'hotblocks') .'/js/hotblocks-controls.js');
-    drupal_add_css(drupal_get_path('module', 'hotblocks') .'/hotblocks-controls.css');     
+    drupal_add_css(drupal_get_path('module', 'hotblocks') .'/hotblocks-controls.css');
   }
   drupal_add_tabledrag('hotblocks-reorder', 'order', 'sibling', 'weight');
   drupal_add_js('misc/jquery.form.js');
@@ -34,7 +34,7 @@ function hotblocks_init($bReturn = false) {
  */
 function hotblocks_menu() {
   $aItems = array();
-  
+
   //--//--// User visitable items: //--//--//
   $aItems['admin/content/hotblocks'] = array (
     'title' => 'Hotblocks',//hotblocks_terminology(true,true),
@@ -43,7 +43,7 @@ function hotblocks_menu() {
     'access arguments' => array('administer hotblocks'),
     'type' => MENU_NORMAL_ITEM,
   );
-  
+
   $aItems['admin/content/hotblocks/overview_block'] = array (
     'title' => hotblocks_terminology(true,true). ' Overview by Block',
     'page callback' => 'hotblocks_overview_by_block',
@@ -51,7 +51,7 @@ function hotblocks_menu() {
     'access arguments' => array('administer hotblocks'),
     'type' => MENU_NORMAL_ITEM,
   );
-  
+
   $aItems['admin/content/hotblocks/overview_taxonomy'] = array (
     'title' => hotblocks_terminology(true,true).' Overview by Taxonomy',
     'page callback' => 'hotblocks_taxonomy_page',
@@ -81,7 +81,7 @@ function hotblocks_menu() {
     'access arguments' => array('administer hotblocks'),
     'type' => MENU_NORMAL_ITEM,
   );
-  
+
   $aItems['admin/settings/hotblocks'] = array (
     'title' => /*hotblocks_terminology(true,true).*/ 'Hotblocks settings',
     'page callback' => 'drupal_get_form',
@@ -90,7 +90,7 @@ function hotblocks_menu() {
     'access arguments' => array('administer hotblocks'),
     'type' => MENU_NORMAL_ITEM,
   );
-  
+
   //--//--// Callbacks: //--//--//
   $aItems['hotblocks/hotblocks_blockcount_names_js'] = array (
     'page callback' => 'hotblocks_blockcount_names_js',
@@ -98,7 +98,7 @@ function hotblocks_menu() {
     'access arguments' => array('administer hotblocks'),
     'type' => MENU_CALLBACK,
   );
-  
+
   //arg1 - block delta
   $aItems['hotblocks/assign/%'] = array (
     'title' => 'Assign Hotblocks_Item',
@@ -108,7 +108,7 @@ function hotblocks_menu() {
     'access arguments' => array('assign items to any hotblock',null,2),
     'type' => MENU_CALLBACK,
   );
-  
+
   //arg1 - block delta
   $aItems['hotblocks/reorder/%'] = array (
     'title' => 'reorder items in any hotblock',
@@ -118,7 +118,7 @@ function hotblocks_menu() {
     'access arguments' => array('reorder items in any hotblock',null,2),
     'type' => MENU_CALLBACK,
   );
-  
+
   //arg1 - node id, arg2 - delta
   $aItems['hotblocks/assign/%/%'] = array (
     'page callback' => 'hotblocks_assign_to_block',
@@ -127,7 +127,7 @@ function hotblocks_menu() {
     'access arguments' => array('assign items to any hotblock',2,3),
     'type' => MENU_CALLBACK,
   );
-  
+
   //arg1 - node id, arg2 - delta
   $aItems['hotblocks/remove/%/%'] = array (
     'page callback' => 'hotblocks_remove_from_block',
@@ -136,7 +136,7 @@ function hotblocks_menu() {
     'access arguments' => array('remove items from any hotblock',2,3),
     'type' => MENU_CALLBACK,
   );
- 
+
   //arg1 - block delta
   $aItems['hotblocks/create/%'] = array (
     'title' => 'Create new '.hotblocks_terminology(),
@@ -174,10 +174,10 @@ function hotblocks_filter($op, $delta = 0, $format = -1, $text = '', $cache_id =
     case "process":
       $text = preg_replace_callback('/\[hotblock([0-9]*?)\]/', 'hotblocks_process_filter', $text);
       return $text;
-    
+
     case "no cache":
     	return true;
-    	
+
     default:
       return $text;
   }
@@ -193,27 +193,27 @@ function hotblocks_process_filter($aMatches) {
 
 /**
  * Implementation of hook_form_alter().
- * 
+ *
  * @todo Add a global checkbox here
  */
 function hotblocks_form_alter(&$aForm, $aFormState, $sFormId) {
   if (isset($aForm['type']) && isset($aForm['#node']) && $aForm['type']['#value'] .'_node_form' == $sFormId) { //this is a node add form
     //This condition indicates we are at node/add/(nodetype)/hotblocks_item (link from create hotblocks_item page)
     if(arg(3) == 'hotblocks_item' && hotblocks_is_allowed_hotblocks_item_type($aForm['#node']->type)) {
-      
+
       $aForm['hotblocks_create'] = array(
         '#type' => 'value',
         '#value' => true,
       );
       $aForm['#submit'][] = 'hotblocks_node_form_submit';
-      
+
       //This indicates the node should also be assigned to a hotblocks_item block after being created.  The path is node/add/(nodetype)/hotblocks_item/(blockdelta)
       if(is_numeric(arg(4))) {
         $aForm['hotblocks_delta'] = array(
           '#type' => 'value',
           '#value' => arg(4),
         );
-        
+
         //if we're creating a hotblocks_item from the block interface, give the user a chance to assign global status on the node add form - does not apply if the hotblocks_item wont be immediately assigned to a block
         $aForm['hotblocks'] = array(
           '#title' => hotblocks_terminology(false,true),
@@ -222,7 +222,7 @@ function hotblocks_form_alter(&$aForm, $aFormState, $sFormId) {
           '#collapsed' => false,
           '#weight' => -50,
         );
-      
+
         $aForm['hotblocks']['hotblocks_global'] = array(
           '#title' => t('Global'),
           '#type' => 'checkbox',
@@ -267,9 +267,9 @@ function hotblocks_form_alter(&$aForm, $aFormState, $sFormId) {
             '#title' => 'Make this node available as a '.hotblocks_terminology(),
             '#type' => 'checkbox',
             '#default_value' => false,
-          );  
+          );
         }
-        
+
       }
     }
   }
@@ -358,7 +358,7 @@ function hotblocks_nodeapi(&$oNode, $sOp, $arg) {
         $oHotblocks_ItemObject->systemtype = $_GET['systemtype'];
         $oHotblocks_ItemObject->nid = $oNode->nid;
         drupal_write_record('hotblocks', $oHotblocks_ItemObject);
-        
+
         //After the node has been created and given hotblocks_item status, potentially assign it to a block as a hotblocks_item as well
         if($oNode->hotblocks_delta) {
           $oHotblocks_ItemObject->delta = $oNode->hotblocks_delta;
@@ -367,7 +367,7 @@ function hotblocks_nodeapi(&$oNode, $sOp, $arg) {
           drupal_write_record('hotblocks', $oHotblocks_ItemObject);
         }
       }
-    
+
       if($oNode->hotblocks_remove) {
         //For now, hotblocks_item status can only be removed globally for all instances the node occurs.
         //remove all reference to it from the hotblocks table
@@ -387,13 +387,13 @@ function hotblocks_nodeapi(&$oNode, $sOp, $arg) {
  */
 function hotblocks_perm() {
   $aPerms = array(
-    'administer hotblocks', 
+    'administer hotblocks',
     'create items in any hotblock',
     'assign items to any hotblock',
     'remove items from any hotblock',
     'reorder items in any hotblock',
   );
-  
+
   if(variable_get('hotblocks_extended_permissions', false)) {
     $aOps = array ('assign items to any hotblock', 'remove items from any hotblock', 'reorder items in any hotblock');
     $iNumBlocks = variable_get('hotblocks_blockcount', 3);
@@ -405,7 +405,7 @@ function hotblocks_perm() {
     	}
     }
   }
-  
+
   return $aPerms;
 }
 /*******************************[END] Drupal hooks****************/
@@ -430,7 +430,7 @@ function hotblocks_assign_page($iDelta = null) {
     module_exists('taxonomy') && variable_get('hotblocks_vocabulary', 0) ? l('Category', 'hotblocks/assign/'.$iDelta,array('query' => 'sort=taxonomy&height=400&width=400&'.$sPath, 'attributes' => array('class' => 'hotblocks_itemthickbox'.$sExtraClass),'html' => true)) : null,
   );
   $sOutput = 'Sort By: ' . implode(' | ', $links);
-  
+
   //Remember last clicked option if sort wasnt specified
   if(!$_GET['sort']) {
     $_GET['sort'] = variable_get('hotblocks_assign_sort_default', 'alpha');
@@ -438,13 +438,13 @@ function hotblocks_assign_page($iDelta = null) {
   else {
     variable_set('hotblocks_assign_sort_default', $_GET['sort']);
   }
-  
+
   $aHotblocks = hotblocks_list();
   if(!sizeof($aHotblocks)) {
     print ('No '.hotblocks_terminology(true).' have been created yet.');
     exit;
   }
-  
+
   if($_GET['sort'] == 'alpha' || !$_GET['sort']) {
     //Alpha sorting is done by default in the hotblocks_list() function
     foreach ($aHotblocks as $oRow) {
@@ -456,7 +456,7 @@ function hotblocks_assign_page($iDelta = null) {
     }
     $sOutput .= theme('table', array('Name'), $aRowset);
   }
-  
+
   if($_GET['sort'] == 'type') {
     //group hotblocks by type
     foreach ($aHotblocks as $oRow) {
@@ -465,20 +465,20 @@ function hotblocks_assign_page($iDelta = null) {
     	}
       $aHotblocksGrouped[$oRow->friendlytype][$oRow->nid] = $oRow;
     }
-    
+
     foreach ($aHotblocksGrouped as $sFriendlyType => $aRows) {
       //figure out the type (node type or 'block') of the items in this group
       $sHotblocks_ItemType = current($aRows);
       $sHotblocks_ItemType = $sHotblocks_ItemType->type;
-      
+
     	if(!hotblocks_access('assign items to any hotblock',$sHotblocks_ItemType,$iDelta)) {
     	  continue;
     	}
-    	
+
     	$aHeader = array(
     	 $sFriendlyType,
     	);
-    	
+
     	$aRowset = array();
     	foreach ($aRows as $oRow) {
     	  $sLink = hotblocks_assign_to_block_link($iDelta, $oRow);
@@ -487,12 +487,12 @@ function hotblocks_assign_page($iDelta = null) {
     	$sOutput .= theme('table', $aHeader, $aRowset);
     }
   }
-  
+
   if($_GET['sort'] == 'taxonomy') {
     $sOutput .= hotblocks_taxonomy_page($iDelta);
   }
-  
-  
+
+
   $aCheckboxElement = array(
     'assignglobal' =>
     array(
@@ -502,7 +502,7 @@ function hotblocks_assign_page($iDelta = null) {
       '#id' => 'hotblocks-global',
     )
   );
-  
+
   $sHeaderInstructions = '<b>Select an item to insert.</b>';
 
   print ($sHeaderInstructions. drupal_render($aCheckboxElement) . $sOutput);
@@ -518,7 +518,7 @@ function hotblocks_assign_page($iDelta = null) {
 function hotblocks_reorder($iDelta = null) {
   //path will be set if this is an ajax request, otherwise use the standard q
   $sPath = $_GET['path'] ? $_GET['path'] : $_GET['q'];
-  
+
   $aHotblocksOrdered = hotblocks_view_block($iDelta, true);
   $weight = 1;
   foreach ($aHotblocksOrdered as $aP) {
@@ -527,12 +527,12 @@ function hotblocks_reorder($iDelta = null) {
     $aHotblocks[] = (array)$aP;
     $weight++;
   }
- 
+
   if(sizeof($aHotblocks) > 0) {
     print drupal_get_form('hotblocks_reorder_form', $aHotblocks, $iDelta, $sPath);
-    exit;  
+    exit;
   }
-  
+
   //show the hotblocks block
   return hotblocks_view_block($iDelta);
   exit;
@@ -570,7 +570,7 @@ function hotblocks_reorder_form(&$form_state,$aHotblocks, $iDelta, $sPath) {
     );
     $i++;
   }
-  
+
   $form['delta'] = array (
     '#type' => 'value',
     '#value' => $iDelta,
@@ -579,7 +579,7 @@ function hotblocks_reorder_form(&$form_state,$aHotblocks, $iDelta, $sPath) {
     '#type' => 'value',
     '#value' => $sPath,
   );
-  
+
   $form['#js']['tableDrag']['arrange']['weight'][0] = array(
     'target' => 'weight',
     'source' => NULL,
@@ -615,18 +615,18 @@ function hotblocks_reorder_form_submit($form, $form_state) {
   $aValues = $form_state['values'];
   $iDelta = $aValues['delta'];
   $sPath = $aValues['path'];
-  
+
   //@todo - reconsider after refactoring.  We need to create a new instance of the hotblocks_item for each path it gets reordered on
   //Only run update if the hotblocks_item exists with this hotblocks_itemid on this path in this block.  If there's no record with this path, create a new one.
   //revised: maybe this way is better
-  
+
   //clear out all the rows form this block and path
   //@TODO this delete query doesn't cut it.
   //weighting bug: global promos only order properly on the page where their weights were set
   //reordering global promos causes them to duplicate on other pages
   //It is not delete global items added on other pages that are mixed in the reordering, but then adds them in again at the end
   //Solution for global promos is maybe to only display instances of the global with that path, unless there none in which case allow an instance to be created for that path.
-  
+
   db_query("DELETE FROM {hotblocks} WHERE delta = %d AND path ='%s'", $iDelta, $sPath);
   db_query("DELETE FROM {hotblocks} WHERE delta = %d AND global = 1", $iDelta);
   foreach ($aValues as $aElement) {
@@ -648,9 +648,9 @@ function hotblocks_reorder_form_submit($form, $form_state) {
       drupal_write_record('hotblocks', $oHotblocks_ItemObject);
     }*/
     drupal_write_record('hotblocks', $oHotblocks_ItemObject);
-    
+
   }
-  
+
   print hotblocks_view_block($iDelta);
   exit;
 }
@@ -663,7 +663,7 @@ function hotblocks_reorder_form_submit_cancel($form, $form_state) {
 }
 
 /**
- * Non-ajax page callback.  
+ * Non-ajax page callback.
  * Prints a table of 'add node' links for each nodetype allowed to be a hotblocks_item
  */
 function hotblocks_create_hotblocks_item_page() {
@@ -716,7 +716,7 @@ function hotblocks_is_allowed_hotblocks_item_type($sType) {
 /**
  * @return Array of node types which are configured to be hotblocks
  */
-function hotblocks_get_types() { 
+function hotblocks_get_types() {
   $aHotblocks_ItemTypes = variable_get('hotblocks_allowed_types',array('hotblocks_any'));
   if(in_array('hotblocks_any',$aHotblocks_ItemTypes)) {
     $types = array_keys(node_get_types('names'));
@@ -748,7 +748,7 @@ function hotblocks_get_blockname($iDelta) {
  *
  * @param node id
  * @param block delta $iDelta
- * @return boolean 
+ * @return boolean
  */
 function hotblocks_check_global($iHotblocks_Itemid) {
   return db_result(db_query("SELECT global FROM {hotblocks} WHERE hotblocks_itemid = %d AND global = 1", $iHotblocks_Itemid));
@@ -805,26 +805,26 @@ function hotblocks_item_view($oHotblocks_Item, $iDelta = 0, $sContext = 'normal'
     $oHotblocks_Item = hotblocks_item_load($oHotblocks_Item);
   }
   $iHotblocks_Itemid = $oHotblocks_Item->hotblocks_itemid;
-  
+
   if(!hotblocks_block_controls($iDelta)) {
     //if the user has no control privilages of the block whatsoever, use a different class so some js behaviors dont get attached
     $sContext = 'no access';
   }
-  
+
   switch ($sContext) {
     case 'normal':
       $sClass = 'hotblocks_item-item';
     break;
-    
+
     case 'reorder':
       $sClass = 'hotblocks_item-item-reorder';
     break;
   }
-  
+
   if($iHotblocks_Itemid) {
     $sClass .= " hotblocks_itemid-$iHotblocks_Itemid hotblocks-item";
   }
-  
+
   if($oHotblocks_Item->systemtype == 'block') {
     $result = db_query("SELECT * FROM {blocks} WHERE bid = %d", $oHotblocks_Item->nid);
     $block = db_fetch_object($result);
@@ -840,7 +840,7 @@ function hotblocks_item_view($oHotblocks_Item, $iDelta = 0, $sContext = 'normal'
     }
     $aBlockInfo = module_invoke($block->module, 'block', 'list', $block->delta);
     $oHotblocks_Item->title = $aBlockInfo[$block->delta]['info'];
-    
+
     if (isset($block->content) && $block->content) {
       // Override default block title if a custom display title is present.
       if ($block->title) {
@@ -851,23 +851,23 @@ function hotblocks_item_view($oHotblocks_Item, $iDelta = 0, $sContext = 'normal'
         $block->subject = '';
       }
     }
-    
+
     $sRenderedView = theme('block', $block);
   }
   else {
     //default to node view
     $oNode = node_load($oHotblocks_Item->nid);
-    
+
     //we will respect node access unless the option is turned off, in which case a user needs standard node access or 'administer hotblocks' to see the node
     if(!hotblocks_access('view node',$oNode,$iDelta)) {
       return false;
     }
-    
+
     $oHotblocks_Item->title = $oNode->title;
     $oNode->build_mode = 'hotblocks';
-    $sRenderedView = node_view($oNode);  
+    $sRenderedView = node_view($oNode);
   }
-  
+
   $sControls = hotblocks_hotblocks_item_controls($oHotblocks_Item);
   $sFormat= '
     <div id="hotblocks_item-%d-%d" class="%s">
@@ -880,7 +880,7 @@ function hotblocks_item_view($oHotblocks_Item, $iDelta = 0, $sContext = 'normal'
 }
 
 /**
- * Ajax menu callback.  
+ * Ajax menu callback.
  * Creates an instance of the given node as a hotblocks_item for the designated block.
  * Prints the block output when done.
  *
@@ -893,10 +893,10 @@ function hotblocks_assign_to_block($iNid = null, $iDelta = null) {
     print 'Error';
     exit;
   }
-  
-  //@todo - Maybe we should create a blank entry here so that even if all the hotblocks of this node are removed, 
+
+  //@todo - Maybe we should create a blank entry here so that even if all the hotblocks of this node are removed,
   //it still shows up in the list of allowable nodes to assign as a hotblocks_item.
-  
+
   //create the new hotblocks_item record
   $oHotblocks_ItemObject->nid = $iNid;
   $oHotblocks_ItemObject->delta = $iDelta;
@@ -904,7 +904,7 @@ function hotblocks_assign_to_block($iNid = null, $iDelta = null) {
   $oHotblocks_ItemObject->global = $_GET['global'] ? 1 : 0;
   $oHotblocks_ItemObject->systemtype = $_GET['systemtype'];
   drupal_write_record('hotblocks', $oHotblocks_ItemObject);
-  
+
   //show the hotblocks block
   print hotblocks_view_block($iDelta);
   exit;
@@ -919,9 +919,9 @@ function hotblocks_assign_to_block($iNid = null, $iDelta = null) {
 function hotblocks_remove_from_block($iHotblocks_Itemid, $iDelta) {
   if(!isset($_GET['token']) || $_GET['token'] != drupal_valid_token($_GET['token'],"hotblocks-$iDelta-$iHotblocks_Itemid")) { drupal_access_denied(); exit();}
   hotblocks_item_remove($iHotblocks_Itemid);
-  if($_REQUEST['destination'] && !$_REQUEST['js']) { 
+  if($_REQUEST['destination'] && !$_REQUEST['js']) {
     drupal_set_message(hotblocks_terminology(false,true).' removed');
-    drupal_goto(); 
+    drupal_goto();
   }
   print hotblocks_view_block($iDelta);
   exit;
@@ -930,7 +930,7 @@ function hotblocks_remove_from_block($iHotblocks_Itemid, $iDelta) {
 
 /**
  * @return
- * Returns an array of all valid hotblocks_item records from the hotblocks or node table (depending on configuration) with 
+ * Returns an array of all valid hotblocks_item records from the hotblocks or node table (depending on configuration) with
  * their respective titles.
  * Each array item is an object with members nid and title
  * In the case of blocks, nid actually = bid...a legacy thing that should change one day
@@ -963,7 +963,7 @@ function hotblocks_list() {
     $oRow->friendlytype = $aInfo['name'];
     $aRows[] = $oRow;
   }
-  
+
   //add in blocks if they are enabled as valid hotblocks_item types
   if(variable_get('hotblocks_allow_blocks', true)) {
     $blocks = _block_rehash();
@@ -981,8 +981,8 @@ function hotblocks_list() {
       }
     }
   }
-  
-  
+
+
   function hotblocks_list_sort($a, $b) {
     return strcmp($a->title, $b->title);
   }
@@ -992,7 +992,7 @@ function hotblocks_list() {
 }
 
 /**
- * An added submit handler to the node add/edit form.  We inject some values into the form's node object here to 
+ * An added submit handler to the node add/edit form.  We inject some values into the form's node object here to
  * be processed by hotblocks_nodeapi where items like node id will be already populated in the event of new nodes.
  *
  * @param $aForm
@@ -1021,15 +1021,15 @@ function hotblocks_get_perm($sOp, $sType = null, $iDelta) {
     case 'assign items to any hotblock' :
       return sprintf('assign items of type %s to %s', $sType, hotblocks_get_blockname($iDelta));
     break;
-    
+
     case 'remove items from any hotblock' :
       return sprintf('remove items of type %s from %s', $sType, hotblocks_get_blockname($iDelta));
     break;
-    
+
     case 'reorder items in any hotblock' :
       return sprintf('reorder items in %s', hotblocks_get_blockname($iDelta));
     break;
-      
+
   }
 }
 
@@ -1044,13 +1044,13 @@ function hotblocks_get_perm($sOp, $sType = null, $iDelta) {
  * reorder hotblocks
  * administer hotblocks
  * view node
- * 
- * @param $sType 
+ *
+ * @param $sType
  * Node type or node id which will be queried for type, or in the case of 'view node' can be a node object or nid
- * 
- * @param $iDelta 
+ *
+ * @param $iDelta
  * Hotblocks_Item block delta
- * 
+ *
  * @return boolean
  */
 function hotblocks_access($sOp, $sType = null, $iDelta = null) {
@@ -1058,34 +1058,34 @@ function hotblocks_access($sOp, $sType = null, $iDelta = null) {
   if(user_access('administer hotblocks')) {
     return true;
   }
-  
+
   if($sOp == 'view node') {
     if($sType == 'all') {
       //We're saying you cant view all nodes without a node access check first (if respect node access is on)
       return !variable_get('hotblocks_respect_node_access', true);
     }
-    
+
     if(is_numeric($sType)) {
       $oNode = node_load($sType);
     }
     else {
       $oNode = $sType;
     }
-    
+
     //we will respect node access unless the option is turned off, in which case a user only need some permission to administer the hotblock to see the node
     return node_access('view',$oNode) || ( !variable_get('hotblocks_respect_node_access', true) && hotblocks_block_controls($iDelta) );
   }
-  
+
   //if extended permissions is not on, we can just return the user_access equivilent of the op
   if(!variable_get('hotblocks_extended_permissions', false)) {
     return user_access($sOp);
   }
-  
+
   //The generic permission supercedes granular permissions, so if we have it return true (except with 'create items in any hotblock', see below)
   if($sOp != 'create items in any hotblock' && user_access($sOp)) {
     return true;
   }
-  
+
   if(is_numeric($sType)) {
     $sType = db_result(db_query("SELECT type FROM {node} WHERE nid = %d",$sType));
   }
@@ -1109,11 +1109,11 @@ function hotblocks_access($sOp, $sType = null, $iDelta = null) {
     case 'reorder items in any hotblock' :
       return user_access(hotblocks_get_perm($sOp,$sType,$iDelta));
     break;
-    
+
     case 'administer hotblocks' :
       return user_access($sOp);
     break;
-    
+
     case 'create items in any hotblock' :
       //If a block is asking, verify that we can also assign the hotblocks_item there as well, otherwise the permission is meaningless (to a block)
       if($iDelta) {
@@ -1135,7 +1135,7 @@ function hotblocks_access($sOp, $sType = null, $iDelta = null) {
 
 function hotblocks_settings($form_state, $sJsField = null) {
   $aForm = array();
-  
+
   $iNumBlocks = variable_get('hotblocks_blockcount', 3);
   $aForm['hotblocks_blockcount'] = array (
     '#type' => 'textfield',
@@ -1158,13 +1158,13 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#attributes' => array('id' =>'hotblocks_blockcount_fieldset'),
   );
   $aForm['hotblocks_blockcount_fieldset'] += (array)hotblocks_blockcount_names($iNumBlocks);
-  
+
   $aContentTypes = content_types();
   foreach ($aContentTypes as $sTypeName => $aType) {
     $aOptions[$sTypeName] = $sTypeName;
   }
   $aOptions['hotblocks_any'] = 'Any/all types';
-  
+
   $aForm['hotblocks_filtering'] = array (
 		'#type' => 'fieldset',
 		'#title' => t('Filtering content available for hotblocks'),
@@ -1178,7 +1178,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#options' => $aOptions,
     '#default_value' => variable_get('hotblocks_allowed_types',array('hotblocks_any')),
   );
-  
+
   $aForm['hotblocks_filtering']['hotblocks_show_all_nodes_of_hotblocks_item_type'] = array (
     '#type' => 'checkbox',
     '#weight' => 32,
@@ -1186,14 +1186,14 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => 'Uncheck this if you would like to specify which nodes are availble to hotblocks on a node-by-node basis.  Allowed content types filtering will still apply.',
     '#default_value' => variable_get('hotblocks_show_all_nodes_of_hotblocks_item_type', true),
   );
-  
+
   $aForm['hotblocks_filtering']['hotblocks_allow_blocks'] = array (
     '#type' => 'checkbox',
     '#weight' => 33,
     '#title' => 'Allow other Drupal blocks to be inserted into hotblocks.',
     '#default_value' => variable_get('hotblocks_allow_blocks', true),
   );
-  
+
   $aBlockOptions = module_list();
   $aForm['hotblocks_filtering']['hotblocks_blocks_excluded_modules'] = array (
     '#type' => 'select',
@@ -1204,7 +1204,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#options' => $aBlockOptions,
     '#default_value' => variable_get('hotblocks_blocks_excluded_modules',array()),
   );
-  
+
   $aForm['hotblocks_filtering']['hotblocks_respect_node_access'] = array (
     '#title' => 'Respect node access',
     '#type' => 'checkbox',
@@ -1212,8 +1212,8 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => 'If this is unchecked, hotblocks permissions will allow users to add or remove nodes from hotblocks for which they wouldn\'t normally have view access to.  A user with "administer hotblocks" will still be able to view all hotblock content regardless of this setting, so delegate that permission with care.',
     '#default_value' => variable_get('hotblocks_respect_node_access', true),
   );
-  
-  
+
+
   $aForm['hotblocks_reorder_titles'] = array (
     '#type' => 'checkbox',
     '#weight' => 31,
@@ -1221,8 +1221,8 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => 'If this setting is checked, only the item titles will be displayed when reordering items inside a hotblock.  This is helpful when you have a large area of content and it becomes cumbersome to reorder such large pieces.  If you would like the same full, visual display of the hotblock items while reordering, turn this off.',
     '#default_value' => variable_get('hotblocks_reorder_titles',true),
   );
-  
-  
+
+
   $aForm['hotblocks_extended_permissions'] = array (
     '#type' => 'checkbox',
     '#weight' => 33,
@@ -1230,7 +1230,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => 'If this setting is checked, the hotblocks module will provide granular permissions for each hotblock and all allowed hotblocks item types. E.g., "assign hotblocks of typex to blockx". Having a permission of "assign hotblocks" will negate the need for the more specific permission, and "administer hotblocks" eliminates the need for any other permissions.',
     '#default_value' => variable_get('hotblocks_extended_permissions', false),
   );
-  
+
   $aForm['hotblocks_use_icons'] = array (
     '#type' => 'checkbox',
     '#weight' => 35,
@@ -1238,7 +1238,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => 'Check this box if you want hotblocks to use icons instead of text links for its administrative controls.',
     '#default_value' => variable_get('hotblocks_use_icons', true),
   );
-  
+
   $files = file_scan_directory(drupal_get_path('module','hotblocks').'/images','.*',array('.', '..', 'CVS'), $callback = 0, $recurse = false);
   foreach ($files as $oVal) {
     $options[$oVal->basename] = $oVal->basename;
@@ -1251,7 +1251,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#default_value' => variable_get('hotblocks_icons_set', '48x48'),
     '#options' => $options,
   );
-  
+
   $aForm['hotblocks_floating_controls'] = array (
     '#type' => 'checkbox',
     '#weight' => 40,
@@ -1259,12 +1259,12 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => 'Check this box if you want hotblocks administrative controls to float over it\'s items when you mouse over them.  If unchecked, hotblocks controls will be visible all the time.',
     '#default_value' => variable_get('hotblocks_floating_controls', true),
   );
-  
+
   $aForm['hotblocks_terminology_fieldset'] = array (
 		'#type' => 'fieldset',
 		'#title' => t('Hotblocks Terminology'),
 	);
-  
+
   $aForm['hotblocks_terminology_fieldset']['hotblocks_terminology'] = array(
     '#type' => 'textfield',
     '#title' => t('Term for hotblocks item'),
@@ -1277,53 +1277,53 @@ function hotblocks_settings($form_state, $sJsField = null) {
     '#description' => t('This should be the plural version of the term above, as in the case of "reorder hotblock items", etc.'),
     '#default_value' => variable_get('hotblocks_terminology_plural', HOTBLOCKS_DEFAULT_TERMINOLOGY_PLURAL),
   );
-  
+
 	$aForm['hotblocks_title_hiding'] = array (
 		'#type' => 'fieldset',
 		'#title' => t('Node Title Hiding'),
     '#weight' => 45,
 	);
-  
+
 	$aForm['hotblocks_title_hiding']['hotblocks_title_hiding_helptext'] = array (
 		'#type' => 'markup',
 		'#value' => '<P>' . t('If you want to hide some or all of the titles of nodes within your hotblocks from being displayed to users, check one of the 2 checkboxes below.') . '</P>',
 	);
-  
+
   $aForm['hotblocks_title_hiding']['hotblocks_title_hiding_hide_all'] = array(
   	'#type' => 'checkbox',
   	'#title' => t('Hide all hotblocks node titles'),
   	'#default_value' => variable_get('hotblocks_title_hiding_hide_all', false),
   	'#description' => t('If this box is checked, all node titles of hotblocks will be hidden when the item is displayed in the hotblock.'),
   );
-	
+
   $aForm['hotblocks_title_hiding']['hotblocks_title_hiding_enable'] = array (
     '#type' => 'checkbox',
     '#title' => t('Hide hotblocks_item titles within delimiters'),
     '#description' => t('Check this box if you want hotblocks node titles inside the delimiters to be hidden when the item displays: e.g. if your delimiters are parentheses, then (My Title) will be hidden.  This can be useful to see adminstrator notes in the hotblocks picking screen that are hidden from the user.  For example "(the ad we just made last night) Super Product X".  You could also use this feature to hide some titles but not others.  E.g. "This title can be seen", "(This cannot because the node just contains an image)".'),
     '#default_value' => variable_get('hotblocks_title_hiding_enable', true),
   );
-	
+
 	$aForm['hotblocks_title_hiding']['hotblocks_title_hiding_delim_start'] = array(
     '#type' => 'textfield',
     '#title' => t('Starting delimiter'),
     '#size' => 4,
     '#default_value' => variable_get('hotblocks_title_hiding_delim_start', HOTBLOCKS_TITLE_HIDING_START),
   );
-  
+
   $aForm['hotblocks_title_hiding']['hotblocks_title_hiding_delim_end'] = array(
     '#type' => 'textfield',
     '#title' => t('Ending delimiter'),
     '#size' => 4,
     '#default_value' => variable_get('hotblocks_title_hiding_delim_end', HOTBLOCKS_TITLE_HIDING_END),
   );
-  
+
   if(module_exists('taxonomy')) {
     $vocabularies = taxonomy_get_vocabularies();
     $voptions[0] = '--None--';
     foreach ((array)$vocabularies as $oVocab) {
       $voptions[$oVocab->vid] = $oVocab->name;
     }
-    
+
     $aForm['hotblocks_vocabulary'] = array(
       '#type' => 'select',
       '#title' => 'Hotblocks Vocabulary',
@@ -1332,7 +1332,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
       '#default_value' => variable_get('hotblocks_vocabulary', 0),
     );
   }
-  
+
   $aForm['submit'] = array('#type' => 'submit', '#value' => t('Save configuration'),'#weight' => 50, );
   $aForm['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') ,'#weight' => 55,);
   $aForm['#theme'] = 'system_settings_form';
@@ -1345,7 +1345,7 @@ function hotblocks_settings($form_state, $sJsField = null) {
 function hotblocks_settings_submit($form, &$form_state) {
   //The menu titles will change when the terminology option is changed, so menu needs to be rebuilt.
   menu_rebuild();
-  
+
   system_settings_form_submit($form, $form_state);
 }
 
@@ -1380,7 +1380,7 @@ function hotblocks_blockcount_names_js() {
   else {
     $sOutput = 'You must have at least 1 hotblocks block.';
   }
-  print drupal_to_js(array('status' => TRUE, 'data' => $sOutput)); 
+  print drupal_to_js(array('status' => TRUE, 'data' => $sOutput));
   exit;
 }
 
@@ -1397,7 +1397,7 @@ function hotblocks_blockcount_names($iNumBlocks, $js = false) {
       '#description' => 'The name of this block as seen in the administer blocks page.',
       '#default_value' => hotblocks_get_blockname($i),
     );
-    
+
     if($js) {
       $aForm['hotblocks_block_name_'.$i]['#name'] = 'hotblocks_block_name_'.$i;
       $aForm['hotblocks_block_name_'.$i]['#value'] = $aForm['hotblocks_block_name_'.$i]['#default_value'];
@@ -1426,7 +1426,7 @@ function hotblocks_get_blocknames_array() {
  * 1. Unweighted globals (not ordered or ordered as the DB prefers)
  * 2. All weighted hotblocks (global or not) for the block and path unless we are on node/add in which case only globals.
  * 3. Unweighted non-globals for the block and path
- * 
+ *
  * The $bReturn parameter makes it easy for another function to get an array of hotblocks ordered in the same way that they are viewed by users.
  * @todo Make the order in which non-weighted global, non-weighted non-global, and weighted items are grouped be configurable (low priority..)
  *
@@ -1443,25 +1443,25 @@ function hotblocks_view_block($iDelta, $bReturn = false) {
     //path will be set if this is an ajax request, otherwise use the standard q
     $sPath = $_GET['path'] ? $_GET['path'] : $_GET['q'];
     $aHotblocks = array();
-    
+
      //Not yet weighted globals for this block
     $result = db_query("SELECT * FROM {hotblocks} WHERE delta = '%d' AND global = 1 AND ( (weight IS NULL) OR (weight IS NOT NULL AND path != '%s') )", $iDelta, $sPath);
     while($oRow = db_fetch_object($result)) {
-      if(!in_array($oRow->nid,$aHotblocks)) {  
+      if(!in_array($oRow->nid,$aHotblocks)) {
         //if the hotblocks_item was selected based on NOT NULL weight and path != $sPath, we dont want to put it at the top if a weighted instance exists for this page
         if($oRow->path != $sPath) {
           if(db_result(db_query("SELECT * FROM {hotblocks} WHERE global = 1 AND nid = %d AND path = '%s' AND delta = %d AND weight IS NOT NULL",$oRow->nid,$sPath,$iDelta))) {
             continue;
           }
-        } 
+        }
         $aHotblocks[] = $oRow;
         $bFoundHotblocks = true;
       }
     }
-    
+
     $bNodeAddPage = (arg(0) == 'node' && arg(1) == 'add');
-    
-    //All weighted hotblocks (global or not) for this block and path unless 
+
+    //All weighted hotblocks (global or not) for this block and path unless
     // we are on node/add in which case only globals.
     if ($bNodeAddPage) {
     	$result = db_query("SELECT * FROM {hotblocks} WHERE delta = '%d' AND path = '%s' AND weight IS NOT NULL AND global = 1 ORDER BY weight", $iDelta, $sPath);
@@ -1475,7 +1475,7 @@ function hotblocks_view_block($iDelta, $bReturn = false) {
         $bFoundHotblocks = true;
       }
     }
-    
+
     if (!$bNodeAddPage) {
       //Not yet weighted non-globals for this block and path
       $result = db_query("SELECT * FROM {hotblocks} WHERE delta = '%d' AND path = '%s' AND global = 0 AND weight IS NULL", $iDelta, $sPath);
@@ -1486,7 +1486,7 @@ function hotblocks_view_block($iDelta, $bReturn = false) {
         }
       }
     }
-    
+
     if($bReturn) { return $aHotblocks; }
 
     $sHotblocks = '';
@@ -1504,7 +1504,7 @@ function hotblocks_view_block($iDelta, $bReturn = false) {
         $sHotblocks.
         $sControls.
       '</div>';
-    return $sOutput;  
+    return $sOutput;
   }
 }
 
@@ -1519,24 +1519,24 @@ function hotblocks_view_block($iDelta, $bReturn = false) {
 function hotblocks_hotblocks_item_controls($oHotblocks_Item) {
   $iNid = $oHotblocks_Item->nid;
   $iDelta = $oHotblocks_Item->delta;
-  
+
   //We aren't going to show any item controls unless the user has access to at least one activity for the hotblock
   //This item block control function will return no text if there is no actions available for the block
   if(!hotblocks_block_controls($iDelta)) {
     return;
   }
-  
+
   if(hotblocks_access('remove items from any hotblock',$iNid,$iDelta)) {
     $aLinks[] = hotblocks_remove_link($oHotblocks_Item);
   }
-  
+
   if($oHotblocks_Item->systemtype == 'node') {
     $oNode = node_load($iNid);
     if(node_access('update',$oNode)) {
       $aLinks[] = hotblocks_edit_link($oHotblocks_Item);
     }
   }
-  
+
   if(sizeof($aLinks) > 0) {
     return '<span class="hotblocks_item-controls hotblocks-edit hotblocks_item-'.$iNid.'-'.$iDelta.'">'.implode('',$aLinks).'</span>';
   }
@@ -1574,16 +1574,16 @@ function hotblocks_edit_link($oHotblocks_Item) {
  * Won't return anything if the user does not have acess to any of the hotblock's admin activities
  */
 function hotblocks_block_controls($iDelta, $showAssignExplicit = false) {
-  if(hotblocks_access('assign items to any hotblock',null,$iDelta)) { 
+  if(hotblocks_access('assign items to any hotblock',null,$iDelta)) {
     $sOutput .= hotblocks_assign_link($iDelta,$showAssignExplicit);
   }
-  if(hotblocks_access('create items in any hotblock',null,$iDelta)) { 
+  if(hotblocks_access('create items in any hotblock',null,$iDelta)) {
     $sOutput .= hotblocks_create_link($iDelta,$showAssignExplicit);
   }
   if(hotblocks_access('reorder items in any hotblock',null,$iDelta)) {
-    $sOutput .= hotblocks_reorder_link($iDelta);  
+    $sOutput .= hotblocks_reorder_link($iDelta);
   }
-  
+
 	return $sOutput;
 }
 
@@ -1594,10 +1594,10 @@ function hotblocks_assign_to_block_link($iDelta, $oHotblocks_Item) {
   if(!$oHotblocks_Item->systemtype) {
     $oHotblocks_Item->systemtype = 'node';
   }
-  
+
   $text = $oHotblocks_Item->title;
   $nid = $oHotblocks_Item->nid;
-  
+
   $aOptions = array(
     'attributes' => array(
       'class' => 'hotblocks-assign',
@@ -1663,21 +1663,21 @@ function hotblocks_overview_by_path() {
   while($oPage = db_fetch_object($pageresult)) {
   	$result = db_query("SELECT n.title, n.type, p.* FROM {hotblocks} p LEFT JOIN {node} n ON n.nid = p.nid WHERE ((p.path = '%s' AND global = 0) OR (p.global = 1))  ORDER BY p.delta, p.weight, n.title", $oPage->path);
   	while($oRow = db_fetch_object($result)) {
-  	  
+
   	  if($oRow->systemtype == 'block') {
-  	    $block = db_fetch_object(db_query("SELECT * FROM {blocks} WHERE bid = %d",$oRow->nid));  
+  	    $block = db_fetch_object(db_query("SELECT * FROM {blocks} WHERE bid = %d",$oRow->nid));
   	    $oRow->title = hotblocks_get_block_title_by_bid($block);
   	    $oRow->type = 'Block';
-  	    
+
   	    $actions = array(
           l('Configure block', "admin/build/block/configure/$block->module/$block->delta", array('query' => drupal_get_destination())),
           l('Remove', "hotblocks/remove/$oRow->hotblocks_itemid/$oRow->delta&path=$oRow->path", array('query' => drupal_get_destination())),
     	  );
   	  }
-  	  
+
   	  if($oRow->systemtype == 'node') {
   	    $oRow->type = node_get_types('name',$oRow->type);
-  	    
+
     	  $actions = array(
           l('View', "node/$oRow->nid"),
           l('Edit', "node/$oRow->nid/edit", array('query' => drupal_get_destination())),
@@ -1685,33 +1685,33 @@ function hotblocks_overview_by_path() {
           l('Delete', "node/$oRow->nid/delete", array('query' => drupal_get_destination())),
     	  );
   	  }
-  	  
-  	  if($oRow->global == 1) { 
+
+  	  if($oRow->global == 1) {
   	    $page = '(Global)';
   	  }
   	  else {
   	    $page = 'No';//l(drupal_get_path_alias($oRow->path),$oRow->path);
   	  }
-  	  
+
   	  $aTableRows[] = array(
-  	   $oRow->systemtype == 'node' ? l($oRow->title, "node/$oRow->nid") : $oRow->title, 
+  	   $oRow->systemtype == 'node' ? l($oRow->title, "node/$oRow->nid") : $oRow->title,
   	   $oRow->type,
   	   $page,
-  	   $blockNames[$oRow->delta], 
-  	   $oRow->weight ? $oRow->weight : '(none)', 
+  	   $blockNames[$oRow->delta],
+  	   $oRow->weight ? $oRow->weight : '(none)',
   	   implode(' | ', $actions),
   	 );
-  	 
+
   	}
   	$aHeader = array('Name', 'Content Type', 'Global', 'Block', 'Weight', 'Action');
-  	if(sizeof($aTableRows) < 1) { 
-  	  $aTableRows = array(array('None')); 
+  	if(sizeof($aTableRows) < 1) {
+  	  $aTableRows = array(array('None'));
   	  $aHeader = array();
   	}
   	$output .=  '<div class="admin-panel">' . theme('table',$aHeader,$aTableRows,array(),"<h3>Page: ".l(drupal_get_path_alias($oPage->path), $oPage->path)."</h3>") . '</div>';
   	unset($aTableRows);
   }
-  
+
   return $output;
 }
 
@@ -1721,7 +1721,7 @@ function hotblocks_overview_by_path() {
  * 2. All weighted hotblocks (global or not) for the block and path unless we are on node/add in which case only globals.
  * 3. Unweighted non-globals for the block and path
  * However, the overview functions currently sort by weight & path (this function) block, weight, & title
- * 
+ *
  *
  * @return unknown
  */
@@ -1736,7 +1736,7 @@ function hotblocks_overview_by_block() {
     $result = db_query("SELECT n.title, n.type, p.* FROM {hotblocks} p, {node} n WHERE p.delta = 0 AND p.path IS NULL AND n.nid = p.nid ORDER BY n.title ASC");
     //$result = db_query("SELECT DISTINCT hotblocks.nid, node.type, node.title FROM hotblocks, node WHERE hotblocks.nid = node.nid  ORDER BY node.title ASC");
   }
-  
+
   while($oRow = db_fetch_object($result)) {
     if(!db_result(db_query("SELECT nid FROM {hotblocks} p WHERE p.delta > 0 AND p.path IS NOT NULL AND nid = %d", $oRow->nid))) {
       $actions = array(
@@ -1744,43 +1744,43 @@ function hotblocks_overview_by_block() {
         l('Edit', "node/$oRow->nid/edit", array('query' => drupal_get_destination())),
         l('Delete', "node/$oRow->nid/delete", array('query' => drupal_get_destination())),
       );
-      
+
       $aTableRows[] = array(
         l($oRow->title, 'node/'.$oRow->nid),
         node_get_types('name',$oRow->type),
         implode(' | ', $actions),
-      );  
+      );
     }
   }
   $aHeader = array('Name', 'Content Type', 'Action');
   if(sizeof($aTableRows) < 1) {
-    $aTableRows = array(array('None')); 
+    $aTableRows = array(array('None'));
     $aHeader = array();
   }
   $output .= '<div class="admin-panel">'.theme('table', $aHeader, $aTableRows, array(), '<h3>Available but unassigned '.hotblocks_terminology(true,true). '</h3>') . '</div>';
   unset($aTableRows);
-  
-  
+
+
   /////////////////////Hotblocks listed by block///////////////////
   $blockNames = hotblocks_get_blocknames_array();
   foreach ($blockNames as $i => $name) {
   	$result = db_query("SELECT n.title, n.type, p.* FROM {hotblocks} p LEFT JOIN {node} n ON n.nid = p.nid  WHERE p.delta = %d ORDER BY p.weight, p.path", $i);
   	while($oRow = db_fetch_object($result)) {
-  	  
+
   	  if($oRow->systemtype == 'block') {
-  	    $block = db_fetch_object(db_query("SELECT * FROM {blocks} WHERE bid = %d",$oRow->nid));  
+  	    $block = db_fetch_object(db_query("SELECT * FROM {blocks} WHERE bid = %d",$oRow->nid));
   	    $oRow->title = hotblocks_get_block_title_by_bid($block);
   	    $oRow->type = 'Block';
-  	    
+
   	    $actions = array(
           l('Configure block', "admin/build/block/configure/$block->module/$block->delta", array('query' => drupal_get_destination())),
           l('Remove', "hotblocks/remove/$oRow->hotblocks_itemid/$oRow->delta&path=$oRow->path", array('query' => drupal_get_destination())),
     	  );
   	  }
-  	  
+
   	  if($oRow->systemtype == 'node') {
   	    $oRow->type = node_get_types('name',$oRow->type);
-  	    
+
     	  $actions = array(
           l('View', "node/$oRow->nid"),
           l('Edit', "node/$oRow->nid/edit", array('query' => drupal_get_destination())),
@@ -1788,32 +1788,32 @@ function hotblocks_overview_by_block() {
           l('Delete', "node/$oRow->nid/delete", array('query' => drupal_get_destination())),
     	  );
   	  }
-  	  
-  	  if($oRow->global == 1) { 
+
+  	  if($oRow->global == 1) {
   	    $page = '(Global)';
   	  }
   	  else {
   	    $page = l(drupal_get_path_alias($oRow->path),$oRow->path);
   	  }
-  	  
+
   	  $aTableRows[] = array(
-  	   $oRow->systemtype == 'node' ? l($oRow->title, "node/$oRow->nid") : $oRow->title, 
+  	   $oRow->systemtype == 'node' ? l($oRow->title, "node/$oRow->nid") : $oRow->title,
   	   $oRow->type,
-  	   $page, 
-  	   $oRow->weight ? $oRow->weight : '(none)', 
+  	   $page,
+  	   $oRow->weight ? $oRow->weight : '(none)',
   	   implode(' | ', $actions),
   	 );
-  	 
+
   	}
   	$aHeader = array('Name', 'Content Type', 'Page', 'Weight', 'Action');
-  	if(sizeof($aTableRows) < 1) { 
-  	  $aTableRows = array(array('None')); 
+  	if(sizeof($aTableRows) < 1) {
+  	  $aTableRows = array(array('None'));
   	  $aHeader = array();
   	}
   	$output .=  '<div class="admin-panel">' . theme('table',$aHeader,$aTableRows,array(),"<h3>Block: $name</h3>") . '</div>';
   	unset($aTableRows);
   }
-  
+
   return $output;
 }
 
@@ -1825,7 +1825,7 @@ function hotblocks_even_odd() {
   static $i = 'hotblocks-odd';
   if ($i == 'hotblocks-odd') { $i = 'hotblocks-even'; }
   else { $i = 'hotblocks-odd'; }
-  
+
   return $i;
 }
 
@@ -1874,7 +1874,7 @@ function hotblocks_taxonomy_build($aTree, $iDelta = 0, $depth = -1) {
       $toggleable = 'toggleable';
       $toggleRow = 'toggleRow';
     }
-    
+
     //////List items in the term
     $result = taxonomy_select_nodes(array($oTerm->tid));
     $kids = null;
@@ -1882,7 +1882,7 @@ function hotblocks_taxonomy_build($aTree, $iDelta = 0, $depth = -1) {
       if(!hotblocks_access('assign items to any hotblock',db_result(db_query("SELECT type FROM {node} WHERE nid = %d",$oRow->nid)),$iDelta) || !hotblocks_access('view node',$oRow->nid)) {
     	  continue;
     	}
-      $sImage = theme('image',hotblocks_icon_path('16x16') .'/page-icon.png','Folder full','Folder full', array('align' => 'absmiddle'));  
+      $sImage = theme('image',hotblocks_icon_path('16x16') .'/page-icon.png','Folder full','Folder full', array('align' => 'absmiddle'));
       if($iDelta > 0) {
         //If we have a delta, we'll provide links that will assign the hotblocks_item to that block
         $nlink = hotblocks_assign_to_block_link($iDelta, $oRow);
@@ -1893,23 +1893,23 @@ function hotblocks_taxonomy_build($aTree, $iDelta = 0, $depth = -1) {
       }
       $kids .= '<div class="prow depth-'. ($oTerm->depth + 1) . ' '.hotblocks_even_odd().'">' . $sImage . $nlink . '</div>';
     }
-    
+
     //////Make term markup with an icon indicating whether or not it is empty
     if($count > 0) {
-      $sImage = theme('image',hotblocks_icon_path('16x16') .'/folder-full.png','Folder full','Folder full', array('align' => 'absmiddle'));  
+      $sImage = theme('image',hotblocks_icon_path('16x16') .'/folder-full.png','Folder full','Folder full', array('align' => 'absmiddle'));
     }
     else {
-      $sImage = theme('image',hotblocks_icon_path('16x16') .'/folder.png','Folder empty','Folder empty', array('align' => 'absmiddle'));  
+      $sImage = theme('image',hotblocks_icon_path('16x16') .'/folder.png','Folder empty','Folder empty', array('align' => 'absmiddle'));
     }
-    $output .= 
-      '<div rel="'.$oTerm->depth.'" class="prow '.$toggleable.' depth-'.$oTerm->depth.' vid-'.$oTerm->vid.' first-letter-'.$first.'">' . 
+    $output .=
+      '<div rel="'.$oTerm->depth.'" class="prow '.$toggleable.' depth-'.$oTerm->depth.' vid-'.$oTerm->vid.' first-letter-'.$first.'">' .
          '<div class="' . $toggleRow .'">' .
-           $sToggler . 
-           $sImage . 
+           $sToggler .
+           $sImage .
            $link .
          '</div>' .
         hotblocks_taxonomy_build(taxonomy_get_tree($oTerm->vid, $oTerm->tid, -1, 1), $iDelta, $depth) .
-        $kids . 
+        $kids .
       '</div>';
   }
   return $output;
@@ -1940,22 +1940,22 @@ function hotblocks_toggler($class="toggle", $sExtraText = null, $bExpanded = fal
 
 function hotblocks_terminology($bPlural = false, $bCapitalize = false) {
   if($bPlural) {
-    $terminology = variable_get('hotblocks_terminology_plural', HOTBLOCKS_DEFAULT_TERMINOLOGY_PLURAL); 
+    $terminology = variable_get('hotblocks_terminology_plural', HOTBLOCKS_DEFAULT_TERMINOLOGY_PLURAL);
   }
   else {
-    $terminology = variable_get('hotblocks_terminology', HOTBLOCKS_DEFAULT_TERMINOLOGY);   
+    $terminology = variable_get('hotblocks_terminology', HOTBLOCKS_DEFAULT_TERMINOLOGY);
   }
-  
+
   if ($bCapitalize) {
     $terminology = ucfirst($terminology);
   }
-  
+
   return check_plain($terminology);
 }
 
 function hotblocks_get_block_title_by_bid($block) {
   if(is_numeric($bid)) {
-    $block = db_fetch_object(db_query("SELECT * FROM {blocks} WHERE bid = %d",$bid));  
+    $block = db_fetch_object(db_query("SELECT * FROM {blocks} WHERE bid = %d",$bid));
   }
   $aBlockInfo = module_invoke($block->module, 'block', 'list', $block->delta);
   return $aBlockInfo[$block->delta]['info'];
@@ -1967,14 +1967,14 @@ function hotblocks_get_block_title_by_bid($block) {
 function hotblocks_content_build_modes() {
   return array(
     'hotblocks' => array(
-      'title' => t('Hotblocks'), 
+      'title' => t('Hotblocks'),
       'build modes' => array(
         'hotblocks' => array(
-          'title' => t('Full node'), 
+          'title' => t('Full node'),
           'views style' => TRUE,
         ),
       ),
-    ), 
+    ),
   );
 }
 
