diff --git a/equalheights.admin.inc b/equalheights.admin.inc
index e5ef61b..773d48c 100644
--- a/equalheights.admin.inc
+++ b/equalheights.admin.inc
@@ -36,6 +36,13 @@ function equalheights_admin($form, $form_state) {
       $form['equalheights_classes'][$index] = equalheights_settings_fields();
     }
   }
+  $form['equalheights_browser_min_width'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Browser minimum width'),
+    '#size' => 4,
+    '#default_value' => variable_get('equalheights_browser_min_width', 0),
+    '#description' => t('Set the minimum browser width for the script to execute. Default is 0.'),
+  );
   $form['actions']['more'] = array(
     '#type' => 'submit',
     '#value' => t('Add row'),
@@ -88,6 +95,7 @@ function equalheights_admin_submit($form, &$form_state) {
     }
   }
   variable_set('equalheights_css_classes', $settings);
+  variable_set('equalheights_browser_min_width', $form_state['values']['equalheights_browser_min_width']);
   drupal_set_message(t('Settings have been set.'));
 }
 
diff --git a/equalheights.install b/equalheights.install
index c9d0584..bf41cdb 100644
--- a/equalheights.install
+++ b/equalheights.install
@@ -51,4 +51,18 @@ function equalheights_update_7000() {
       variable_set('equalheights_css_classes', $settings);
     }
   }
+}
+
+/*
+ * Implements hook_update().
+ *
+ * Transform classes into elClasses
+ */
+function equalheights_update_7001() {
+  $equalheightsclasses = variable_get('equalheights_css_classes', array());
+  foreach ($equalheightsclasses as $key => $settings) {
+    $equalheightsclasses[$key]['elClass'] = $settings['class'];
+    unset($equalheightsclasses[$key]['class']);
+  }
+  variable_set('equalheights_css_classes', $equalheightsclasses);
 }
\ No newline at end of file
diff --git a/equalheights.js b/equalheights.js
index 3c6b143..cf340bf 100644
--- a/equalheights.js
+++ b/equalheights.js
@@ -1,12 +1,25 @@
 (function($) {
 	Drupal.behaviors.equalHeightsModule = {
-	  attach: function (context, settings) {
-	  var eqClass = Drupal.settings.equalHeightsModule;
-    if (eqClass) {
-	  //var overflow = Drupal.settings.equalHeightsModule.overflow;
-	    $.each(eqClass, function(eqClass, setting) {
-		  $('.' + setting.elClass).equalHeights(setting.minheight, setting.maxheight).css('overflow', setting.overflow)});
-	  }
-    }
+    	attach: function (context, settings) {
+			var eqClass = Drupal.settings.equalHeightsModule.eq_classes;
+			var eqBrowserMinWidth = Drupal.settings.equalHeightsModule.browser_min_width;
+			if (eqClass) {
+				if ($(window).width() >= eqBrowserMinWidth) {
+					$(window).load(function() {
+						$.each(eqClass, function(eqClass, setting) {
+							$('.' + setting.elClass).equalHeights(setting.minheight, setting.maxheight).css('overflow', setting.overflow);
+						});
+					});
+				}
+				$(window).resize(function(){
+					var resize = ($(window).width() >= eqBrowserMinWidth);
+					$.each(eqClass, function(eqClass, setting) {
+						var target = $('.' + setting.elClass);
+						target.height('auto');
+						if (resize) target.equalHeights(setting.minheight, setting.maxheight).css('overflow', setting.overflow);
+					});
+				});
+			}
+		}
 	}
 })(jQuery);
\ No newline at end of file
diff --git a/equalheights.module b/equalheights.module
index 7d40c42..dfda60b 100644
--- a/equalheights.module
+++ b/equalheights.module
@@ -51,11 +51,15 @@ function equalheights_init() {
   drupal_add_library('equalheights', 'jquery-equalheights', TRUE);
 
   $equalheightsclasses = variable_get('equalheights_css_classes', array());
+  $browserminwidth = variable_get('equalheights_browser_min_width', 0);
   if (!empty($equalheightsclasses)) {
 	  // Only load settings once
     static $loaded = FALSE;
   	if (!$loaded) {
-      drupal_add_js(array('equalHeightsModule' => $equalheightsclasses), 'setting');
+      drupal_add_js(array('equalHeightsModule' => array(
+        'eq_classes'        => $equalheightsclasses,
+        'browser_min_width' => $browserminwidth,
+      )), 'setting');
       $loaded = TRUE;
 	  }
   }
