//= require "wysihat_engine_pack"
//= require "swfobject"

function changePassword(checked) {
  if (checked) {
    $("password_fields").show();
  } else {
    $("password_fields").hide();
  }
}

function make_sortable(e, callback_url){
	options = {
		onUpdate: function(e){
			new Ajax.Request(callback_url, {
				method: "post",
				parameters: Sortable.serialize(e, { name: 'elements' })
			});
		}	
	}
	Sortable.create(e, options);
}
