/*function cancel_reply() {
	$('new_comment_title').update("New Comment");
	$('comment_parent_id').value = null;
}

function bulk_select() {
	if ($('bulk_select_check_box').checked) {
		select_all();
	} else {
		select_none();
	}
}

function select_all() {
	$$(".comment_check_box").each(function(s) {
	  s.checked = true;
	});
	$('bulk_actions').show();
}

function select_none() {
	$$(".comment_check_box").each(function(s) {
	  s.checked = false;
	});
	$('bulk_actions').hide();
}

function any_checked() {
	checked = false;
	$$(".comment_check_box").each(function(s) {
	  if (s.checked) {
			checked = true;
		} 
	});
	return checked;
}

function control_bulk_approve_link() {
	if (any_checked()) {
		$('bulk_actions').show();
	} else {
		$('bulk_actions').hide();
	}
}*/

reply_to_comment = function(comment_id) {
	jQuery('#comment_replies_' + comment_id).show();
	jQuery('#comment_reply_placeholder_' + comment_id).hide();
	jQuery('#comment_reply_field_wrapper_' + comment_id).show();
	jQuery('#comment_reply_field_' + comment_id).focus();
	jQuery('#comment_reply_field_' + comment_id).val('');
};

placeholder_focus = function(comment_id) {
	jQuery('#comment_reply_placeholder_' + comment_id).hide();
	jQuery('#comment_reply_field_wrapper_' + comment_id).show();
	jQuery('#comment_reply_field_' + comment_id).focus();
	jQuery('#comment_reply_field_' + comment_id).val('');
};

reply_field_blur = function(comment_id) {
	if (jQuery('#comment_reply_field_' + comment_id).val() == "") {
		jQuery('#comment_reply_placeholder_' + comment_id).show();
		jQuery('#comment_reply_field_wrapper_' + comment_id).hide();
	}
};

submit_bulk_actions = function() {
	$('#bulk_action').val($('bulk_select_box').val());
	$('bulk_approval_form').submit()
};

toggle_comment = function(id) {
	el = $("comment_video_" + id);
	
	if (el.visible() == true) {
		el.hide();
		$('toggle_link_' + id).update("Click <a href='javascript:void(0);' onclick='toggle_comment(" + id + ")'>here</a> to show this video reply");
	} else {
		el.show();
		$('toggle_link_' + id).update("Click <a href='javascript:void(0);' onclick='toggle_comment(" + id + ")'>here</a> to hide this video reply");
	}
};
