         Moebooru.request @api.vote_url, {id: @current_post.id, score: vote}
 
     updateWidget: ->
+        $ = jQuery
         score = @getScore()
         vote = @getVote()
         i = 1
         while i <= @v.fav
-            star = jQuery '.star-'+i
+            star = $ '.star-'+i
             if i <= vote
                 star.removeClass 'star-set-after'
                 star.addClass 'star-set-upto'


    Moe.on 'vote:update_widget', ->
        vote.updateWidget()

    $(".vote-up").on 'click', ->
        current_score = vote.getVote()

            "Great",
            "Favorite"
        ]
        @votes = {'0':[], '1':[], '2':[], '3':[]}

    registerVotes: (votes) ->
        @posts = votes
