$("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'add_score',:locals => {:work => @work,:score => @score}) %>");
$('#score_<%= @work.id%>').peSlider({range: 'min'});

<% if @is_new%>
    $("#score_list_<%= @work.id%>").prepend("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>");
<% else %>
    $("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score}) %>");
<% end%>
$("#score_list_<%= @work.id%>").removeAttr("style");

<% if @is_teacher %>
    $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'student_work',:locals => {:student_work => @work}) %>");
<% else %>
    $("#student_work_<%= @work.id%>").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work}) %>");
<% end%>


$(function(){
    $(".student_score_info").bind("mouseover",function(e){
        //alert($(this).html());
        $(this).find("div").show();
        $(this).find("div").css("top",e.pageY);
        $(this).find("div").css("left",e.pageX);
    });
    $(".student_score_info").bind("mouseout",function(e){
        //alert($(this).html());
        $(this).find("div").hide();
    });
});
