$(document).ready(function() {
		// $("#physician_list tbody").sortable({
		// 	axis: 'y',
		// 	stop: function() {
		// 		var elems = $("#physician_list tbody").sortable('serialize');
		// 		$.ajax({
		// 			type: 'post',
		// 			url: root_route+'physicians_admin/save_order',
		// 			data: elems,
		// 			success: function(msg) {
		// 				$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
		// 			}
		// 		});
		// 	}
		// });
		$("#keystaff_list tbody").sortable({
				axis: 'y',
				stop: function() {
					var elems = $("#keystaff_list tbody").sortable('serialize');
					$.ajax({
						type: 'post',
						url: root_route+'keystaff/save_order',
						data: elems,
						success: function(msg) {
							$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
						}
					});
				}
			});
		$("#amsurghomepagebuttons_list tbody").sortable({
			axis: 'y',
			stop: function() {
				var elems = $("#amsurghomepagebuttons_list tbody").sortable('serialize');
				$.ajax({
					type: 'post',
					url: root_route+'homepage_buttons/save_order',
					data: elems,
					success: function(msg) {
						$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
					}
				});
			}
		});
		$("#patientforms_list tbody").sortable({
			axis: 'y',
			stop: function() {
				var elems = $("#patientforms_list tbody").sortable('serialize');
				$.ajax({
					type: 'post',
					url: root_route+'patient_forms/save_order',
					data: elems,
					success: function(msg) {
						$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
					}
				});
			}
		});
		$("#procedure_list tbody").sortable({
			axis: 'y',
			stop: function() {
				var elems = $("#procedure_list tbody").sortable('serialize');
				$.ajax({
					type: 'post',
					url: root_route+'procedures/save_order',
					data: elems,
					success: function(msg) {
						$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
					}
				});
			}
		});
		$("#patiented_list tbody").sortable({
			axis: 'y',
			stop: function() {
				var elems = $("#patiented_list tbody").sortable('serialize');
				$.ajax({
					type: 'post',
					url: root_route+'patient_education/save_order',
					data: elems,
					success: function(msg) {
						$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
					}
				});
			}
		});
		$("#amsurgslideshow_list tbody").sortable({
			axis: 'y',
			stop: function() {
				var elems = $("#amsurgslideshow_list tbody").sortable('serialize');
				$.ajax({
					type: 'post',
					url: root_route+'slideshow/save_order',
					data: elems,
					success: function(msg) {
						$("#status").html("<strong>Order successfully updated.</strong>").fadeIn().animate({opacity: 1.0},1500).fadeOut();
					}
				});
			}
		});
})
