diff --git a/includes/textsize.admin.inc b/includes/textsize.admin.inc
index 4ccdd18..7917463 100755
--- a/includes/textsize.admin.inc
+++ b/includes/textsize.admin.inc
@@ -333,6 +333,12 @@ function textsize_admin_settings() {
     '#description' => t('Default') . ': "' . base_path() . '". <span class="warning">' . t('Warning') . ': ' . t('After a change, the user must store the cookie again.') . '</span>',
     '#required' => TRUE,
   );
+  $form['textsize_adv']['textsize_set_anonymous_session'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Anonymous sessions'),
+    '#default_value' => variable_get('textsize_set_anonymous_session', 1),
+    '#description' => t('Use sessions to store textsize status for anonymous users.') . ' ' . t('Default') . ': ' . t('Checked.'),
+  );
   $form['textsize_theme'] = array(
     '#type' => 'fieldset',
     '#title' => t('Theme settings'),
@@ -516,7 +522,7 @@ function textsize_admin_settings_validate($form, &$form_state) {
     form_set_error('textsize_maximum', t('The minimum size is 0.03&#037; in:') . ' "' . t('Minimum Text Size') . '".');
   }
   // Text Size Normal (Set cookie if changed)
-  if (is_numeric($ts_no) && $ts_no == round($ts_no, 2) && in_array($_COOKIE['textsize'], $textsize_allowed_values) && $_COOKIE['textsize'] != $ts_no && $ts_no_error == FALSE) {
+  if (is_numeric($ts_no) && $ts_no == round($ts_no, 2) && isset($_COOKIE['textsize']) && in_array($_COOKIE['textsize'], $textsize_allowed_values) && $_COOKIE['textsize'] != $ts_no && $ts_no_error == FALSE) {
     if ($ts_js == 0 || $ts_js == 1) {
       $_SESSION['textsize'] = $ts_no;
     }
diff --git a/jquery.textsize.js b/jquery.textsize.js
index ccda86f..d2d8d36 100755
--- a/jquery.textsize.js
+++ b/jquery.textsize.js
@@ -6,13 +6,13 @@
     $("a.ts_normal").attr({ href: "#" });
     var tsCurrent = textsizeNormal;
     if ($.cookie("textsize")) {
-      var tsCurrent = $.cookie("textsize");
+      tsCurrent = $.cookie("textsize");
     }
+    textsize_set(tsCurrent);
     // add element styles for animation
     if (textsizeAnimate == 1 && tsCurrent != textsizeNormal) {
       $(textsizeElement + textsizeElementClass).css({ fontSize: tsCurrent + "%" });
     }
-
     // functions
     // calculate the size for display
     function textsize_calc_display(ts_v) {
@@ -123,9 +123,20 @@
       else if (tsChange == true) {
           $("#textsize_current").removeClass('error');
       }
-      // change and save the text size
-      $.cookie('textsize', tsNext, { expires: textsizeCookieExpires, path: textsizeCookieDomain});
-      textsize_add_bc(ts_bc = tsNext);
+      textsize_set(tsNext, tsTextAbbr);
+      return false;
+    }
+    // switch
+    function textsize_set(tsNext, tsTextAbbr) {
+      // change and save the text size. If the tezt size is back to normal,
+      // delete the cookie.
+      if (tsNext == textsizeNormal) {
+        $.cookie('textsize', null);
+      }
+      else {
+        $.cookie('textsize', tsNext, { expires: textsizeCookieExpires, path: textsizeCookieDomain});
+      }
+      textsize_add_bc(tsNext);
       $("#textsize_current").attr({ title: textsizeCurrentText + ": " + textsize_calc_display(tsNext) + "%"});
       if (textsizeAnimate == 0) {
         $(textsizeElement + textsizeElementClass).css("font-size", tsNext + "%");
@@ -137,25 +148,25 @@
           $("#textsize_current").empty().append(tsTextAbbr + textsize_calc_display(tsNext) + "%").fadeIn(textsizeAnimateDuration);
         });
       }
-     return false;
     }
+
     // form
     function textsize_form() {
       textsize_change(mode = "form");
     }
     
     // jQuery code
-    $("a.textsize_increase[href=#]").click(
+    $("a.ts_increase[href=#]").click(
       function (){
         textsize_change(mode = "increase");
       }
     );
-    $("a.textsize_decrease[href=#]").click(
+    $("a.ts_decrease[href=#]").click(
       function (){
         textsize_change(mode = "decrease");
       }
     );
-    $("a.textsize_normal[href=#]").click(
+    $("a.ts_normal[href=#]").click(
       function (){
         textsize_change(mode = "normal");
       }
diff --git a/textsize.install b/textsize.install
index 8f32f23..5cd2033 100644
--- a/textsize.install
+++ b/textsize.install
@@ -43,4 +43,5 @@ function textsize_uninstall() {
   variable_del('textsize_display_current_text_value');
   variable_del('textsize_display_list_inline');
   variable_del('textsize_display_current_inline');
+  variable_del('textsize_set_anonymous_session');
 }
diff --git a/textsize.module b/textsize.module
index 5b5ae06..4f504c5 100755
--- a/textsize.module
+++ b/textsize.module
@@ -106,13 +106,10 @@ function textsize_block_view($delta = '') {
   }
   $block['content'] = $block_content;
   if ($textsize_javascript == 0 || $textsize_javascript == 1) {
-    if (!isset($_SESSION['textsize'])) {
+    if (!isset($_SESSION['textsize']) && _textsize_set_session()) {
       $_SESSION['textsize'] = $textsize_normal;
     }
   }
-  if (!isset($_COOKIE['textsize'])) {
-    setcookie("textsize", $textsize_normal, time()+$textsize_cookie_expires, $textsize_cookie_domain, "");
-  }
   if (user_access('access textsize content')) {
     $block['subject'] = $block_title;
     $block['content'] = $block_content;
@@ -366,3 +363,10 @@ function textsize_init() {
   // Add jQuery Cookie Plugin for for anonymous users .
   drupal_add_js('misc/jquery.cookie.js');
 }
+
+/**
+ * Helper function to set determine if a session value should be set.
+ */
+function _textsize_set_session() {
+  return variable_get('textsize_set_anonymous_session', 1) || !user_is_anonymous();
+}
