? example.patch
Index: scrollable/scrollable.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/scrollable/scrollable.info,v
retrieving revision 1.1
diff -u -p -r1.1 scrollable.info
--- scrollable/scrollable.info	28 May 2009 22:11:50 -0000	1.1
+++ scrollable/scrollable.info	12 Jun 2009 20:36:42 -0000
@@ -3,4 +3,6 @@ name = Scrollable
 description = Provide Views Style plugin for jScrollable.
 core = 6.x
 package = Views
-dependencies[] = views
\ No newline at end of file
+dependencies[] = views
+dependencies[] = jquerytools
+
Index: scrollable/scrollable.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/scrollable/scrollable.module,v
retrieving revision 1.3
diff -u -p -r1.3 scrollable.module
--- scrollable/scrollable.module	31 May 2009 15:53:05 -0000	1.3
+++ scrollable/scrollable.module	12 Jun 2009 20:36:42 -0000
@@ -32,40 +32,29 @@ function scrollable_theme() {
  * Themes the Scrollable View.
  */
 function theme_scrollable_view($view, $options = array(), $rows = array()) {
-  //print_r($view);
-  //print_r($options);
-  //print_r($rows);
-  
-  $path = drupal_get_path('module', 'scrollable');
-  drupal_add_js($path .'/js/jquery.scrollable.min.js');
-  
-  drupal_add_css($path .'/css/scrollable_'. (($options['vertical']) ? 'vertical' : 'horizontal') .'.css');
-  
-  if ( $options['mousewheel'] ) {
-    drupal_add_js($path .'/js/jquery.mousewheel.min.js');
+  // Add the Mouse Wheel plugin.
+  if ($options['mousewheel'] && module_exists('mousewheel')) {
+    mousewheel_add();
   }
-  
-  $js = '$(document).ready(function() {         
-           // initialize scrollable  
-           $("div.scrollable").scrollable({
-             size: '. $options['size'] .',
-             vertical: '. $options['vertical'] .',
-             clickable: '. $options['clickable'] .',
-             loop: '. $options['loop'] .',
-             interval: '. $options['interval'] .',
-             speed: '. $options['speed'] .',
-             keyboard: '. $options['keyboard'] .',
-             items: ".'. $options['items'] .'",
-             prev: ".'. $options['prev'] .'",
-             next: ".'. $options['next'] .'",
-             prevPage: ".'. $options['prevPage'] .'",
-             nextPage: ".'. $options['nextPage'] .'",
-             navi: ".'. $options['navi'] .'",
-             easing: "'. $options['easing'] .'",
-           });     
-         });';
-  
-  drupal_add_js($js, 'inline');
-  
+
+  // Construct the selector name for the View.
+  $selector = '.view-display-id-'. $view->current_display .' div.scrollable';
+
+  // Add the Scrollable tool, making sure to send in the correct data types.
+  jquerytools_add('scrollable', $selector, array(
+    'size' => (int)$options['size'],
+    'vertical' => $options['vertical'] ? TRUE : FALSE,
+    'clickable' => $options['clickable'] ? TRUE : FALSE,
+    'loop' => $options['loop'] ? TRUE : FALSE,
+    'interval' => (int)$options['interval'],
+    'speed' => (int)$options['speed'],
+    'keyboard' => $options['keyboard'] ? TRUE : FALSE,
+    'easing' => $options['easing'],
+  ));
+
+  // Inject the cascading stylesheet.
+  drupal_add_css(drupal_get_path('module', 'scrollable') .'/css/scrollable_'. (($options['vertical']) ? 'vertical' : 'horizontal') .'.css');
+
   return theme('scrollable', $rows, $options);
-}
\ No newline at end of file
+}
+
Index: scrollable/scrollable_style_plugin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/scrollable/scrollable_style_plugin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 scrollable_style_plugin.inc
--- scrollable/scrollable_style_plugin.inc	28 May 2009 22:11:50 -0000	1.1
+++ scrollable/scrollable_style_plugin.inc	12 Jun 2009 20:36:42 -0000
@@ -1,162 +1,113 @@
-<?php
-// $Id: scrollable_style_plugin.inc,v 1.1 2009/05/28 22:11:50 cptncauliflower Exp $
-/**
- * @file
- *  Provide the views scrollable plugin object with default options and form.
- */
-
-/**
-  * Implementation of views_plugin_style().
-  */
-class scrollable_style_plugin extends views_plugin_style {
-  function option_definition() {
-    $options = parent::option_definition();
-    $options['size'] = array('default' => 3);
-    $options['vertical'] = array('default' => FALSE);
-    $options['clickable'] = array('default' => TRUE);
-    $options['loop'] = array('default' => FALSE);
-    $options['interval'] = array('default' => 0);
-    $options['speed'] = array('default' => 400);
-    $options['keyboard'] = array('default' => TRUE);
-    $options['items'] = array('default' => 'items');
-    
-    $options['prevbutton'] = array('default' => TRUE);
-    $options['prev'] = array('default' => 'prev');
-    $options['prevPage'] = array('default' => 'prevPage');
-    
-    $options['nextbutton'] = array('default' => TRUE);
-    $options['next'] = array('default' => 'next');
-    $options['nextPage'] = array('default' => 'nextPage');
-    
-    $options['navigator'] = array('default' => TRUE);    
-    $options['navi'] = array('default' => 'navi');
-    
-    $options['mousewheel'] = array('default' => TRUE);
-    
-    $options['easing'] = array('default' => 'swing');
-    
-    return $options;
-  }
-  
-  function options_form(&$form, &$form_state) {
-    parent::options_form($form, $form_state);
-    $form['size'] = array(
-      '#type' => 'select',
-      '#title' => t('Size'),
-      '#default_value' => $this->options['size'],
-      '#description' => t('The number of visible items within the scrollable-enabled HTML element.'),
-      '#options' => drupal_map_assoc(range(1,10)),
-    );
-    $form['vertical'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Vertical'),
-      '#description' => t('Whether items will be scrolled vertically. (If set to false, items will be scrolled horizontally.)'),
-      '#default_value' => $this->options['vertical'],
-    );
-    $form['clickable'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Clickable'),
-      '#description' => t('Whether scrolling occurs when an item is clicked inside the scrollable-enabled element.'),
-      '#default_value' => $this->options['clickable'],
-    );
-    $form['loop'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Loop'),
-      '#description' => t('Whether scrolling starts from the first item in the list when the last item is reached.'),
-      '#default_value' => $this->options['loop'],
-    );
-    $form['interval'] = array(
-      '#type' => 'select',
-      '#title' => t('Interval'),
-      '#default_value' => $this->options['interval'],
-      '#description' => t('The time (in milliseconds) between automatic scrolling of items (one step forward). 0 to disable automatic scrolling.'),
-      '#options' => drupal_map_assoc(array(0, 100, 250, 500, 1000, 2000, 5000, 10000)),
-    );
-    $form['speed'] = array(
-      '#type' => 'select',
-      '#title' => t('Speed'),
-      '#default_value' => $this->options['speed'],
-      '#description' => t('The time (in milliseconds) of the scrolling animation.'),
-      '#options' => drupal_map_assoc(array(100, 400, 500, 1000, 2000, 5000, 10000)),
-    );
-    $form['keyboard'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Keyboard'),
-      '#description' => t('Whether keyboard arrow key navigation is enabled. (Horizontal scroller moves back/forward with left/right arrow keys; vertical scroller moves with up/down keys.'),
-      '#default_value' => $this->options['keyboard'],
-    );   
-    $form['items'] = array(
-      '#type' => 'textfield',
-      '#title' => t('Items'),
-      '#default_value' => $this->options['items'],
-      '#size' => 15,
-      '#description' => t('Selector for the element that contains the scrollable items. This must be located inside the parent scrollable-enabled HTML element.'),
-    );
-    $form['prevbutton'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Prevbutton'),
-      '#description' => t('Activate the prevbutton.'),
-      '#default_value' => $this->options['prevbutton'],
-    );
-    $form['prev'] = array(
-      '#type' => 'textfield',
-      '#title' => t('prev'),
-      '#default_value' => $this->options['prev'],
-      '#size' => 15,
-      '#description' => t('Selector for the sibling element to which a "scroll backwards" action should be bound. '),
-    );
-    $form['prevPage'] = array(
-      '#type' => 'textfield',
-      '#title' => t('prevPage'),
-      '#default_value' => $this->options['prevPage'],
-      '#size' => 15,
-      '#description' => t('Selector for the sibling element to which a "previous page" action should be bound.'),
-    );
-    $form['nextbutton'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Nextbutton'),
-      '#description' => t('Activate the nextbutton.'),
-      '#default_value' => $this->options['nextbutton'],
-    );    
-    $form['next'] = array(
-      '#type' => 'textfield',
-      '#title' => t('next'),
-      '#default_value' => $this->options['next'],
-      '#size' => 15,
-      '#description' => t('Selector for the sibling element to which a "scroll forwards" action should be bound.'),
-    );
-    $form['nextPage'] = array(
-      '#type' => 'textfield',
-      '#title' => t('nextPage'),
-      '#default_value' => $this->options['nextPage'],
-      '#size' => 15,
-      '#description' => t('Selector for the sibling element to which a "next page" action should be bound.'),
-    );
-    $form['navigator'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Navigator'),
-      '#description' => t('Activate the navigator.'),
-      '#default_value' => $this->options['navigator'],
-    );     
-    $form['navi'] = array(
-      '#type' => 'textfield',
-      '#title' => t('navi'),
-      '#default_value' => $this->options['navi'],
-      '#size' => 15,
-      '#description' => t('Selector for the sibling element that contains a navigator for switching between pages. This topic is covered in more depth below.'),
-    );
-    $form['mousewheel'] = array(
-      '#type' => 'checkbox',
-      '#title' => t('Mousewheel'),
-      '#description' => t('Activate mousewheel navigator.'),
-      '#default_value' => $this->options['mousewheel'],
-    ); 
-    $form['easing'] = array(
-      '#type' => 'select',
-      '#title' => t('Easing'),
-      '#default_value' => $this->options['easing'],
-      '#description' => t('The type of "easing" applied to the scrolling animation. "swing" means that there is an acceleration, followed by a constant speed, followed by a deceleration. "linear" means that the whole animation happens at a constant speed.'),
-      '#options' => drupal_map_assoc(array('swing', 'linear')),
-    );
-  }    
-}
\ No newline at end of file
+<?php
+// $Id: scrollable_style_plugin.inc,v 1.1 2009/05/28 22:11:50 cptncauliflower Exp $
+/**
+ * @file
+ *  Provide the views scrollable plugin object with default options and form.
+ */
+
+/**
+  * Implementation of views_plugin_style().
+  */
+class scrollable_style_plugin extends views_plugin_style {
+  function option_definition() {
+    $options = parent::option_definition();
+    $options['size'] = array('default' => 3);
+    $options['vertical'] = array('default' => FALSE);
+    $options['clickable'] = array('default' => TRUE);
+    $options['loop'] = array('default' => FALSE);
+    $options['interval'] = array('default' => 0);
+    $options['speed'] = array('default' => 400);
+    $options['keyboard'] = array('default' => TRUE);
+    $options['easing'] = array('default' => 'swing');
+
+    $options['prevbutton'] = array('default' => TRUE);
+    $options['nextbutton'] = array('default' => TRUE);
+    $options['navigator'] = array('default' => TRUE);
+
+    $options['mousewheel'] = array('default' => FALSE);
+
+    return $options;
+  }
+  
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+    $form['size'] = array(
+      '#type' => 'select',
+      '#title' => t('Size'),
+      '#default_value' => $this->options['size'],
+      '#description' => t('The number of visible items within the scrollable-enabled HTML element.'),
+      '#options' => drupal_map_assoc(range(1,10)),
+    );
+    $form['vertical'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Vertical'),
+      '#description' => t('Whether items will be scrolled vertically. (If set to false, items will be scrolled horizontally.)'),
+      '#default_value' => $this->options['vertical'],
+    );
+    $form['clickable'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Clickable'),
+      '#description' => t('Whether scrolling occurs when an item is clicked inside the scrollable-enabled element.'),
+      '#default_value' => $this->options['clickable'],
+    );
+    $form['loop'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Loop'),
+      '#description' => t('Whether scrolling starts from the first item in the list when the last item is reached.'),
+      '#default_value' => $this->options['loop'],
+    );
+    $form['interval'] = array(
+      '#type' => 'select',
+      '#title' => t('Interval'),
+      '#default_value' => $this->options['interval'],
+      '#description' => t('The time (in milliseconds) between automatic scrolling of items (one step forward). 0 to disable automatic scrolling.'),
+      '#options' => drupal_map_assoc(array(0, 100, 250, 500, 1000, 2000, 5000, 10000)),
+    );
+    $form['speed'] = array(
+      '#type' => 'select',
+      '#title' => t('Speed'),
+      '#default_value' => $this->options['speed'],
+      '#description' => t('The time (in milliseconds) of the scrolling animation.'),
+      '#options' => drupal_map_assoc(array(100, 400, 500, 1000, 2000, 5000, 10000)),
+    );
+    $form['keyboard'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Keyboard'),
+      '#description' => t('Whether keyboard arrow key navigation is enabled. Horizontal scroller moves back/forward with left/right arrow keys; vertical scroller moves with up/down keys.'),
+      '#default_value' => $this->options['keyboard'],
+    );
+    $form['prevbutton'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Previous button'),
+      '#description' => t('Display the previous button.'),
+      '#default_value' => $this->options['prevbutton'],
+    );
+    $form['nextbutton'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Next button'),
+      '#description' => t('Display the next button.'),
+      '#default_value' => $this->options['nextbutton'],
+    );
+    $form['navigator'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Navigator'),
+      '#description' => t('Activate the navigator.'),
+      '#default_value' => $this->options['navigator'],
+    );
+    $form['mousewheel'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Mousewheel'),
+      '#description' => t('Activates navigation through the mouse wheel. Note that this requires the <a href="@mousewheel">Mouse Wheel module</a>.', array('@mousewheel' => 'http://drupal.org/project/mousewheel')),
+      '#default_value' => $this->options['mousewheel'],
+      '#disabled' => !module_exists('mousewheel'), // Requires the Mouse Wheel plugin.
+    );
+    $form['easing'] = array(
+      '#type' => 'select',
+      '#title' => t('Easing'),
+      '#default_value' => $this->options['easing'],
+      '#description' => t('The type of "easing" applied to the scrolling animation. "swing" means that there is an acceleration, followed by a constant speed, followed by a deceleration. "linear" means that the whole animation happens at a constant speed.'),
+      '#options' => drupal_map_assoc(array('swing', 'linear')),
+    );
+  }    
+}
+
Index: scrollable/css/scrollable_horizontal.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/scrollable/css/scrollable_horizontal.css,v
retrieving revision 1.1
diff -u -p -r1.1 scrollable_horizontal.css
--- scrollable/css/scrollable_horizontal.css	31 May 2009 15:22:24 -0000	1.1
+++ scrollable/css/scrollable_horizontal.css	12 Jun 2009 20:36:42 -0000
@@ -8,22 +8,22 @@
  * root element for the scrollable.  
  * when scrolling occurs this element stays still.  
  */ 
-div.scrollable { 
+div.scrollable.horizontal { 
   /* required settings */ 
   position: relative; 
   overflow: hidden;              
-  float: left;    
+  float: left;
   width: 660px;
   height: 300px;
 }
  
-/** 
+/**
  * root element for scrollable items. Must be absolutely positioned 
  * and it should have a super large width to accomodate scrollable items. 
  * it's enough that you set width and height for the root element and 
  * not for this element. 
  */ 
-div.scrollable div.items {     
+div.scrollable.horizontal div.items {     
   /* this cannot be too large */   
   position: absolute;         
   width: 2000em;
@@ -34,13 +34,13 @@ div.scrollable div.items {     
  * typically this element is the one that *you* will style 
  * the most. 
  */ 
-div.scrollable div.items div.item { 
+div.scrollable.horizontal div.items div.item { 
   float: left;
   width: 220px;
 } 
  
 /* you may want to setup some decorations to active item */ 
-div.items div.active { 
+div.scrollable.horizontal div.items div.active { 
     border: 1px inset #ccc;         
     background-color: #fff; 
 }
@@ -48,7 +48,7 @@ div.items div.active { 
 /*********** navigator ***********/
 
 /* position and dimensions of the navigator */
-div.navi {
+div.scrollable-wrapper.horizontal div.navi {
 	margin-left: 328px;
 	width: 200px;
 	height: 20px;
@@ -56,7 +56,7 @@ div.navi {
 
 
 /* items inside navigator */
-div.navi a {
+div.scrollable-wrapper.horizontal div.navi a {
 	width: 8px;
 	height: 8px;
 	float: left;
@@ -66,19 +66,19 @@ div.navi a {
 }
 
 /* mouseover state */
-div.navi a:hover {
+div.scrollable-wrapper.horizontal div.navi a:hover {
 	background-position: 0 -8px;      
 }
 
 /* active state (current page state) */
-div.navi a.active {
+div.scrollable-wrapper.horizontal div.navi a.active {
 	background-position: 0 -16px;     
 } 	
 
 /*********** left/right buttons ***********/
 
 /* prev, next, prevPage and nextPage buttons */
-a.prev, a.next, a.prevPage, a.nextPage {
+div.scrollable-wrapper.horizontal a.prev, div.scrollable-wrapper.horizontal a.next, div.scrollable-wrapper.horizontal a.prevPage, div.scrollable-wrapper.horizontal a.nextPage {
 	display: block;
 	width: 18px;
 	height: 18px;
@@ -89,17 +89,17 @@ a.prev, a.next, a.prevPage, a.nextPage {
 }
 
 /* mouseover state */
-a.prev:hover, a.next:hover, a.prevPage:hover, a.nextPage:hover {
+div.scrollable-wrapper.horizontal a.prev:hover, div.scrollable-wrapper.horizontal a.next:hover, div.scrollable-wrapper.horizontal a.prevPage:hover, div.scrollable-wrapper.horizontal a.nextPage:hover {
 	background-position: 0px -18px;		
 }
 
 /* disabled navigational button */
-a.disabled {
+div.scrollable-wrapper.horizontal a.disabled {
 	visibility: hidden !important;		
 }
 
 /* next button uses another background image */
-a.next, a.nextPage {
+div.scrollable-wrapper.horizontal a.next, div.scrollable-wrapper.horizontal a.nextPage {
 	background-image: url(../img/right.png);
 	clear: right;	
 }
Index: scrollable/css/scrollable_vertical.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/scrollable/css/scrollable_vertical.css,v
retrieving revision 1.1
diff -u -p -r1.1 scrollable_vertical.css
--- scrollable/css/scrollable_vertical.css	31 May 2009 15:22:24 -0000	1.1
+++ scrollable/css/scrollable_vertical.css	12 Jun 2009 20:36:42 -0000
@@ -8,7 +8,7 @@
  * root element for the scrollable.  
  * when scrolling occurs this element stays still.  
  */ 
-div.scrollable { 
+div.scrollable.vertical { 
   /* required settings */ 
   position: relative; 
   overflow: hidden;              
@@ -23,7 +23,7 @@ div.scrollable { 
  * it's enough that you set width and height for the root element and 
  * not for this element. 
  */ 
-div.scrollable div.items {     
+div.scrollable.vertical div.items {     
   /* this cannot be too large */   
   position: absolute;         
   height: 2000em;
@@ -34,13 +34,13 @@ div.scrollable div.items {     
  * typically this element is the one that *you* will style 
  * the most. 
  */ 
-div.scrollable div.items div.item { 
+div.scrollable.vertical div.items div.item { 
   float: left;
   height: 220px;
 } 
  
 /* you may want to setup some decorations to active item */ 
-div.items div.active { 
+div.scrollable.vertical div.items div.active { 
     border: 1px inset #ccc;         
     background-color: #fff; 
 }
@@ -48,7 +48,7 @@ div.items div.active { 
 /*********** navigator ***********/
 
 /* position and dimensions of the navigator */
-div.navi {
+div.scrollable-wrapper.vertical div.navi {
 	margin-left: 148px;
 	width: 200px;
 	height: 20px;
@@ -56,7 +56,7 @@ div.navi {
 
 
 /* items inside navigator */
-div.navi a {
+div.scrollable-wrapper.vertical div.navi a {
 	width: 8px;
 	height: 8px;
 	float: left;
@@ -66,19 +66,19 @@ div.navi a {
 }
 
 /* mouseover state */
-div.navi a:hover {
+div.scrollable-wrapper.vertical div.navi a:hover {
 	background-position: 0 -8px;      
 }
 
 /* active state (current page state) */
-div.navi a.active {
+div.scrollable-wrapper.vertical div.navi a.active {
 	background-position: 0 -16px;     
 } 	
 
 /*********** left/right buttons ***********/
 
 /* prev, next, prevPage and nextPage buttons */
-a.prev, a.next, a.prevPage, a.nextPage {
+div.scrollable-wrapper.vertical a.prev, div.scrollable-wrapper.vertical a.next, div.scrollable-wrapper.vertical a.prevPage, div.scrollable-wrapper.vertical a.nextPage {
 	display: block;
 	width: 18px;
 	height: 18px;
@@ -89,17 +89,17 @@ a.prev, a.next, a.prevPage, a.nextPage {
 }
 
 /* mouseover state */
-a.prev:hover, a.next:hover, a.prevPage:hover, a.nextPage:hover {
+div.scrollable-wrapper.vertical a.prev:hover, div.scrollable-wrapper.vertical a.next:hover, div.scrollable-wrapper.vertical a.prevPage:hover, div.scrollable-wrapper.vertical a.nextPage:hover {
 	background-position: 0px -18px;		
 }
 
 /* disabled navigational button */
-a.disabled {
+div.scrollable-wrapper.vertical a.disabled {
 	visibility: hidden !important;		
 }
 
 /* next button uses another background image */
-a.next, a.nextPage {
+div.scrollable-wrapper.vertical a.next, div.scrollable-wrapper.vertical a.nextPage {
 	background-image: url(../img/right.png);
 	clear: right;	
 }
Index: scrollable/theme/scrollable.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/scrollable/theme/scrollable.tpl.php,v
retrieving revision 1.1
diff -u -p -r1.1 scrollable.tpl.php
--- scrollable/theme/scrollable.tpl.php	28 May 2009 22:11:50 -0000	1.1
+++ scrollable/theme/scrollable.tpl.php	12 Jun 2009 20:36:42 -0000
@@ -1,4 +1,4 @@
-<div>
+<div class="scrollable-wrapper <?php print($options['vertical'] ? 'vertical' : 'horizontal'); ?>">
   <?php if ( $options['navigator'] ): ?>
     <!-- navigator -->
     <div class="navi"></div>
@@ -9,22 +9,21 @@
     <a class="prev"></a>
   <?php endif; ?>
 
-    <!-- root element for scrollable --> 
-    <div class="scrollable <?php print($options['vertical'] ? 'vertical' : 'horizontal'); ?>"> 
-         
-        <!-- root element for the items --> 
-        <div class="items"> 
-            <?php
-            foreach ( $rows as $id => $row ) {
-              print '<div class="item">'. $row .'</div>';  
-            }
-            ?>        
-        </div> 
-         
-    </div>
-    
+  <!-- root element for scrollable --> 
+  <div class="scrollable <?php print($options['vertical'] ? 'vertical' : 'horizontal'); ?>">
+     <!-- root element for the items --> 
+     <div class="items"> 
+       <?php
+       foreach ( $rows as $id => $row ) {
+         print '<div class="item">'. $row .'</div>';
+       }
+       ?>
+     </div>
+  </div>
+
   <?php if ( $options['nextbutton'] ): ?>
     <!-- next link --> 
     <a class="next"></a>
   <?php endif; ?>
-</div>
\ No newline at end of file
+</div>
+
