function go(link) {
   document.location.href = link;
}
function show_element(id, visible) {
   if (visible) {
      jQuery('#' + id).show();
   } else {
      jQuery('#' + id).hide();
   }
   return false;
}
$(function() {
   $('.blur').each(function() {
      $(this).focus(function() {
         if ($(this).val() == $(this).attr('rel')) {
            $(this).val('');
         }
      });
      $(this).blur(function() {
         if ($(this).val() == '') {
            $(this).val($(this).attr('rel'));
         }
      });
      $(this).blur();
   });
   $('.rater').each(function() {
      $this = $(this);
      $('.ui-rater-starsOn', $this).width(parseInt(parseFloat($this.attr('rel')) * 80 / 5));
      $this.rater({postHref: $this.attr('rev')});
   });
   $('#commentform').submit(function() {
      $('.blur').each(function() {
         if ($(this).val() == $(this).attr('rel')) {
            $(this).val('');
         }
      });
   })
});
