Index: htdocs/css/fivestarvote.css
===================================================================
--- htdocs/css/fivestarvote.css	(revision 7634)
+++ htdocs/css/fivestarvote.css	(working copy)
@@ -3,21 +3,21 @@
 * http://www.komodomedia.com/blog/2007/01/css-star-rating-redux/
 */

-#fivestarvotes .star-rating,
-#fivestarvotes .star-rating li a.item:hover,
-#fivestarvotes .star-rating li a.item:active,
-#fivestarvotes .star-rating li a.item:focus,
-#fivestarvotes .star-rating li.current-rating {
+#ctxtnav #fivestarvotes,
+#fivestarvotes li a.item:hover,
+#fivestarvotes li a.item:active,
+#fivestarvotes li a.item:focus,
+#fivestarvotes li.current-rating {
     background: url(rating.png) left -1000px repeat-x;
 }
-#fivestarvotes .star-rating li a.item,
-#fivestarvotes .star-rating li.current-rating {
+#fivestarvotes li a.item,
+#fivestarvotes li.current-rating {
     padding: 0;
     margin: 0;
     border-right: none;
     background-color: transparent;
 }
-#fivestarvotes .star-rating {
+#ctxtnav #fivestarvotes {
     position:relative;
     width: 80px;
     height: 18px;
@@ -30,12 +30,12 @@
     border: none;
     text-align: left;
 }
-#fivestarvotes .star-rating li {
+#fivestarvotes li {
     display: inline;
     border: none;
 }
-#fivestarvotes .star-rating li a,
-#fivestarvotes .star-rating li.current-rating {
+#fivestarvotes li a,
+#fivestarvotes li.current-rating {
     position:absolute;
     top:0;
     left:0;
@@ -47,34 +47,34 @@
     border: none;
     background-color: transparent;
 }
-#fivestarvotes.active .star-rating li a.item:hover {
+#fivestarvotes.active li a.item:hover {
     background-position: 0 -19px;
 }
-#fivestarvotes .star-rating li a.item:active,
-#fivestarvotes .star-rating li a.item:focus {
+#fivestarvotes li a.item:active,
+#fivestarvotes li a.item:focus {
     /*background-position: 0 1px;*/
 }
-#fivestarvotes .star-rating li a.one-star {
+#fivestarvotes li a.one-star {
     width:20%;
     z-index:6;
 }
-#fivestarvotes .star-rating li a.two-star{
+#fivestarvotes li a.two-star{
     width:40%;
     z-index:5;
 }
-#fivestarvotes .star-rating li a.three-star{
+#fivestarvotes li a.three-star{
     width:60%;
     z-index:4;
 }
-#fivestarvotes .star-rating li a.four-star{
+#fivestarvotes li a.four-star{
     width:80%;
     z-index:3;
 }
-#fivestarvotes .star-rating li a.five-star{
+#fivestarvotes li a.five-star{
     width:100%;
     z-index:2;
  }
-#fivestarvotes .star-rating li.current-rating{
+#fivestarvotes li.current-rating{
     z-index:1;
     background-position: 0 1px;
 }
Index: __init__.py
===================================================================
--- __init__.py	(revision 7634)
+++ __init__.py	(working copy)
@@ -165,22 +165,20 @@
         style = "width: %s%s" % (percent, sign)
         li = tag.li(str, class_='current-rating', style=style)
         els.append(li)
-        for i in range(1, 6):
-            className = "item %s-star" % names[i]
-            href = "#"
-            if 'VOTE_MODIFY' in req.perm and get_reporter_id(req) != 'anonymous':
-                href = req.href.fivestarvote(i, resource)
-                add_script(req, 'fivestarvote/js/fivestarvote.js', mimetype='text/javascript')
-            a = tag.a(i, href=href, class_=className)
-            li = tag.li(a)
-            els.append(li)
-
-        ul = tag.ul(els, class_='star-rating')
         className = ''
         if 'VOTE_MODIFY' in req.perm and get_reporter_id(req) != 'anonymous':
+            add_script(req, 'fivestarvote/js/fivestarvote.js', mimetype='text/javascript')
+
+            for i in range(1, 6):
+                className = "item %s-star" % names[i]
+                href = req.href.fivestarvote(i, resource)
+                a = tag.a(i, href=href, class_=className)
+                li = tag.li(a)
+                els.append(li)
             className = 'active'
         title = "Current Vote: %s users voted for a total of %s" % (count[1], count[0])
-        add_ctxtnav(req, tag.span(tag.object(ul), id='fivestarvotes', title=title, class_=className))
+        ul = tag.ul(els, id='fivestarvotes', title=title, class_=className)
+        add_ctxtnav(req, ul)


     def normalise_resource(self, resource):
