diff --git a/README.txt b/README.txt
index ac75767..deddd53 100644
--- a/README.txt
+++ b/README.txt
@@ -1,3 +1,4 @@
+// $Id: README.txt,v 1.2.2.1 2009/06/24 18:08:34 spydor Exp $
 
 DESCRIPTION
 -----------
diff --git a/jquery_slideshow.info b/jquery_slideshow.info
index ac59fa2..f7636ca 100644
--- a/jquery_slideshow.info
+++ b/jquery_slideshow.info
@@ -1,10 +1,6 @@
-
-name = Jquery Slideshow
-description = "Create photo gallery slide shows using the cycle plugin for Jquery and imagefields"
-package = "User Interface"
+; $Id: jquery_slideshow.info,v 1.1.4.1 2009/06/24 18:08:34 spydor Exp $
+name = jQuery Slideshow
+description = "Create photo gallery slide shows using the cycle plugin for jQuery and image fields"
+package = User interface
 dependencies[] = jquery_plugin
-dependencies[] = imagecache
-dependencies[] = imagefield
-core = 6.x
-
-
+core = 7.x
diff --git a/jquery_slideshow.install b/jquery_slideshow.install
index 3c15aeb..5af256b 100644
--- a/jquery_slideshow.install
+++ b/jquery_slideshow.install
@@ -1,4 +1,5 @@
 <?php
+// $Id: jquery_slideshow.install,v 1.1.4.1 2009/06/24 18:08:34 spydor Exp $
 
 /**
  * Implementation of hook_install().
diff --git a/jquery_slideshow.module b/jquery_slideshow.module
index d35eac5..cf553d3 100644
--- a/jquery_slideshow.module
+++ b/jquery_slideshow.module
@@ -1,4 +1,5 @@
 <?php
+// $Id: jquery_slideshow.module,v 1.3.2.2 2009/07/24 00:34:21 spydor Exp $
 
 /**
  * @file
@@ -11,7 +12,7 @@
  */
 function jquery_slideshow_menu() {
    $items = array();
-    $items['admin/content/jquery-slideshows'] = array(
+    $items['admin/config/user-interface/jquery-slideshows'] = array(
       'title' => 'Jquery Slideshows',
       'page callback' => 'drupal_get_form',
       'page arguments' => array('jquery_slideshow_admin'),
@@ -30,49 +31,34 @@ function jquery_slideshow_perm() {
 
 
 /**
- *Implementation of hook_theme
- *@author Lee Rowlands <leerowlands at rowlands-bcs dot com>
- */
-function jquery_slideshow_theme() {
-    $theme = array();
-    foreach (_jquery_slideshow_get_presets() as $preset) {
-        $theme['jquery_slideshow_formatter_jqs__'. $preset] = array(
-            'arguments' => array('element' => NULL),
-            'function'  => 'theme_jquery_slideshow_formatter'
-        );
-    }
-    return $theme;
-}
-
-
-/**
  * Base implementation of theme_jquery_slideshow
  *
  * @param array $element node element/field to style
  * @author Lee Rowlands <leerowlands at rowlands-bcs dot com>
  */
-function theme_jquery_slideshow_formatter($element) {
-    static $rendered;
-    if (!$rendered) {
-        $rendered = TRUE;
-        $formatter = $element['#formatter'];
-        $field_name = $element['#field_name'];
-        $item = $element['#item'];
-        $formatter = $element['#formatter'];
-        $nid = $element['#item']['nid'];
-        $node = node_load($element['#item']['nid']);;
-        $jq_slideshow_id = 'jq-slideshow-'. $nid .'-'. $field_name;
-        $output = '<div class="jquery_slideshow" id="'. $jq_slideshow_id .'">';
-        $dets = explode('__', $formatter);
-        $preset = $dets[1];
-        foreach ($node->{$field_name} as $image) {
-          $output .= theme('imagecache', $preset, $image['filepath'], $image['data']['alt'], $image['data']['title']);        
-        }
-        $output .= '</div>';
-        _jquery_slideshow_get_settings($jq_slideshow_id, $preset);
-        return $output;
-    }
-    
+function jquery_slideshow_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
+  $element = array(); // Initialize the var
+  $formatter = $display['type'];
+  $field_name = $field['field_name'];
+  $nid = $entity->nid;
+  $jq_slideshow_id = 'jq-slideshow-'. $nid .'-'. $field_name;
+  $output = '<div class="jquery_slideshow" id="'. $jq_slideshow_id .'">';
+  $dets = explode('__', $formatter);
+  $preset = $dets[1];
+  
+  $data = _jquery_slideshow_get_actions($preset);
+  
+  foreach ($items as $delta => $item) {
+    $var = array(
+      'style_name' => $preset,
+      'path' => $item['uri'],
+    );                 
+    $output .= theme_image_style($var); 
+  }
+  $output .= '</div>';
+  $element[0]['#markup'] = '<div style="height:'.$data['height'].'px;width:'.$data['width'].'px;">'.$output.'</div>';
+  _jquery_slideshow_get_settings($jq_slideshow_id, $preset);
+  return $element;  
 }
 
 
@@ -84,7 +70,10 @@ function jquery_slideshow_field_formatter_info() {
     foreach (_jquery_slideshow_get_presets() as $preset) {
         $formatters['jqs__'. $preset] = array(
           'label' => t('JQuery Slideshow: '. $preset),
-          'field types' => array('image', 'filefield')
+          'description' => t('Display the image '.$preset.' in a slideshow'),
+          'field types' => array('image', 'filefield'),
+          // You can usually leave 'multiple values' as follows:
+          'multiple values' => FIELD_BEHAVIOR_DEFAULT          
         );
     }
     return $formatters;
@@ -140,11 +129,10 @@ function jquery_slideshow_admin_submit($form, &$form_state) {
  */
 function _jquery_slideshow_get_settings($jq_slideshow_id, $preset) {
 
-  jquery_plugin_add('cycle');
+  drupal_add_library('jquery_plugin', 'cycle');
 
   $data = _jquery_slideshow_get_actions($preset);
-
-  $script = "Drupal.behaviors.jquerySlideshow = function(){
+  $script = "(function ($) {
         $('.jquery_slideshow').css({height:'". $data['height'] ."px'});
         $('.jquery_slideshow').css({width:'". $data['width'] ."px'});
         $('#". $jq_slideshow_id ."').cycle({
@@ -152,47 +140,24 @@ function _jquery_slideshow_get_settings($jq_slideshow_id, $preset) {
           speed: ". variable_get('jquery_slideshow_speed', 500) .",
           timeout: ". variable_get('jquery_slideshow_timeout', 4000) ."
         });
-
-      }";
-  drupal_add_js($script, 'inline');
+    }(jQuery));";
+  drupal_add_js($script, array('type'=>'inline','scope'=>'footer','weight'=>5)); 
 }
 
 function _jquery_slideshow_get_presets() {
-
-  // Imagecache 1.x
-  if (function_exists('_imagecache_get_presets'))
-    return _imagecache_get_presets();
-
-  // Imagecache 2.x
-  if (function_exists('imagecache_presets')) {
-    $presets = imagecache_presets();
-    $presetlist = array();
-    foreach ($presets as $key => $value) {
-        $presetlist[] = $value['presetname'];
-    }
-    return $presetlist;
+  $presets = image_styles();
+  foreach($presets as $k => $presetsetting) {
+    $presetlist[] = $k;
   }
-
+  return $presetlist;
 }
 
 function _jquery_slideshow_get_actions($preset) {
-
   $data = array();
-
-  // Imagecache 1.x
-  if (function_exists('_imagecache_actions_get_by_presetid')) {
-    $presetid = array_search($preset, _jquery_slideshow_get_presets());
-    $presets = _imagecache_actions_get_by_presetid($presetid);
-    $data['height'] = $presets[$presetid-1]['data']['height'];
-    $data['width'] = $presets[$presetid-1]['data']['width'];
+  $style = image_style_load($preset);
+  foreach($style['effects'] as $name => $data)  {
+    $size['height'] = $data['data']['height'];
+    $size['width'] = $data['data']['width'];
   }
-
-  // Imagecache 2.x
-  if (function_exists('imagecache_presets')) {
-    $preset = imagecache_preset_by_name($preset);
-    $data['width'] = $preset['actions'][0]['data']['width'];
-    $data['height'] = $preset['actions'][0]['data']['height'];
-  }
-  return $data;
-
+  return $size;
 }
\ No newline at end of file
