diff --git a/ajaxit.info b/ajaxit.info
index 7110b07..9771f64 100644
--- a/ajaxit.info
+++ b/ajaxit.info
@@ -1,13 +1,6 @@
 ; $Id: ajaxit.info,v 1.3 2010/09/30 17:23:30 mistknight Exp $
 name = Ajaxit
-description = Automatically Ajaxify your web site links using Ajaxit jquery plugin (requires jquery 1.3.0+).
+description = Automatically Ajaxify your web site links using Ajaxit jquery plugin
 package = Ajaxit
-core = 6.x
-dependencies[] = jquery_update
-
-; Information added by drupal.org packaging script on 2010-11-08
-version = "6.x-1.0-beta4"
-core = "6.x"
-project = "ajaxit"
-datestamp = "1289216739"
-
+core = 7.x
+files[] = ajaxit.module
diff --git a/ajaxit.install b/ajaxit.install
new file mode 100644
index 0000000..85795aa
--- /dev/null
+++ b/ajaxit.install
@@ -0,0 +1,17 @@
+<?php
+
+/**
+ * @file
+ * Installation functions for Ajaxit module.
+ */
+ 
+ /**
+ * Implementation of hook_enable().
+ */
+function ajaxit_uninstall() {
+  variable_del('ajaxit_exclude_urls');
+  variable_del('ajaxit_area');
+  variable_del('ajaxit_onstart');
+  variable_del('ajaxit_onsuccess');
+  variable_del('ajaxit_onerror');
+}
diff --git a/ajaxit.module b/ajaxit.module
index af6b1a8..22f7459 100644
--- a/ajaxit.module
+++ b/ajaxit.module
@@ -7,18 +7,26 @@
  */
 function ajaxit_menu() {
 
-  $items['admin/settings/ajaxit'] = array(
+  $items['admin/config/user-interface/ajaxit'] = array(
       'title' => 'Ajaxit settings',
       'page callback' => 'drupal_get_form',
       'page arguments' => array('ajaxit_settings_form'),
+      'description' => 'Configure Ajaxit settings.',
       'access arguments' => array('administer site configuration'),
-      'description' => t('Ajaxit module settings and managment')
+      'description' => 'Ajaxit module settings and managment'
   );
-
   return $items;
 }
 
 /**
+ * Implementation of hook_enable().
+ * Fix for Drupal Overlay module.
+ */
+function ajaxit_enable() {
+  variable_set('ajaxit_exclude_urls', "admin\r\nnode/add\r\nnode/([A-Za-z0-9-]+)/edit\r\nuser/([A-Za-z0-9-]+)/edit\r\nuser/([A-Za-z0-9-]+)/shortcuts");
+}
+
+/**
  * ajaxit settings form
  */
 function ajaxit_settings_form() {
@@ -33,8 +41,8 @@ function ajaxit_settings_form() {
   $form['ajaxit_exclude_urls'] = array(
       '#type' => 'textarea',
       '#title' => t("Exclude URL"),
-      '#description' => 'RegEx for all the url\'s to exclude from using ajaxit,regex on each line',
-      '#default_value' => variable_get('ajaxit_exclude_urls', ''),
+      '#description' => 'RegEx for all the url\'s to exclude from using ajaxit,regex on each line. The default values fix an incompatibility with the Overlay module.',
+      '#default_value' => variable_get('ajaxit_exclude_urls', "admin\r\nnode/add\r\nnode/([A-Za-z0-9-]+)/edit\r\nuser/([A-Za-z0-9-]+)/edit\r\nuser/([A-Za-z0-9-]+)/shortcuts"),
   );
 
   $form['ajaxit_onstart'] = array(
@@ -66,41 +74,45 @@ function ajaxit_settings_form() {
  */
 function ajaxit_init() {
 
-  $ajaxitpath = drupal_get_path('module', 'ajaxit') . '/ajaxit/';
+  $ajaxitpath = 'sites/all/libraries/ajaxit/';
 
   if (file_exists($ajaxitpath . 'ajaxit.js') && file_exists($ajaxitpath . 'jquery.history.js')) {
 
     drupal_add_js($ajaxitpath . 'jquery.history.js');
     drupal_add_js($ajaxitpath . 'ajaxit.js');
 
-    $script.='$.ajaxIt.ajaxItArea = "' . variable_get('ajaxit_area', 'body') . '";' . "\n";
-    $script.='$.ajaxIt.basePath = "' . base_path() . '";' . "\n";
-    $script.='$.ajaxIt.onSuccess = function () {    Drupal.attachBehaviors();' . variable_get("ajaxit_onsuccess", "") . ' };' . "\n";
+    $script  ='(function ($) {  ';
+    $script .='$.ajaxIt.ajaxItArea = "' . variable_get('ajaxit_area', 'body') . '";' . "\n";
+    $script .='$.ajaxIt.basePath = "' . base_path() . '";' . "\n";
+    $script .='$.ajaxIt.onSuccess = function () {    Drupal.attachBehaviors();' . variable_get("ajaxit_onsuccess", "") . ' };' . "\n";
 
     if (variable_get("ajaxit_onstart", "") != '') {
 
-      $script.='$.ajaxIt.onStart = function () { ' . variable_get("ajaxit_onstart", "") . ' };' . "\n";
+      $script .='$.ajaxIt.onStart = function () { ' . variable_get("ajaxit_onstart", "") . ' };' . "\n";
     }
     if (variable_get("ajaxit_onerror", "") != '') {
-      $script.='$.ajaxIt.onError = function (event,request,options,error) { ' . variable_get("ajaxit_onerror", "") . ' };' . "\n";
+      $script .='$.ajaxIt.onError = function (event,request,options,error) { ' . variable_get("ajaxit_onerror", "") . ' };' . "\n";
     }
 
     if (variable_get("ajaxit_exclude_urls", "") != '') {
-      $ex_urls = variable_get("ajaxit_exclude_urls", "");
+      $ex_urls = variable_get("ajaxit_exclude_urls", "admin\nnode/add\nnode/*/edit\nuser/*/edit");
       $ex_urls = str_replace("\r", "", $ex_urls);  // fix \n \r windows new line bug
       $ex_urls = explode("\n", $ex_urls);
       if (count($ex_urls)) {
-        $script.="$.ajaxIt.excludeURL = new Array('" . implode("','", $ex_urls) . "');\n";
-      } else {
-        $script.="$.ajaxIt.excludeURL = new Array();\n";
+        $script .="$.ajaxIt.excludeURL = new Array('" . implode("','", $ex_urls) . "');\n";
+      } 
+      else {
+        $script .="$.ajaxIt.excludeURL = new Array();\n";
       }
     }
 
-    $script.='$.ajaxIt.init();' . "\n";
+    $script .= '$.ajaxIt.init();' . "\n";
+    $script .= '}(jQuery));' . "\n";
 
-    drupal_add_js($script, $type = 'inline');
-  } else {
+    drupal_add_js($script, array('type' => 'inline', 'scope' => 'header'));
+  } 
+  else {
 
-    drupal_set_message('Please download the Ajaxit JQuery plugin. For more information, check the readme file.', 'error');
+    drupal_set_message(t('Please download the Ajaxit JQuery plugin. For more information, check the readme file.', 'error'));
   }
-}
\ No newline at end of file
+}
