// JavaScript Document
$(function() {
	$( "input:submit, a, button", ".boton" ).button();
	$( "a", ".boton" ).click(function() { return false; });
	
	$( "#dialog" ).dialog({
		autoOpen: false,
		modal: "true",
		width: "auto",
		resizable: "false"
	});
	
	$( "#dialog-complete" ).dialog({
		modal: true,
		resizable: "false",
		buttons: {
			Aceptar: function() {
				$( this ).dialog( "close" );
			}
		}
	});
	
	$( "#dialog-download" ).dialog({
		autoOpen: false,
		modal: true,
		buttons: {
			Aceptar: function() {
				$( this ).dialog( "close" );
			}
		},
		resizable: "false"
	});

	$( "#nueva" ).click(function() {
		$( "#dialog" ).dialog( "open" );
		return false;
	});
	$( "#download" ).click(function() {
		$( "#dialog-download" ).dialog( "open" );
		return false;
	});
	$( "#nueva" ).button({
		icons: {
			primary: "ui-icon-document"
		}
	});
	$( "#download" ).button({
		icons: {
			primary: "ui-icon-arrowthickstop-1-s"
		}
	});
	$( "#user-logout" ).button({
		icons: {
			primary: "ui-icon-closethick"
		}
	});
	$( "#user-login" ).button({
		icons: {
			primary: "ui-icon-key"
		}
	});
});
