// JavaScript Document
<!-- Feedback stars -->
$(document).ready(function(){	
		$('.ratings_stars').hover(
			// Handles the mouseover
			function() {  
				$(this).prevAll().andSelf().addClass('ratings_over');  
			},  
			// Handles the mouseout  
			function() {  
				$(this).prevAll().andSelf().removeClass('ratings_over');  
				set_votes($(this).parent());  
			}  
		);
	
		$('.ratings_stars').bind('click', function() {  
			var star = this; 
			$(this).prevAll().andSelf().addClass('ratings_vote');
			$(this).nextAll().removeClass('ratings_vote');
			var clicked_data = $(star).attr('class').substr(4,1);
			
			document.getElementById('feedbackRating').value = clicked_data;	
		});
		
	});
	
function clearFieldFirstTime(element) {
  if (element.counter==undefined) {
	element.counter = 1;
  }

  else {
	element.counter++;
  }

  if (element.counter == 1) {
	element.value = '';
  }
}
