diff --git a/rounded_corners.info b/rounded_corners.info
index b2c8708..04582f6 100644
--- a/rounded_corners.info
+++ b/rounded_corners.info
@@ -1,5 +1,3 @@
-; $Id $
 name = Rounded corners
 description = "Enables rounded corners with JQuery"
-core = 6.x
-dependencies[] = jquery_update
+core = 7.x
diff --git a/rounded_corners.js b/rounded_corners.js
index 26ef65f..72859ea 100644
--- a/rounded_corners.js
+++ b/rounded_corners.js
@@ -2,41 +2,45 @@
 /**
  * Add rounded corners.
  */
-Drupal.behaviors.roundedcorners = function() {
-  // Set the useNative property.
-  if (Drupal.settings.rounded_corners.settings) {
-    $.fn.corner.defaults.useNative = Drupal.settings.rounded_corners.settings.useNative;
-  }
-
-  // Set the height and width on the div wrapping an element.
-  if (Drupal.settings.rounded_corners.wrapping_divs) {
-    var wrappingDivs = Drupal.settings.rounded_corners.wrapping_divs;
-
-    // Add the rounded corners to the page.
-    for (var key in wrappingDivs) {
-      // Iterate over selectors and set the width and height of the wrapping 
-      // div, according to the dimensions of the image.
-      $(wrappingDivs[key]['selector']).each(function() {
-        var $this = $(this).children('img');
-
-        var imgWidth = $($this).width();
-        var imgHeight = $($this).height();
-
-        var $parent = $($this).parent('div');
-
-        $parent.width(imgWidth);
-        $parent.height(imgHeight);
-      });
-    }
-  }
-
-  // Set the rounded corners.
-  if (Drupal.settings.rounded_corners.commands) {
-    var roundedCorners = Drupal.settings.rounded_corners.commands;
-
-    // Add the rounded corners to the page.
-    for (var key in roundedCorners) {
-      $(roundedCorners[key]['selector']).corner(roundedCorners[key]['effect'] + ' ' + roundedCorners[key]['corners'] + ' ' + roundedCorners[key]['width'] + 'px');
+(function ($) {
+  Drupal.behaviors.roundedcorners = {
+    attach: function (context, settings) {
+      // Set the useNative property.
+      if (Drupal.settings.rounded_corners.settings) {
+        $.fn.corner.defaults.useNative = Drupal.settings.rounded_corners.settings.useNative;
+      }
+    
+      // Set the height and width on the div wrapping an element.
+      if (Drupal.settings.rounded_corners.wrapping_divs) {
+        var wrappingDivs = Drupal.settings.rounded_corners.wrapping_divs;
+    
+        // Add the rounded corners to the page.
+        for (var key in wrappingDivs) {
+          // Iterate over selectors and set the width and height of the wrapping 
+          // div, according to the dimensions of the image.
+          $(wrappingDivs[key]['selector']).each(function() {
+            var $this = $(this).children('img');
+    
+            var imgWidth = $($this).width();
+            var imgHeight = $($this).height();
+    
+            var $parent = $($this).parent('div');
+    
+            $parent.width(imgWidth);
+            $parent.height(imgHeight);
+          });
+        }
+      }
+    
+      // Set the rounded corners.
+      if (Drupal.settings.rounded_corners.commands) {
+        var roundedCorners = Drupal.settings.rounded_corners.commands;
+    
+        // Add the rounded corners to the page.
+        for (var key in roundedCorners) {
+          $(roundedCorners[key]['selector']).corner(roundedCorners[key]['effect'] + ' ' + roundedCorners[key]['corners'] + ' ' + roundedCorners[key]['width'] + 'px');
+        }
+      }
     }
-  }
-}
\ No newline at end of file
+  };
+}(jQuery));
