diff --git a/support.module b/support.module
index ff471a8..9a80e4c 100644
--- a/support.module
+++ b/support.module
@@ -1503,20 +1503,20 @@ function support_mail_tokens($account, $language, $nid, $comment, $suppress) {
     '!site' => variable_get('site_name', 'Drupal'),
     '!uri' => $base_url,
     '!uri_brief' => preg_replace('!^https?://!', '', $base_url),
-    '!uri_login' => url('user/register', array('absolute' => TRUE, 'alias' => variable_get('support_use_aliased_urls', TRUE))),
+    '!uri_login' => url('user/register', array('absolute' => TRUE, 'alias' => !variable_get('support_use_aliased_urls', TRUE))),
     '!mailto' => $account->mail,
     '!date' => format_date(REQUEST_TIME, 'medium', '', NULL, $language->language),
     '!ticket_subject' => check_plain($node->title),
     '!ticket_body' => $suppress ? t('The text of this ticket was manually suppressed.  You must view the ticket online to see it.') . "<br />\n" : $body . _support_mail_list_attachments($node, $comment),
-    '!ticket_url' => url("node/$nid", array('absolute' => TRUE, 'language' => $language, 'fragment' => "comment-$cid", 'alias' => variable_get('support_use_aliased_urls', TRUE))),
-    '!update_url' => url("node/$nid", array('absolute' => TRUE, 'language' => $language, 'fragment' => "comment-form", 'alias' => variable_get('support_use_aliased_urls', TRUE))),
+    '!ticket_url' => url("node/$nid", array('absolute' => TRUE, 'language' => $language, 'fragment' => "comment-$cid", 'alias' => !variable_get('support_use_aliased_urls', TRUE))),
+    '!update_url' => url("node/$nid", array('absolute' => TRUE, 'language' => $language, 'fragment' => "comment-form", 'alias' => !variable_get('support_use_aliased_urls', TRUE))),
     '!update' => $suppress ? t('The text of this ticket update was manually suppressed.  You must view the ticket online to see the update.') . "<br />\n" : check_markup((isset($comment->language) && isset($comment->comment_body[$comment->language][0])) ? $comment->comment_body[$comment->language][0]['value'] : '') . _support_mail_list_attachments($node, $comment),
     '!state' => ((isset($previous->state) && $previous->state != $node->state) ? _support_state($previous->state) . ' -> ' : '') . _support_state($node->state),
     '!priority' => ((isset($previous->priority) && $previous->priority != $node->priority) ? _support_priorities($previous->priority) . ' -> ' : '') . _support_priorities($node->priority),
     '!assigned_username' => !empty($assigned) ? $assigned->name : '',
     '!assigned_realname' => !empty($assigned) ? theme('username', array('account' => $assigned)) : '',
-    '!unsubscribe_ticket' => url("support/$nid/unsubscribe/$account->uid/$ticket_unsubscribe_key", array('absolute' => TRUE, 'language' => $language, 'alias' => variable_get('support_use_aliased_urls', TRUE))),
-    '!unsubscribe_all' => url("support/all/unsubscribe/$account->uid/$all_unsubscribe_key", array('absolute' => TRUE, 'language' => $language, 'alias' => variable_get('support_use_aliased_urls', TRUE))),
+    '!unsubscribe_ticket' => url("support/$nid/unsubscribe/$account->uid/$ticket_unsubscribe_key", array('absolute' => TRUE, 'language' => $language, 'alias' => !variable_get('support_use_aliased_urls', TRUE))),
+    '!unsubscribe_all' => url("support/all/unsubscribe/$account->uid/$all_unsubscribe_key", array('absolute' => TRUE, 'language' => $language, 'alias' => !variable_get('support_use_aliased_urls', TRUE))),
   );
   if (!empty($account->password)) {
     $tokens['!password'] = $account->password;
@@ -2590,7 +2590,10 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
       user_access('can administer state')) {
     $form['support'] = array(
       '#type' => 'fieldset',
-      '#prefix' => '<div class="container-inline">',
+			'#attributes' => array(
+				'class' => array('support-properties-edit-form')
+			),
+      '#prefix' => '<div class="support-properties container-inline">',
       '#suffix' => '</div>',
       '#title' => t('Ticket properties'),
     );
@@ -2618,6 +2621,9 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
     }
     $form['support']['state'] = array(
       '#type' => 'select',
+			'#attributes' => array(
+				'class' => array('support-properties-state')
+			),
       '#title' => t('State'),
       '#options' => _support_states(FALSE, $state),
       '#default_value' => $default,
@@ -2633,6 +2639,9 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
   else {
     $form['support']['priority'] = array(
       '#type' => 'select',
+			'#attributes' => array(
+				'class' => array('support-properties-priority')
+			),
       '#prefix' => '&nbsp;&nbsp;',
       '#title' => t('Priority'),
       '#options' => _support_priorities(),
@@ -2673,6 +2682,9 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
   else {
     $form['support']['client'] = array(
       '#type' => 'select',
+			'#attributes' => array(
+				'class' => array('support-properties-client')
+			),
       '#required' => TRUE,
       '#prefix' => '&nbsp;&nbsp;',
       '#title' => t('Client'),
@@ -2688,7 +2700,7 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
 
   // Create wrapper group for elements dependent on client change.
   $form['support']['client_dependencies'] = array(
-    '#prefix' => '<div id="replace_support_client_dependencies">',
+    '#prefix' => '<div id="support-client-replace-dependencies">',
     '#suffix' => '</div>',
   );
 
@@ -2716,6 +2728,9 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
       }
       $form['support']['client_dependencies']['assigned'] = array(
         '#type' => 'textfield',
+				'#attributes' => array(
+					'class' => array('support-properties-assigned')
+				),
         '#prefix' => '&nbsp;&nbsp;',
         '#title' => t('Assigned'),
         '#autocomplete_path' => 'support/autocomplete/assigned/' . $node->client,
@@ -2727,6 +2742,9 @@ function _support_status_form_attach(&$form, &$form_state, $node) {
       $assigned = isset($node->assigned) ? $node->assigned : 0;
       $form['support']['client_dependencies']['assigned'] = array(
         '#type' => 'select',
+				'#attributes' => array(
+					'class' => array('support-properties-assigned')
+				),
         '#prefix' => '&nbsp;&nbsp;',
         '#title' => t('Assigned'),
         '#options' => $options,
@@ -2847,6 +2865,9 @@ function _support_subscribe_form_attach(&$form, &$form_state, $node) {
   if (variable_get('support_notifications', TRUE)) {
     $form['subscribe'] = array(
       '#type' => 'fieldset',
+			'#attributes' => array(
+				'class' => array('support-subscribe-form')
+			),
       '#title' => t('Notifications'),
       '#collapsible' => TRUE,
       '#collapsed' => FALSE,
@@ -2862,7 +2883,12 @@ function _support_subscribe_form_attach(&$form, &$form_state, $node) {
     }
     $form['subscribe']['notification'] = array(
       '#type' => 'checkbox',
+			'#attributes' => array(
+				'class' => array('support-subscribe-notification')
+			),
       '#title' => t('Subscribe'),
+      '#prefix' => '<div class="form-item form-type-checkbox support-subcribe-notification-check">',
+      '#suffix' => '</div>',
       '#description' => t('Receive email notifications when this ticket is updated.'),
       '#default_value' => $notification,
       '#disabled' => variable_get('support_autosubscribe_creator', FALSE) || (variable_get('support_autosubscribe_assigned', FALSE) && isset($node->assigned) && ($node->assigned == $user->uid)),
@@ -2870,7 +2896,12 @@ function _support_subscribe_form_attach(&$form, &$form_state, $node) {
     if (user_access('can suppress notification')) {
       $form['subscribe']['suppress'] = array(
         '#type' => 'checkbox',
+				'#attributes' => array(
+					'class' => array('support-subscribe-suppress')
+				),
         '#title' => t('Suppress notification'),
+	      '#prefix' => '<div class="form-item form-type-checkbox support-subcribe-notification-suppress">',
+	      '#suffix' => '</div>',
         '#description' => t('By checking this box you will prevent notification emails from being sent for this ticket update.  It is recommended that you check this box if you are adding sensitive information such as passwords which should not be mailed out in plain text.%admin', array('%admin' => user_access('administer support') ? t(' Users with "administer support" permission will still receive email notifications telling them the ticket was updated but with the body text suppressed; no notifications will be sent to users without "administer support" permissions.') : '')),
         '#default_value' => 0,
       );
@@ -2878,6 +2909,9 @@ function _support_subscribe_form_attach(&$form, &$form_state, $node) {
     if (user_access('administer support') || user_access('can subscribe other users to notifications')) {
       $form['subscribe']['subscribed'] = array(
         '#type' => 'fieldset',
+				'#attributes' => array(
+					'class' => array('support-subscribe-subscribed')
+				),
         '#title' => t('Subscribed'),
         '#collapsible' => TRUE,
         '#collapsed' => TRUE,
@@ -2901,6 +2935,9 @@ function _support_subscribe_form_attach(&$form, &$form_state, $node) {
         }
         $form['subscribe']['subscribed']['subscribed_users'] = array(
           '#type' => 'textfield',
+					'#attributes' => array(
+						'class' => array('support-subscribe-subscribed-users')
+					),
           '#autocomplete_path' => 'support/autocomplete/autosubscribe/' . $node->client,
           '#default_value' => $default,
           '#description' => t('Enter a comma separated list of users that should receive notifications when this ticket is updated.'),
@@ -2951,6 +2988,9 @@ function _support_subscribe_form_attach(&$form, &$form_state, $node) {
           $notifications[] = $uid;
           $form['subscribe']['subscribed']["notify-$uid"] = array(
             '#type' => 'checkbox',
+						'#attributes' => array(
+							'class' => array('support-subscribe-notify-$uid')
+						),
             '#title' => check_plain($name),
             '#default_value' => $enabled,
             '#disabled' => (($uid == $user->uid || isset($autosubscribed[$uid]) || $disabled) && $enabled) ? TRUE : FALSE,
@@ -3241,6 +3281,9 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
   }
   $form['header'] = array(
     '#type' => 'value',
+		'#attributes' => array(
+			'class' => array('support-header-form')
+		),
     '#value' => array(
       $checkboxes,
       $headers[SUPPORT_SORT_NID],
@@ -3327,10 +3370,10 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
       $comments .= '&nbsp;(' . l(format_plural($new, '1 new', '@count new'), "node/$ticket->nid", array('query' => comment_new_page_count($node->comment_count, $new, $node), 'fragment' => 'new')) . ')';
     }
     $tickets[$ticket->nid] = '';
-    $form['id'][$ticket->nid] = array('#markup' => l($ticket->nid, "node/$ticket->nid", array('attributes' => array('class' => array('ticket-id')))));
-    $form['title'][$ticket->nid] = array('#markup' => l(_support_truncate($ticket->title), "node/$ticket->nid", array('attributes' => array('class' => array('ticket-title')))));
-    $form['updated'][$ticket->nid] = array('#markup' => format_date($ticket->last_updated, 'short', array('attributes' => array('class' => array('ticket-updated')))));
-    $form['reported'][$ticket->nid] = array('#markup' => l(_support_truncate($account->name, 24), "user/$account->uid", array('attributes' => array('class' => array('ticket-reported')))));
+    $form['id'][$ticket->nid] = array('#markup' => l($ticket->nid, "node/$ticket->nid", array('attributes' => array('class' => array('support-ticket-id')))));
+    $form['title'][$ticket->nid] = array('#markup' => l(_support_truncate($ticket->title), "node/$ticket->nid", array('attributes' => array('class' => array('support-ticket-title')))));
+    $form['updated'][$ticket->nid] = array('#markup' => format_date($ticket->last_updated, 'short', array('attributes' => array('class' => array('support-ticket-updated')))));
+    $form['reported'][$ticket->nid] = array('#markup' => l(_support_truncate($account->name, 24), "user/$account->uid", array('attributes' => array('class' => array('support-ticket-reported')))));
     // Assigned to
     if ((user_access('edit multiple tickets') && user_access('can assign tickets to any user')) || user_access('administer support')) {
       $node = node_load($ticket->nid);
@@ -3353,7 +3396,7 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
           '#autocomplete_path' => 'support/autocomplete/assigned/' . $ticket->client,
           '#default_value' => $assigned,
           '#size' => '15',
-          '#attributes' => array('class' => array('ticket-assigned')),
+          '#attributes' => array('class' => array('support-ticket-assigned')),
         );
       }
       else {
@@ -3361,13 +3404,13 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
           '#type' => 'select',
           '#options' => $options,
           '#default_value' => isset($ticket->assigned) ? $ticket->assigned : 0,
-          '#attributes' => array('class' => array('ticket-assigned')),
+          '#attributes' => array('class' => array('support-ticket-assigned')),
         );
       }
     }
     else {
       $form['assigned']["assigned-$ticket->nid"] = array(
-        '#markup' => l(_support_truncate($assigned->name, 24), "user/$assigned->uid", array('attributes' => array('class' => array('ticket-assigned')))),
+        '#markup' => l(_support_truncate($assigned->name, 24), "user/$assigned->uid", array('attributes' => array('class' => array('support-ticket-assigned')))),
       );
     }
     // State
@@ -3377,13 +3420,13 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
         '#type' => 'select',
         '#options' => $states,
         '#default_value' => $ticket->state,
-        '#attributes' => array('class' => array('ticket-state')),
+        '#attributes' => array('class' => array('support-ticket-state')),
       );
     }
     else {
       $form['state']["state-$ticket->nid"] = array(
         '#markup' => _support_state($ticket->state),
-        '#attributes' => array('class' => array('ticket-state')),
+        '#attributes' => array('class' => array('support-ticket-state')),
       );
     }
     // Priority
@@ -3392,21 +3435,21 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
         '#type' => 'select',
         '#options' => _support_priorities(),
         '#default_value' => $ticket->priority,
-        '#attributes' => array('class' => array('ticket-priority')),
+        '#attributes' => array('class' => array('support-ticket-priority')),
       );
     }
     else {
       $form['priority']["priority-$ticket->nid"] = array(
         '#markup' => _support_priorities($ticket->priority),
-        '#attributes' => array('class' => array('ticket-priority')),
+        '#attributes' => array('class' => array('support-ticket-priority')),
       );
     }
     $form['updates'][$ticket->nid] = array(
       '#markup' => $comments,
-      '#attributes' => array('class' => array("state-$ticket->state", "priority-$ticket->priority")),
+      '#attributes' => array('class' => array("support-state-$ticket->state", "support-priority-$ticket->priority")),
     );
     $form['class'][$ticket->nid] = array(
-      '#value' => array("state-$ticket->state", "priority-$ticket->priority"),
+      '#value' => array("state-$ticket->state", "support-priority-$ticket->priority"),
     );
   }
   $form['tickets'] = array(
@@ -3430,6 +3473,9 @@ function support_page_form($form, &$form_state, $client = NULL, $state = NULL) {
     }
     $form['submit'] = array(
       '#type' => 'submit',
+			'#attributes' => array(
+				'class' => array("support-ticket-submit")
+			),
       '#value' => t('Update ticket'),
     );
   }
