$(function(){
 $('.hover-effective').rating({
  focus: function(value, link){
    // 'this' is the hidden form element holding the current value
    // 'value' is the value selected
    // 'element' points to the link element that received the click.
    var tip = $('.hover-effective_info');
    tip[0].data = tip[0].data || tip.html();
    tip.html(link.title || 'value: '+value);
  },
  blur: function(value, link){
    var tip = $('.hover-effective_info');
    $('.hover-effective_info').html(tip[0].data || '');
  }
 });
});

$(function(){
 $('.hover-practicable').rating({
  focus: function(value, link){
    // 'this' is the hidden form element holding the current value
    // 'value' is the value selected
    // 'element' points to the link element that received the click.
    var tip = $('.hover-practicable_info');
    tip[0].data = tip[0].data || tip.html();
    tip.html(link.title || 'value: '+value);
  },
  blur: function(value, link){
    var tip = $('.hover-practicable_info');
    $('.hover-practicable_info').html(tip[0].data || '');
  }
 });
});

$(function(){
 $('.hover-applied').rating({
  focus: function(value, link){
    // 'this' is the hidden form element holding the current value
    // 'value' is the value selected
    // 'element' points to the link element that received the click.
    var tip = $('.hover-applied_info');
    tip[0].data = tip[0].data || tip.html();
    tip.html(link.title || 'value: '+value);
  },
  blur: function(value, link){
    var tip = $('.hover-applied_info');
    $('.hover-applied_info').html(tip[0].data || '');
  }
 });
});

function toggle_rate_box(id){
     
    $("#rate_"+id).toggle("slow");    
}

function toggle_addcomment(){
    
    $("#add_comment").toggle("slow");    
}

function toggle_news(){
     
    $("#news_right").toggle("fast");
    $("#blog_right").toggle("fast");    
    //$("#site_update_title2").toggle("fast");    
    //$("#site_update_title").toggle("fast");    
    
    if(document.getElementById('li_news').className == 'active')
    {
        document.getElementById('li_news').className = '';
    }
    else
    {
        document.getElementById('li_news').className = 'active';
    }
    
    if(document.getElementById('li_blog').className == 'active')
    {
        document.getElementById('li_blog').className = '';
    }
    else
    {
        document.getElementById('li_blog').className = 'active';
    }
}

