diff --git a/django/contrib/admin/static/admin/css/base.css b/django/contrib/admin/static/admin/css/base.css
index 89f2225..0567960 100644
--- a/django/contrib/admin/static/admin/css/base.css
+++ b/django/contrib/admin/static/admin/css/base.css
@@ -309,77 +309,82 @@ tr.alt {
 
 /* SORTABLE TABLES */
 
+thead th {
+    padding: 0;
+    line-height: normal;
+}
+
 thead th a:link, thead th a:visited {
     color: #666;
-    display: block;
 }
 
 thead th.sorted {
     background: #c5c5c5 url(../img/nav-bg-selected.gif) top left repeat-x;
 }
 
-table thead th.sorted a {
-    padding-right: 13px;
+table thead th .text {
+    padding: 2px 5px;
+}
+
+table thead th .text a {
+    display: block;
+    cursor: pointer;
+}
+
+table thead th.sortable:hover {
+    background: white url(../img/nav-bg-reverse.gif) 0 -5px repeat-x;
 }
 
-table thead th.ascending a {
-    background: url(../img/arrow-up.gif) right .4em no-repeat;
+thead th.sorted a.sortremove {
+    visibility: hidden;
 }
 
-table thead th.descending a {
-    background: url(../img/arrow-down.gif) right .4em no-repeat;
+table thead th.sorted:hover a.sortremove {
+    visibility: visible;
 }
 
-table thead th.sorted a span.text {
-   display: block;
-   float: left;
-   cursor: pointer; /* IE needs this */
+table thead th.sorted .sortoptions {
+    display: block;
+    padding: 4px 5px 0 5px;
+    float: right;
+    text-align: right;
 }
 
-table thead th.sorted a span.sortpos {
-   display: block;
-   float: right;
-   font-size: .6em;
-   text-align: right;
-   cursor: pointer; /* IE needs this */
+table thead th.sorted .sortposition {
+    font-size: .8em;
+    min-width: 12px;
+    text-align: center;
+    vertical-align: top;
 }
 
-table thead th.sorted a img {
-   vertical-align: top;
+table thead th.sorted .sortoptions a {
+    width: 14px;
+    height: 12px;
+    display: inline-block;
 }
 
-table thead th.sorted a span.clear {
-   display: block;
-   clear: both;
+table thead th.sorted .sortoptions a.sortremove {
+    background: url(../img/sorting-icons.gif) -4px -5px no-repeat;
 }
 
-#sorting-popup-div {
-    display: none;
-    position: absolute;
-    background-color: white;
-    border: 1px solid #ddd;
-    z-index: 2000; /* more than filters on right */
+table thead th.sorted .sortoptions a.sortremove:hover {
+    background: url(../img/sorting-icons.gif) -4px -27px no-repeat;
 }
 
-#sorting-popup-div table {
-    border-right: 0px;
-    border-left: 0px;
+table thead th.sorted .sortoptions a.ascending {
+    background: url(../img/sorting-icons.gif) -5px -50px no-repeat;
 }
 
-#sorting-popup-div .reset {
-    text-align: center;
+table thead th.sorted .sortoptions a.ascending:hover {
+    background: url(../img/sorting-icons.gif) -5px -72px no-repeat;
 }
 
-#sorting-popup-div .cancel {
-    font-size: 10px;
-    background: #e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x;
-    border-top: 1px solid #ddd;
-    text-align: center;
+table thead th.sorted .sortoptions a.descending {
+    background: url(../img/sorting-icons.gif) -5px -94px no-repeat;
 }
 
-#sorting-popup-div .cancel a {
-    width: 100%;
-    display: block;
+table thead th.sorted .sortoptions a.descending:hover {
+    background: url(../img/sorting-icons.gif) -5px -115px no-repeat;
 }
 
 /* ORDERABLE TABLES */
diff --git a/django/contrib/admin/static/admin/css/rtl.css b/django/contrib/admin/static/admin/css/rtl.css
index c32fcf0..76a439d 100644
--- a/django/contrib/admin/static/admin/css/rtl.css
+++ b/django/contrib/admin/static/admin/css/rtl.css
@@ -80,22 +80,7 @@ div.breadcrumbs {
 
 /* SORTABLE TABLES */
 
-
-table thead th.sorted a {
-    padding-left: 13px;
-    padding-right: 0px;
-}
-
-table thead th.ascending a,
-table thead th.descending a {
-    background-position: left;
-}
-
-table thead th.sorted a span.text {
-   float: right;
-}
-
-table thead th.sorted a span.sortpos {
+table thead th.sorted .sortoptions {
    float: left;
 }
 
@@ -260,4 +245,4 @@ div.colM {
 
 .submit-row input {
     float: left;
-}
\ No newline at end of file
+}
diff --git a/django/contrib/admin/static/admin/img/arrow-down.gif b/django/contrib/admin/static/admin/img/arrow-down.gif
deleted file mode 100644
index a967b9fd5563a0fc2f5fde8ec0f7de3fc8fbc5a9..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/django/contrib/admin/static/admin/img/arrow-up.gif b/django/contrib/admin/static/admin/img/arrow-up.gif
deleted file mode 100644
index 3fe4851399a37337891ccf5452ee5d59bbedeec7..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/django/contrib/admin/static/admin/img/icon_cog.gif b/django/contrib/admin/static/admin/img/icon_cog.gif
deleted file mode 100644
index e390ef2ef5a00858c6dda1974a1f334eddff46be..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/django/contrib/admin/static/admin/img/sorting-icons.gif b/django/contrib/admin/static/admin/img/sorting-icons.gif
new file mode 100644
index 0000000000000000000000000000000000000000..8d5bada85a0205e20845e810234f99c3d60fc2a3
GIT binary patch
diff --git a/django/contrib/admin/templates/admin/change_list_results.html b/django/contrib/admin/templates/admin/change_list_results.html
index b1db647..861981a 100644
--- a/django/contrib/admin/templates/admin/change_list_results.html
+++ b/django/contrib/admin/templates/admin/change_list_results.html
@@ -11,15 +11,17 @@
 <tr>
 {% for header in result_headers %}
 <th scope="col" {{ header.class_attrib }}>
-  {% if header.sortable %}<a href="{{ header.url_primary }}">{% endif %}
-  <span class="text">{{ header.text|capfirst }}</span>
-  {% if header.sortable %}
-    {% if header.sort_pos > 0 %}<span class="sortpos">
-      {% if header.sort_pos == 1 %}<img id="primary-sort-icon" src="{% static "admin/img/icon_cog.gif" %}" alt="" />&nbsp;{% endif %}
-      {{ header.sort_pos }}</span>
-    {% endif %}
-    <span class="clear"></span></a>
-  {% endif %}
+   {% if header.sortable %}
+     {% if header.sort_pos > 0 %}
+       <div class="sortoptions">
+         <a class="sortremove" href="{{ header.url_remove }}" title="{% trans "Clear from sorting" %}"></a>
+         <span class="sortposition">{{ header.sort_pos }}</span>
+         <a href="{{ header.url_toggle }}" class="toggle {% if header.ascending %}ascending{% else %}descending{% endif %}" title="{% trans "Toggle sorting" %}"></a>
+       </div>
+     {% endif %}
+   {% endif %}
+   <div class="text">{% if header.sortable %}<a href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}{{ header.text|capfirst }}{% endif %}</div>
+   <div class="clear"></div>
 </th>{% endfor %}
 </tr>
 </thead>
@@ -33,90 +35,4 @@
 </tbody>
 </table>
 </div>
-
-{# Sorting popup: #}
-<div id="sorting-popup-div">
-<table>
-  <caption>
-   {% trans "Sorting by:" %}
-  </caption>
-  <tbody>
-  {% for header in result_headers|dictsort:"sort_pos" %}
-    {% if header.sort_pos > 0 %}
-    <tr>
-      <td>{{ header.sort_pos }}</td>
-      <td>{{ header.text|capfirst }}</td>
-      <td>{% if header.ascending %}{% trans "ascending" %}{% else %}{% trans "descending" %}{% endif %}</td>
-      <td><a href="{{ header.url_toggle }}">{% trans "toggle" %}</a></td>
-      <td><a href="{{ header.url_remove }}">{% trans "remove" %}</a></td>
-    </tr>
-    {% endif %}
-  {% endfor %}
-  </tbody>
-</table>
-<div class="reset"><a href="{{ reset_sorting_url }}">{% trans "Reset sorting" %}</a></div>
-<div class="cancel"><a href="javascript:void" id="sorting-popup-dismiss">{% trans "Cancel" %}</a></div>
-</div>
-<script type="text/javascript">
-<!--
-(function($) {
-    $(document).ready(function() {
-        var popup = $('#sorting-popup-div');
-        var img = $('#primary-sort-icon');
-        /* These next lines seems necessary to prime the popup: */
-        popup.offset({left:0, top:-1000});
-        popup.show();
-        if ($.browser.msie) {
-            // Can't find a way to make IE autosize the div.
-            popup.width(300);
-        }
-        var popupWidth = popup.width();
-        popup.hide();
-
-        var visible = false;
-
-        var escHandler = function(ev) {
-            if (ev.which == 27) {
-                hidePopup();
-                ev.preventDefault();
-            }
-        };
-
-        var showPopup = function() {
-            var pos = img.offset();
-            pos.top += img.height();
-            if (pos.left + popupWidth >
-                $(window).width()) {
-                pos.left -= popupWidth;
-            }
-            popup.show();
-            popup.offset(pos);
-            visible = true;
-            $(document).bind('keyup', escHandler);
-        };
-
-        var hidePopup = function() {
-            popup.hide();
-            visible = false;
-            $(document).unbind('keyup', escHandler);
-        };
-
-        $('#primary-sort-icon').click(function(ev) {
-            ev.preventDefault();
-            if (visible) {
-                hidePopup();
-            } else {
-                showPopup();
-            }
-        });
-
-        $('#sorting-popup-dismiss').click(function(ev) {
-            hidePopup();
-            ev.preventDefault()
-        });
-    });
-})(django.jQuery);
-//-->
-</script>
-
 {% endif %}
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index 0f5eafc..125517d 100644
--- a/django/contrib/admin/templatetags/admin_list.py
+++ b/django/contrib/admin/templatetags/admin_list.py
@@ -83,7 +83,6 @@ def result_headers(cl):
     """
     ordering_field_columns = cl.get_ordering_field_columns()
     for i, field_name in enumerate(cl.list_display):
-        admin_order_field = None
         text, attr = label_for_field(field_name, cl.model,
             model_admin = cl.model_admin,
             return_attr = True
@@ -106,7 +105,7 @@ def result_headers(cl):
                 continue
 
         # OK, it is sortable if we got this far
-        th_classes = []
+        th_classes = ['sortable']
         order_type = ''
         new_order_type = 'asc'
         sort_pos = 0
