Why isn't my jquery script showing proper score?
<p>I'm using jQuery Raty and I have the following script:</p>

<pre><code>&lt;script type="text/javascript" charset="utf-8" src="{{ STATIC_URL }}js/raty/js/jquery.raty.min.js"&gt;&lt;/script&gt;
&lt;script type ="text/javascript"&gt; 
(function($) {
    $(function() {
        $('.yourrating').each(function(index,elem){
            $(elem).raty({
                readOnly:  false,
                path: "{{ STATIC_URL }}js/raty/img/",
                score: $(elem).children("span:first").text(),
                click: function(score, evt) {
                    var vote_url = "/spice/rate/" + this.id.substring(2) + "/" + score + "/";
                    $.ajax({
                        url: vote_url,
                        success: function(){
                            alert('vote successful');
                        }
                    });
                }
            });
            $('.thingrating').raty({
                readOnly: true,
                path: "{{ STATIC_URL }}js/raty/img/",
                score: $(elem).children("span:first").text(),
            });
        });
    });
})(jQuery);
&lt;/script&gt;
</code></pre>

<p>The first script <code>yourrating</code> is working and allows people to rate the item. It is implemented as follows: </p>

<p><code>&lt;div class="yourrating" id="t_{{ item.id }}"&gt;&lt;span style="display:none;"&gt;{{score}}&lt;/span&gt;&lt;/div&gt;</code></p>

<p>The second script <code>thingrating</code> is not working. It should show the current score of the model. It is implemented in the template as follows:</p>

<p><code>&lt;div class="thingrating" id="t_{{ item.id }}"&gt;&lt;span style="display:none;"&gt;{{score}}&lt;/span&gt;&lt;/div&gt;</code></p>

<p>Why isn't the second script working? It's displaying the stars, but not the score. If I hardcode the score with <code>4</code> instead of <code>{{score}}</code> that also has no effect -- the stars remain blank.</p>

<p>Here's live code from my browser:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"
xml:lang="en-us" lang="en-us"&gt;

&lt;head&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;


Welcomes         

component Description 


    &lt;/title&gt;

        &lt;!--[if IE]&gt;
            &lt;style&gt;
                div { zoom: 1; /* trigger hasLayout */ }
            &lt;/style&gt;
            &lt;![endif]--&gt;
            &lt;link rel="stylesheet" href="/site_media/static/pinax/css/reset.css" /&gt;
            &lt;link rel="stylesheet" href="/site_media/static/pinax/css/bootstrap/less/bootstrap.css" /&gt;
            &lt;!--Scripts --&gt;
            &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;
            &lt;script type="text/javascript"&gt;
            if (typeof jQuery == 'undefined') {
                document.write(unescape("%3Cscript src='/site_media/static/js/jquery-1.7.2.min.js' type='text/javascript'%3E%3C/script%3E"));
            }
            &lt;/script&gt;
            &lt;script src="/site_media/static/pinax/js/base.js" type="text/javascript"&gt;&lt;/script&gt;
            &lt;script src="/site_media/static/uni_form/uni-form.jquery.js" type="text/javascript"&gt;&lt;/script&gt;
            &lt;script type="text/javascript" src="/site_media/static/js/bootstrap.js"&gt;&lt;/script&gt;





&lt;link rel="stylesheet" href="/site_media/static/pinax/css/comments.css" /&gt;

&lt;link href='http://fonts.googleapis.com/css?family=Ubuntu+Condensed' rel='stylesheet'
type='text/css'&gt;

&lt;!-- &lt;link rel="stylesheet" href="/site_media/static/css/reset_tabs.css"
/&gt;
&lt;link rel="stylesheet" href="/site_media/static/css/site_tabs.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/avatar.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/base.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/blogs.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/friends.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/groups.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/locations.css"
/&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/nav.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/messages.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/microblogging.css"
/&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/pagination.css"
/&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/photos.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/tabs.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/topics.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/pinax/css/wiki.css" /&gt;
&lt;link rel="stylesheet" href="/site_media/static/bookmarks/css/bookmarks.css"
/&gt;
&lt;link rel="stylesheet" href="/site_media/static/spices/css/spices.css"
/&gt;
--&gt; 




    &lt;/head&gt;

&lt;body class=""&gt;
        &lt;div id="wrapper"&gt;
            &lt;div class="navbar"&gt;
                &lt;div class="navbar-inner"&gt;
                    &lt;div class="container" style="width: auto;"&gt;
                        &lt;a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"&gt;
                            &lt;span class="icon-bar"&gt;&lt;/span&gt;
                            &lt;span class="icon-bar"&gt;&lt;/span&gt;
                            &lt;span class="icon-bar"&gt;&lt;/span&gt;
                        &lt;/a&gt;
                        &lt;a class="brand" href="/"&gt;&lt;img src="/site_media/static/pinax/images/logo_small_55.png " alt="book" width="173.4" height="46.75" /&gt;&lt;/a&gt;




                        &lt;div class="nav-collapse"&gt;


&lt;ul class="nav"&gt;&lt;li id="tab_profile"&gt;&lt;a href="/profiles/profile/admin/"&gt;PROFILE&lt;/a&gt;&lt;/li&gt;&lt;li id="tab_product_library"&gt;&lt;a href="/spices/"&gt;PRODUCT DATA&lt;/a&gt;&lt;/li&gt;&lt;li id="tab_product_library"&gt;&lt;a href="/spices/book_library"&gt;book LIBRARY&lt;/a&gt;&lt;/li&gt;&lt;li class="dropdown pull-right" id = "community"&gt;&lt;a class="dropdown-toggle" href="#"&gt;COMMUNITY&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/profiles"&gt;Search &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/questions/"&gt;Questions and Answers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/spices/view_requests/"&gt; Requests&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/"&gt;Latest Updates&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; 





&lt;ul class="nav pull-right"&gt;

    &lt;li class="dropdown pull-right"&gt;
        &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;
            &lt;span class="badge badge-warning"&gt;(2)&lt;/span&gt;
        &lt;/a&gt;
        &lt;ul class="dropdown-menu"&gt;
            &lt;li&gt;&lt;a href="/notices/"&gt;All notifications&lt;/a&gt;&lt;/li&gt;
            &lt;li class="divider"&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/messages/inbox/"&gt;Messages&lt;/a&gt;&lt;/li&gt;
            &lt;li class="divider"&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/invitations/"&gt;Invitations&lt;/a&gt;&lt;/li&gt;


        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li class="dropdown"&gt;
        &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;


             &lt;!--&lt;b&gt;
                admin
            &lt;/b&gt; --&gt;
            &lt;img src="/site_media/static/pinax/images/icons/gear.png" width = "20" height = "20" alt="" /&gt;

            &lt;b class="caret"&gt;&lt;/b&gt;
        &lt;/a&gt;
        &lt;ul class="dropdown-menu"&gt;

            &lt;li&gt;&lt;a href="/profiles/edit"&gt;Edit Profile&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/spices/your_components"&gt;Manage Parts&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;
                &lt;a href="/account/email/"&gt;Account&lt;/a&gt;
            &lt;/li&gt;

            &lt;li&gt;&lt;a href="/admin/"&gt;Admin&lt;/a&gt;&lt;/li&gt;

            &lt;li class="divider"&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/account/logout/"&gt;Logout&lt;/a&gt;&lt;/li&gt;

        &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;






                            &lt;form class="navbar-search pull-right" value = "" action="/search/?q="&gt;
                                &lt;input type="text" class="search-query span2" name = "q" placeholder="Search"&gt;
                                &lt;i class="icon-search icon-white" onclick=""&gt;&lt;/i&gt;
                                &amp;nbsp;&amp;nbsp;&amp;nbsp;
                            &lt;/form&gt;
                        &lt;/div&gt;
                        &lt;!-- /.nav-collapse --&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;!-- /navbar-inner --&gt;
            &lt;/div&gt;
            &lt;div class="container-fluid "&gt;



                    &lt;div id="left_tabs"&gt;&lt;/div&gt;
                    &lt;div id="right_tabs" &gt;&lt;/div&gt; 

                    &lt;div id="body"&gt;


                    &lt;div class=" row-fluid" id="subnav-outer"&gt;
                        &lt;div class="pull-right" id="subnav-inner"&gt;

                        &lt;/div&gt;
                    &lt;/div&gt;

&lt;script type="text/javascript" charset="utf-8" src="/site_media/static/js/raty/js/jquery.raty.min.js"&gt;&lt;/script&gt;
&lt;script type ="text/javascript"&gt; 
(function($) {
    $(function() {
        $('.yourrating').each(function(index,elem){
            $(elem).raty({
                readOnly:  false,
                path: "/site_media/static/js/raty/img/",
                score: $(elem).children("span:first").text(),
                click: function(score, evt) {
                    var vote_url = "/spices/rate/" + this.id.substring(2) + "/" + score + "/";
                    $.ajax({
                        url: vote_url,
                        success: function(){
                            alert('vote successful');
                        }
                    });
                }
            });
            $('.thingrating').raty({
                readOnly: true,
                path: "/site_media/static/js/raty/img/",
                score: $(elem).children("span:first").text(),
            });
        });
    });
})(jQuery);
&lt;/script&gt;


&lt;div class="row-fluid"&gt;
    &lt;!-- component image --&gt;
    &lt;div class="span2"&gt;
        &lt;div class="row-fluid align-center"&gt;
            &lt;img src="/site_media/static/pinax/images/library_placeholders/component.png"&gt;
            &lt;br&gt;&lt;br&gt;
            &lt;!-- Future CODE &lt;div class="coverart"&gt;&lt;img src=/site_media/media/ /&gt;&lt;/div&gt;--&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="span6"&gt;
        &lt;!-- component Name --&gt;
        &lt;div class="row-fluid"&gt;
            &lt;div class="span6"&gt;
                &lt;h3&gt;
                    Book123: component for Books
                &lt;/h3&gt;
            &lt;/div&gt;
                    &lt;fieldset class="inlineLabels"&gt;
                        &lt;div class="thingrating" id="t_5"&gt;&lt;span style="display:none;"&gt;3&lt;/span&gt;&lt;/div&gt;
                    &lt;/fieldset&gt;
            &lt;div class="span6"&gt;


            &lt;/div&gt;
 &lt;/div&gt;
        &lt;!-- Download Button --&gt;
        &lt;div class="row-fluid align-left"&gt;
            &lt;a href="/site_media/media/bookParts/Book123-SDFKSDfsdfasd-component-Books-7.jpg" class="btn btn-medium btn-success" type="submit"&gt;Download component&lt;/a&gt;
            &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
 &lt;/div&gt;
Please rate the quality of the component after downloading.
&lt;br&gt;
&lt;br&gt;
&lt;div class="yourrating" id="t_5"&gt;&lt;span style="display:none;"&gt;3&lt;/span&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
  &lt;div class="tabbable"&gt;
        &lt;ul class="nav nav-tabs"&gt;
            &lt;li class="active"&gt;
                &lt;a href="#relatedproducts" data-toggle="tab"&gt;&lt;h6&gt;Related Products (26)&lt;/h6&gt;&lt;/a&gt;
                &lt;/li&gt;
            &lt;li&gt;
                &lt;a href="#relatedbookparts" data-toggle="tab"&gt;&lt;h6&gt;Related book Parts (2)&lt;/h6&gt;&lt;/a&gt;
            &lt;/li&gt;
            &lt;li&gt;

                &lt;a href="#comments" data-toggle="tab"&gt;&lt;h6&gt;Comments (3)&lt;/h6&gt;&lt;/a&gt;
            &lt;/li&gt;
        &lt;/ul&gt;

 &lt;div class="tab-content"&gt;
            &lt;!-- SPECIFICATIONS - Use a for loop to run through the different specifications
            If not a spec sheet, just show the description --&gt;
            &lt;div class="tab-pane active" id="relatedproducts"&gt;
    &lt;table class="table"&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/323/view_part"&gt;OAK 7-140&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Other Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/327/view_part"&gt;OAK 7-14MM&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Other Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/325/view_part"&gt;Book123AMH&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/320/view_part"&gt;Book123CH&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/324/view_part"&gt;Book123MH&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/322/view_part"&gt;Book123H&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/329/view_part"&gt;Book123H883C&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/326/view_part"&gt;Book123H883&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/321/view_part"&gt;Book123AH&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/328/view_part"&gt;Book123MH883&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;img src="/site_media/static/pinax/images/company_logos/thumbs/Book Vendor.jpg" height="30" width='100' /&gt;&lt;/td&gt;
      &lt;/tr&gt;

    &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/search/?q=Book123"&gt;View more&lt;/a&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;/table&gt;
&lt;/div&gt;
  &lt;div class="tab-pane active" id="relatedbookparts"&gt;    
    &lt;table class="table"&gt;

    &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/5/view_component"&gt;Book123&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;component&lt;/td&gt;
      &lt;/tr&gt;

    &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/spices/4/view_component"&gt;Book123&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;component&lt;/td&gt;
      &lt;/tr&gt;

    &lt;tr&gt;
        &lt;td&gt;&lt;a href = "/search/?q=Book123"&gt;View more&lt;/a&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;/tr&gt;       
    &lt;/table&gt;
    &lt;/div&gt;
    &lt;div class="tab-pane active" id="comments"&gt; 










&lt;ul class="responses"&gt;

    &lt;li class="even thread-0 clearfix"&gt;
        &lt;div class="meta"&gt;
            &lt;div class="avatar"&gt;&lt;img src="/site_media/media/avatars/mary/resized/40/avatars/mary/Beta.jpg" alt="mary" width="40" height="40" /&gt;&lt;/div&gt;
            &lt;div class="details"&gt;&lt;a href="/profiles/profile/mary/"&gt;mary&lt;/a&gt;&lt;/div&gt;
            Oct. 30, 2012
        &lt;/div&gt;
        &lt;div class="bulk"&gt;
            &lt;div class="body"&gt;&lt;p&gt;It&amp;#39;s ok but not great.&lt;/p&gt;&lt;/div&gt;

            &lt;a class="btn pull-left" href="javascript:toggle_comment_form(2)"&gt;Reply&lt;/a&gt;
            &lt;form class="hidden" method="POST" action="/comments/comment/76/5/2/" id="comment_form_2"&gt;
                &lt;div style='display:none'&gt;&lt;input type='hidden' name='csrfmiddlewaretoken' value='745d1d9de808f6067468636314711afa' /&gt;&lt;/div&gt;
                &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;textarea rows="10" cols="40" name="comment"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
                    &lt;tr&gt;&lt;td&gt;&lt;input type="submit" value="Post Response" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
                    &lt;input type="hidden" name="next" value="/spices/5/view_component/" /&gt;
                &lt;/form&gt;


            &lt;/div&gt;
        &lt;/li&gt;

    &lt;li class="odd thread-1 clearfix"&gt;
        &lt;div class="meta"&gt;
            &lt;div class="avatar"&gt;&lt;img src="/site_media/media/avatars/mary/resized/40/avatars/mary/Beta.jpg" alt="mary" width="40" height="40" /&gt;&lt;/div&gt;
            &lt;div class="details"&gt;&lt;a href="/profiles/profile/mary/"&gt;mary&lt;/a&gt;&lt;/div&gt;
            Oct. 30, 2012
        &lt;/div&gt;
        &lt;div class="bulk"&gt;
            &lt;div class="body"&gt;&lt;p&gt;You should be cooler&lt;/p&gt;&lt;/div&gt;

            &lt;a class="btn pull-left" href="javascript:toggle_comment_form(4)"&gt;Reply&lt;/a&gt;
            &lt;form class="hidden" method="POST" action="/comments/comment/76/5/4/" id="comment_form_4"&gt;
                &lt;div style='display:none'&gt;&lt;input type='hidden' name='csrfmiddlewaretoken' value='745d1d9de808f6067468636314711afa' /&gt;&lt;/div&gt;
                &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;textarea rows="10" cols="40" name="comment"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
                    &lt;tr&gt;&lt;td&gt;&lt;input type="submit" value="Post Response" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
                    &lt;input type="hidden" name="next" value="/spices/5/view_component/" /&gt;
                &lt;/form&gt;


            &lt;/div&gt;
        &lt;/li&gt;

    &lt;li class="even thread-0 clearfix"&gt;
        &lt;div class="meta"&gt;
            &lt;div class="avatar"&gt;&lt;img src="/site_media/media/avatars/mary/resized/40/avatars/mary/Beta.jpg" alt="mary" width="40" height="40" /&gt;&lt;/div&gt;
            &lt;div class="details"&gt;&lt;a href="/profiles/profile/mary/"&gt;mary&lt;/a&gt;&lt;/div&gt;
            Oct. 30, 2012
        &lt;/div&gt;
        &lt;div class="bulk"&gt;
            &lt;div class="body"&gt;&lt;p&gt;Ok cool&lt;/p&gt;&lt;/div&gt;

            &lt;a class="btn pull-left" href="javascript:toggle_comment_form(3)"&gt;Reply&lt;/a&gt;
            &lt;form class="hidden" method="POST" action="/comments/comment/76/5/3/" id="comment_form_3"&gt;
                &lt;div style='display:none'&gt;&lt;input type='hidden' name='csrfmiddlewaretoken' value='745d1d9de808f6067468636314711afa' /&gt;&lt;/div&gt;
                &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;textarea rows="10" cols="40" name="comment"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;
                    &lt;tr&gt;&lt;td&gt;&lt;input type="submit" value="Post Response" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
                    &lt;input type="hidden" name="next" value="/spices/5/view_component/" /&gt;
                &lt;/form&gt;


            &lt;/div&gt;
        &lt;/li&gt;

    &lt;/ul&gt;





    &lt;fieldset class="inlineLabels"&gt;
        &lt;form class="uniForm" method="POST" action="/comments/comment/76/5/"&gt;
            &lt;div style='display:none'&gt;&lt;input type='hidden' name='csrfmiddlewaretoken' value='745d1d9de808f6067468636314711afa' /&gt;&lt;/div&gt;
            &lt;div class="ctrlHolder"&gt;
                &lt;label for="id_comment"&gt;Comment&lt;/label&gt;
                &lt;textarea id="id_comment" rows="10" cols="40" name="comment"&gt;&lt;/textarea&gt;
            &lt;/div&gt;
            &lt;div class="form_block"&gt;
                &lt;input type="hidden" name="next" value="/spices/5/view_component/" /&gt;
                &lt;input type="submit" value="Post Response" /&gt;
            &lt;/div&gt;
        &lt;/form&gt;
    &lt;/fieldset&gt;


    &lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;/div&gt;
   &lt;/div&gt;
    &lt;div class="span4"&gt;
        &lt;div class="row-fluid"&gt;
            &lt;table class="table" id="information-table"&gt;
                &lt;tbody&gt;
                    &lt;tr&gt;
                        &lt;td&gt;
                            &lt;div id="profile_avatar"&gt;
                                    &lt;img src="/site_media/media/avatars/mary/resized/27/avatars/mary/Beta.jpg" alt="mary" width="27" height="27" /&gt;
                              &lt;/div&gt;                    &lt;/td&gt;
                        &lt;td&gt;Added by&lt;/td&gt;
                        &lt;td&gt;&lt;a href="/profiles/profile/mary/"&gt;mary&lt;/a&gt;&lt;/td&gt;

                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td&gt;
                            &lt;img src="/site_media/static/pinax/images/icons/addedicon.png"&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                            Added on
                        &lt;/td&gt;
                        &lt;td&gt;October 30, 2012&lt;/td&gt;

                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td&gt;
                            &lt;img src="/site_media/static/pinax/images/icons/handsnap.png"&gt;
                        &lt;/td&gt;
                        &lt;td&gt;
                            Downloads
                        &lt;/td&gt;
                        &lt;td&gt;
                            193
                        &lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
        &lt;/div&gt;

        &lt;!-- Twitter Button --&gt;
        &lt;div class="row-fluid align-center"&gt;
            &lt;a href="#twitterlink" class="btn valign-middle"&gt;
                Share
                &lt;img class="small-twitter-icon" src="/site_media/static/pinax/images/icons/twitter-icon.png" alt="" width="22" height="18" /&gt;
            &lt;/a&gt;
        &lt;/div&gt;
&lt;br&gt;
        &lt;div class="row-fluid align-center"&gt;
    &lt;br&gt;
&lt;h4&gt;Find More Books Libraries&lt;/h4&gt;
&lt;br&gt;
&lt;div class="details inline"&gt;
     &lt;a rel="tooltip" href="/spices/bookparts/Books/component" title="components"&gt;&lt;img src="/site_media/static/pinax/images/library_placeholders/component.png" width = "20%"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a rel="tooltip" href="/spices/bookparts/Books/component" title="components"&gt;&lt;img src="/site_media/static/pinax/images/library_placeholders/component.png" width = "20%"&gt;&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a rel="tooltip" href="/spices/bookparts/Books/component" title="components"&gt;&lt;img src="/site_media/static/pinax/images/library_placeholders/component.png" width = "20%"&gt;&lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="row-fluid"&gt;
    &lt;div class="span8"&gt;
        &lt;h3&gt;

        &lt;/h3&gt;
    &lt;/div&gt;
    &lt;div class="span4 align-center"&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;script type="text/javascript"&gt;
    //javascript to send messages
    jQuery(document).ready(function($) {
        //activate tooltips
        $('[rel=tooltip]').tooltip();
    });

    function sendMessage(){
        //retrieve the inputs
        var form = $('#sendMessageForm');
        var recipient = form.find('#message_recipient');
        var subject = form.find('#message_subject');
        var body = form.find('#message_data');

        var fields = [recipient, subject, body];

        for(var i = 0; i &lt;fields.length; i++){
            var field = fields[i];
            if(field.val() == ""){

                field.closest('.control-group').addClass('error');
                field.next('.help-inline').text('Please enter this field');
            }
            else{
                field.closest('.control-group').removeClass('error');
            }
        }


        if(!fieldsNotFilled){
            $.ajax({
              url: '/messages/compose/',
              type: 'POST',
              data: {
                csrfmiddlewaretoken: '745d1d9de808f6067468636314711afa',
                recipient: recipient.val(),
                subject: subject.val(),
                body: body.val(),

            },
            complete: function(xhr, textStatus) {

            },


        });

        }      
    }

    &lt;/script&gt;

                &lt;/div&gt;


                &lt;script src="/site_media/static/pinax/js/facebox.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    jQuery(document).ready(function($) {
        $('a[rel*=facebox]').facebox({
            loadingImage: '/site_media/static/pinax/img/facebox/loading.gif',
            closeImage: '/site_media/static/pinax/img/facebox/closelabel.gif'
        });
        $(document).bind('reveal.facebox', function() {
            $("form.in_facebox").submit(function() {
                form = this;
                jQuery.facebox(function($) {
                    fields = jQuery(form).find("input[type='text']").filter(":enabled");
                    params = {}
                    fields.each(function() {
                        params[this.name] = this.value;
                    });
                    jQuery.post(form.action, params,
                        function(data, textStatus) {
                            jQuery.facebox(data);
                        }
                    );
                });
                return false;
            });
        });
     });
&lt;/script&gt;


&lt;script type="text/javascript" src="/site_media/static/pinax/js/topics.js"&gt;
&lt;/script&gt;






            &lt;/div&gt;

            &lt;div id="push-footer"&gt;&lt;/div&gt;
   &lt;/div&gt;
        &lt;div id="footer"&gt;
           &lt;aside&gt;&lt;p style="color:#1E90FF;background-color:white;text-align:center;font-size:125%;"&gt;
            Hi there, early book member! Want to provide a suggestion or report a bug? &lt;a href="mailto:mary@book.com?subject=book: I have a comment&amp;body=[sub]" onclick="this.href = this.href.replace('[sub]',window.location)"&gt; Send Feedback&lt;/a&gt;
            &lt;/p&gt;&lt;/aside&gt;

&lt;div id="footer-inner" class="row-fluid align-center"&gt;

    &lt;div class="row-fluid"&gt;
        &lt;div id="legal"&gt;
            &lt;span&gt;&amp;copy; 2012 book&lt;/span&gt; -
            &lt;a href="/about/"&gt;ABOUT US&lt;/a&gt;
            -
            &lt;a href="/about/terms/"&gt;TERMS OF SERVICE&lt;/a&gt;
            -
            &lt;a href="/about/privacy/"&gt;PRIVACY POLICY&lt;/a&gt;
            -
            &lt;a href="/blog/"&gt; BLOG &lt;/a&gt;
        &lt;/div&gt;

&lt;/div&gt;

 &lt;/div&gt;


        &lt;/div&gt;
</code></pre>
