// var $j = jQuery.noConflict();
  function highlightPrevious(current_value, base_dom) {
  	for(i=0; i <= parseInt(current_value); i++) {
  		if (i > 0) {
  			var star_id = base_dom.concat("_" + i)
  			document.getElementById(star_id).style.backgroundImage = "url(/images/star_hover.png)";
  		}
  	}
  }

  function revertPrevious(current_value, base_dom) {
  	for(i=0; i <= parseInt(current_value); i++) {
  		if (i > 0) {
  			var star_id = base_dom.concat("_" + i)
  			if (document.getElementById(star_id).className == "empty") {
  				document.getElementById(star_id).style.backgroundImage = "url(/images/star_empty.png)";
  			} else {
  				document.getElementById(star_id).style.backgroundImage = "url(/images/star.png)";
  			}
  		}
  	}
  }


  function post_could_tweet() {
    if( $("#new_comment_body").val()=="" ){
      $("#error").show();
      $("#error_comment").show();
      return false;
    }
    $('#could_tweet_submit_button').click();
    return false;
  }
  function clear_could_tweet_inputs() {
    $("#new_comment_body").val('');
    $('#tweet_user_name').val('');
    $('#counter strong').text('120');
    CSBfleXcroll('mycustomscroll'); 
  }
