	/**
	* @package			modal.js
	* @dependence		prototype.js - v1.5.1.1, dialog.js - v0.1, overlay.js - v0.1
	* @version			0.1
	* browser test		FF 2.0.0.x / IE 6.0 and 7.0
	* @license			GNU GPL 2.0
	*/
		if(typeof(Prototype) == 'undefined' || parseFloat(Prototype.Version) < 1.5)
			throw("modal.js requires the Prototype JavaScript framework >= 1.5.0");

		if (!window.Modal)
			var Modal = {};

		Modal.Methods = {
			/**
			* @access public
			*/
			version: '0.1.1',

			/**
			* @access public
			*/
			files : ['overlay', 'dialog'],

			/**
			* @access public
			*/
			/** require: function(name) {
			   // document.write('<script type="text/javascript" src="../plano-150_arquivos/' + name + '.js"></script>');
			},
            */
			/**
			* @access public
			*/
			load : function(){
				// Idea and part of core code from - script.aculo.us web site: http://script.aculo.us/
				$A(document.getElementsByTagName("script")).findAll( function(s) {
					return (s.src && s.src.match(/modal\.js(\?.*)?$/))
				}).each( function(s) {
					var path = s.src.replace(/modal\.js(\?.*)?$/,'');
					Modal.files.each(function(include){Modal.require(path+include)});
				});
			},

			/**
			* @access public
			*/
			show : function(element, options) {
				Overlay.show(options);
				Dialog.show(element,options);
			},

			/**
			* @access public
			*/
			hide : function(){
				Overlay.hide();
				Dialog.hide();
			}
		}
		Object.extend(Modal, Modal.Methods);
		//Modal.load();
