diff --git a/multiselect.module b/multiselect.module
index 14304be..46a064a 100644
--- a/multiselect.module
+++ b/multiselect.module
@@ -372,14 +372,24 @@ function multiselect_theme() {
  */
 function theme_multiselect($variables) {
   $element = $variables['element'];
-  element_set_attributes($element, array('id', 'name', 'size', 'multiple', 'default_value', 'required'));
+
+  $attrs = array('id', 'name', 'size', 'multiple', 'default_value');
+  if (!empty($element['#required'])) {
+    $attrs[] = 'required';
+  }
+  element_set_attributes($element, $attrs);
+
   _form_set_class($element, array('form-multiselect'));
   $options = $element['#options']; // All available options as defined by the element
   $items = $element['#default_value']; // All selected options are referred to as "items".
   $element['#field_name'] = $element['#name']; // CCK calls the #name "#field_name", so let's duplicate that..
   $required = $element['#required'];
 
-  $widget = _multiselect_build_widget_code($options, $items, $element, $required);
+  $path = drupal_get_path('module', 'multiselect');
+  drupal_add_js($path . '/multiselect.js');
+  drupal_add_css($path . '/multiselect.css');
+
+ $widget = _multiselect_build_widget_code($options, $items, $element, $required);
 
   // Add a couple of things into the attributes.
   $element['#attributes']['class'][] = $widget['selfield'];
