// for use with secure document system developed in jan 2010.

$(document).ready(function() {
	
	$("#toggle").toggle(
	
		function(){
			$("input:checkbox").each(function(){
				if ( ! $(this).attr("checked") ) {
					$(this).add( $(this).next() ).hide();
				}
			});
			
			$(this).val("Show All Files");
		},
		function() {
			$("input:checkbox,label").show();
			$(this).val("Show Only Accessible Files");
		}
		
	);
	
	
	$("#upload-form").submit(function() {
		$("#submit input").val("Please wait...");
	});
	
	
	// pop up confirmation.
	$(".confirm").click(function() {
		if ( !confirm("Are you sure you want to delete this record?") ) {
			return false;
		}
	});
	
	
});