diff --git a/cookiecontrol.admin.inc b/cookiecontrol.admin.inc
old mode 100644
new mode 100755
index 931f3ae..e6394ae
--- a/cookiecontrol.admin.inc
+++ b/cookiecontrol.admin.inc
@@ -57,8 +57,10 @@ function cookiecontrol_admin_settings() {
     '#description' => t("The icon will be anchored to the corner of the viewport and won't scroll with your web page."),
     '#default_value' => variable_get('cookiecontrol_shape', 'triangle'),
     '#options' => array(
-      'triangle' => t('!icon Triangle', array('!icon' => theme('image', array('path' => $path . '/images/icon-triangle.png')))),
-      'diamond' => t('!icon Diamond', array('!icon' => theme('image', array('path' => $path . '/images/icon-diamond.png'))))
+	t('triangle') => 'triangle',
+	t('diamond') => 'diamond',
+      /*'triangle' => t('!icon Triangle', array('!icon' => theme('image', array('path' => $path . '/images/icon-triangle.png')))),
+      'diamond' => t('!icon Diamond', array('!icon' => theme('image', array('path' => $path . '/images/icon-diamond.png'))))*/
     )
   );
 
@@ -130,7 +132,7 @@ function cookiecontrol_admin_settings() {
     '#default_value' => variable_get('cookiecontrol_onaccept', ''),
     '#description' => t('JavaScript code to be executed when a visitor gives consent for the site to use cookies. Example use can be to trigger analytics code to record the initial page visit.'),
   );
-  
+
   return system_settings_form($form);
 }
 
diff --git a/cookiecontrol.info b/cookiecontrol.info
old mode 100644
new mode 100755
index 45df369..0356913
--- a/cookiecontrol.info
+++ b/cookiecontrol.info
@@ -2,8 +2,7 @@
 name = "Cookie Control"
 description = "Enables you to comply with UK and EU law on cookies"
 
-core = 7.x
-
-configure = admin/config/people/cookiecontrol
+core = 6.x
 
+dependencies[] = jqmulti
 scripts[] = js/cookieControl-4.1.min.js
\ No newline at end of file
diff --git a/cookiecontrol.module b/cookiecontrol.module
old mode 100644
new mode 100755
index 994eb1b..63ea696
--- a/cookiecontrol.module
+++ b/cookiecontrol.module
@@ -19,19 +19,33 @@ define('COOKIECONTROL_FULLTEXT', '<p>' . t("Some cookies on this site are essent
  * @return void
  */
 function cookiecontrol_menu() {
-  $items['admin/config/people/cookiecontrol'] = array(
+  $items['admin/settings/cookiecontrol'] = array(
     'title' => 'Cookie Control',
     'description' => 'Configure cookie notification pop-up.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('cookiecontrol_admin_settings'),
     'access arguments' => array('administer users'),
     'file' => 'cookiecontrol.admin.inc',
-    'weight' => 0,
+    'type' => MENU_NORMAL_ITEM,
   );
 
   return $items;
 }
 
+/**
+ * Add files to be loaded with jQuery Multi's jQuery library
+ * @return
+ * An array of full paths to files that should be loaded with the jqmulti's jQuery library
+ * (paths are relative to Drupal root)
+ */
+
+/*
+function cookiecontrol_jqmulti_files() {
+  return array(
+    'http://drupal6.sandbox/sites/all/modules/cookiecontrol/js/cookieControl-4.1.min.js',
+  );
+}*/
+
 function cookiecontrol_theme($existing, $type, $theme, $path) {
   return array(
       'cookiecontrol' => array(
@@ -46,7 +60,7 @@ function cookiecontrol_theme($existing, $type, $theme, $path) {
  * Generates a clean string used for the sites cookie name
  */
 function cookiecontrol_generatesitecookie() {
-  return drupal_clean_css_identifier(drupal_strtolower(variable_get('site_name', t('Drupal')))) . '_cookiecontrol';
+  return cookiecontrol_clean_css_identifier(drupal_strtolower(variable_get('site_name', t('Drupal')))) . '_cookiecontrol';
 }
 
 /**
@@ -56,10 +70,9 @@ function cookiecontrol_generatesitecookie() {
  * @param mixed &$variables
  * @return void
  */
-function cookiecontrol_preprocess_html(&$variables) {
+function cookiecontrol_footer($main = 0) {
   // don't render on admin pages
-  if (strpos(current_path(), 'admin') === FALSE) {
-  
+  /*if (strpos(current_path(), 'admin') === FALSE) {*/
     $cookiecontrol_text = addslashes(t(variable_get('cookiecontrol_text', COOKIECONTROL_TEXT)));
     $cookiecontrol_fulltext = addslashes(t(variable_get('cookiecontrol_fulltext', COOKIECONTROL_FULLTEXT)));
   
@@ -67,10 +80,6 @@ function cookiecontrol_preprocess_html(&$variables) {
     if ($nid = variable_get('cookiecontrol_privacynode', '')) {
       $cookiecontrol_fulltext .= t('<p>By using our site you accept the terms of our !privacynode.', array('!privacynode' => l('Privacy Policy', 'node/' . $nid)));
     }
-    
-    // Escape anything that might cause a JavaScript error
-    $cookiecontrol_text = str_replace(array("\r\n", "\n", "\r", '  '), '', $cookiecontrol_text);
-    $cookiecontrol_fulltext = str_replace(array("\r\n", "\n", "\r", '  '), '', $cookiecontrol_fulltext);
   
     $cookiecontrol_html = str_replace(array("\r\n", "\n", "\r", '  '), '', theme('cookiecontrol'));
     $cookiecontrol_position = variable_get('cookiecontrol_position', 'left');
@@ -80,10 +89,10 @@ function cookiecontrol_preprocess_html(&$variables) {
     $cookiecontrol_countries = variable_get('cookiecontrol_countries', '');
     $cookiecontrol_theme = variable_get('cookiecontrol_theme', 'dark');
     $cookiecontrol_cookiename = cookiecontrol_generatesitecookie();
-  
+
     $cookiecontrol_settings = "
     jQuery(document).ready(function($) {
-    cookieControl({
+      cookieControl({
         introText: '{$cookiecontrol_text}',
         fullText: '{$cookiecontrol_fulltext}',
         theme: '{$cookiecontrol_theme}',
@@ -103,26 +112,32 @@ function cookiecontrol_preprocess_html(&$variables) {
         });
       });
     ";
-  
+
     // If country restrictions are specified include the required plugin
     if ($cookiecontrol_countries) {
-      drupal_add_js('https://ssl.geoplugin.net/javascript.gp', array('type' => 'external'));
+      drupal_add_js('https://ssl.geoplugin.net/javascript.gp');
     }
-  
-    drupal_add_js($cookiecontrol_settings, array(
-      'type' => 'inline',
-      'preprocess' => TRUE,
-      'scope' => 'footer',
-      'group' => JS_DEFAULT,
-      'every_page' => TRUE,
-      'cache' => TRUE,
-    ));
 
+    //drupal_add_js($cookiecontrol_settings, 'inline', 'footer');
+        
+    $path = drupal_get_path('module', 'cookiecontrol');
+    $library = file_get_contents($path."/js/cookieControl-4.1.min.js");
+
+    $jsource = '<script type="text/javascript">';
+    $jsource .= '(function(jQuery){';
+    $jsource .= $library;
+    $jsource .= $cookiecontrol_settings;
+    $jsource .= '})(jq172)';
+    
     // Set-up all the callback functions
     cookiecontrol_onacceptance();
     cookiecontrol_cookiesallowed();
     cookiecontrol_cookiesnotallowed();
-  }
+    
+    $jsource .= '</script>';
+    
+    return $jsource;
+  /*}*/
 }
 
 /**
@@ -146,14 +161,7 @@ function cookiecontrol_onacceptance() {
   
   $cookiecontrol_acceptancecallback = "function cookiecontrol_accepted(cc) {\n" . implode("\n", $callbacks) . "\n}";
       
-  drupal_add_js($cookiecontrol_acceptancecallback, array(
-    'type' => 'inline',
-    'preprocess' => TRUE,
-    'scope' => 'footer',
-    'group' => JS_DEFAULT,
-    'every_page' => TRUE,
-    'cache' => TRUE,
-  ));
+  drupal_add_js($cookiecontrol_acceptancecallback, 'inline', 'footer', FALSE, TRUE, TRUE);  
 }
 
 /**
@@ -167,14 +175,7 @@ function cookiecontrol_cookiesallowed() {
 
   $cookiecontrol_cookiesallowedcallback = "function cookiecontrol_cookiesallowed(cc) {\n" . implode("\n", $callbacks) . "\n}";
 
-  drupal_add_js($cookiecontrol_cookiesallowedcallback, array(
-    'type' => 'inline',
-    'preprocess' => TRUE,
-    'scope' => 'footer',
-    'group' => JS_DEFAULT,
-    'every_page' => TRUE,
-    'cache' => TRUE,
-  ));
+  drupal_add_js($cookiecontrol_cookiesallowedcallback, 'inline', 'footer', FALSE, TRUE, TRUE);
 }
 
 /**
@@ -188,27 +189,32 @@ function cookiecontrol_cookiesnotallowed() {
 
   $cookiecontrol_cookiesnotallowedcallback = "function cookiecontrol_cookiesnotallowed(cc) {\n" . implode("\n", $callbacks) . "\n}";
 
-  drupal_add_js($cookiecontrol_cookiesnotallowedcallback, array(
-    'type' => 'inline',
-    'preprocess' => TRUE,
-    'scope' => 'footer',
-    'group' => JS_DEFAULT,
-    'every_page' => TRUE,
-    'cache' => TRUE,
-  ));
+  drupal_add_js($cookiecontrol_cookiesnotallowedcallback, 'inline', 'footer', FALSE, TRUE, TRUE);
+}
+
+/**
+ * Implements hook_init().
+ */
+function cookiecontrol_init() {
+  $path = drupal_get_path('module', 'cookiecontrol');
+  drupal_add_css($path . '/css/eu_cookie_compliance.css');
+  drupal_add_js($path . '/js/cookieControl-4.1.min.js', 'module', 'footer');
 }
 
 /**
  * If cookie consent has not yet been given add a validation callback to tell the user and disable any submission callbacks
  */
-function cookiecontrol_form_user_login_block_alter(&$form, &$form_state, $form_id) {
-  if ($s = cookiecontrol_userinrestrictedcountry()) {
-    if (!isset($_COOKIE[cookiecontrol_generatesitecookie()]) || $_COOKIE[cookiecontrol_generatesitecookie()] != 'yes') {
-      // Repalce all validation callbacks with just one telling the visitor they cannot log in yet
-      $form['#validate'] = array('cookiecontrol_user_login_ban');
+//function cookiecontrol_form_user_login_block_alter(&$form, &$form_state, $form_id) {
+function cookiecontrol_form_alter($form_id, &$form) {
+  if ($form_id == 'user_login_block' || $form_id == 'user_login') {
+    if ($s = cookiecontrol_userinrestrictedcountry()) {
+      if (!isset($_COOKIE[cookiecontrol_generatesitecookie()]) || $_COOKIE[cookiecontrol_generatesitecookie()] != 'yes') {
+        // Repalce all validation callbacks with just one telling the visitor they cannot log in yet
+        $form['#validate'] = array('cookiecontrol_user_login_ban');
       
-      // Remove any existing submit handlers to prevent any authentication taking place
-      unset($form['#submit']);
+        // Remove any existing submit handlers to prevent any authentication taking place
+        unset($form['#submit']);
+      }
     }
   }
 }
@@ -237,8 +243,29 @@ function cookiecontrol_userinrestrictedcountry() {
   if ($request->code == 200) {
     $geo_info = unserialize($request->data);
     return stripos($cookiecontrol_countries, $geo_info['geoplugin_countryName']) !== FALSE ? TRUE : FALSE;
-  } else {
+  } 
+  else {
     watchdog('Cookie Control', 'A visitors IP address could not be matched to a location so they were not blocked from logging in. Geoplugin returned the error [@code] @message', array('@code' => $request->code, '@message' => $request->status_message), WATCHDOG_ERROR);
     return TRUE;
   }
+}
+
+/**
+ * Drupal 7 Backported functions
+ */
+ function cookiecontrol_clean_css_identifier($identifier, $filter = array(' ' => '-', '_' => '-', '/' => '-', '[' => '-', ']' => '')) {
+  // By default, we filter using Drupal's coding standards.
+  $identifier = strtr($identifier, $filter);
+
+  // Valid characters in a CSS identifier are:
+  // - the hyphen (U+002D)
+  // - a-z (U+0030 - U+0039)
+  // - A-Z (U+0041 - U+005A)
+  // - the underscore (U+005F)
+  // - 0-9 (U+0061 - U+007A)
+  // - ISO 10646 characters U+00A1 and higher
+  // We strip out any character not in the above list.
+  $identifier = preg_replace('/[^\x{002D}\x{0030}-\x{0039}\x{0041}-\x{005A}\x{005F}\x{0061}-\x{007A}\x{00A1}-\x{FFFF}]/u', '', $identifier);
+
+  return $identifier;
 }
\ No newline at end of file
diff --git a/js/cookieControl-4.1.min.js b/js/cookieControl-4.1.min.js
old mode 100644
new mode 100755
diff --git a/modules/cookie_googleanalytics/cookie_googleanalytics.info b/modules/cookie_googleanalytics/cookie_googleanalytics.info
deleted file mode 100644
index 859389f..0000000
--- a/modules/cookie_googleanalytics/cookie_googleanalytics.info
+++ /dev/null
@@ -1,6 +0,0 @@
-; $Id$
-name = "Cookie Control for Google Analytics"
-description = "Disabled Google Analytics form tracking until visitor consents"
-dependencies[] = "cookiecontrol"
-dependencies[] = "googleanalytics"
-core = 7.x
diff --git a/modules/cookie_googleanalytics/cookie_googleanalytics.module b/modules/cookie_googleanalytics/cookie_googleanalytics.module
deleted file mode 100644
index 44aee30..0000000
--- a/modules/cookie_googleanalytics/cookie_googleanalytics.module
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/*
- * @file
- * Drupal Module: Cookie Controlled GoogleAnalytics
- * Controls when GA can track a visitor based on their cookie consent for the domain.
- *
- * @author: Mike Carter <http://drupal.org/user/13164>
- */
-
-/**
- * Add the analytics javascript callback to the list for on acceptance
- */
-function cookie_googleanalytics_cookieaccept_alter(&$callbacks) { 
-  $callbacks[] = 'ccAddAnalytics();';
-}
-
-/**
- * Add the analytics javascript callback to the list for already consenting visitors
- */
-function cookie_googleanalytics_cookiesallowed_alter(&$callbacks) { 
-  $callbacks[] = 'ccAddAnalytics();';
-}
-
-/**
- * Remove the standard Google Analytics code from the header and place in
- * a function which can be called manually when appropriate
- */
-function cookie_googleanalytics_js_alter(&$javascript) {
-  // Find the Google Analytics code. Wish there was a better keyed way to find the code :-(
-  foreach($javascript as $key => $script) {
-    if (is_string($script['data']) && strpos($script['data'], '/ga.js') > 0) {
-      
-      // Wrap code in a callback function
-      $script = "function ccAddAnalytics() {\n" . $script['data'] . "\n}";
-      
-      // Substitue the original script snippet with our function wrapped version
-      $javascript[$key]['data'] = $script;
-    }
-  }
-}
