<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spinner.gif</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,7 @@ CHANGELOG:
 ver 1.5.4 (07/13/2007)
  Added: 	ModalBox now accepts HTML (plain &amp; object) as a content parameter [issue #21]
  Fixed: 	PageUp/Down/Home/End buttons doesn't work on input elements [issue #58]
- Changed: 	Options saves between sequences of windows
+ Changed: 	Options saves between sequences of windows. [was buggy. now fixed]
  Changed: 	Title made not mandatory parameter and moved to options. !!! IMPORTANT: Changed APIs !!! [issue #83]
  Changed: 	Changelog separated from the source code
 </diff>
      <filename>changelog.txt</filename>
    </modified>
    <modified>
      <diff>@@ -58,6 +58,12 @@
 	background:transparent;
 }
 
+#MB_loading {
+	padding: 1.5em;
+	text-indent: -10000px;
+	background: url(spinner.gif) 50% 0 no-repeat;
+}
+
 /* Color scheme */
 #MB_window {
   border-color:#DEE0E5;</diff>
      <filename>modalbox.css</filename>
    </modified>
    <modified>
      <diff>@@ -16,17 +16,18 @@ Modalbox.Methods = {
 	options: {
 		title: &quot;ModalBox Window&quot;, // Title of the ModalBox window
 		overlayClose: true, // Close modal box by clicking on overlay
-		width: 400, // Default width in px
-		height: 400, // Default height in px
+		width: 500, // Default width in px
+		height: 90, // Default height in px
 		overlayDuration: .50, // Default overlay fade in/out duration in seconds
 		slideDownDuration: .75, // Default Modalbox appear slide down effect in seconds
 		slideUpDuration: .35, // Default Modalbox hiding slide up effect in seconds
-		resizeDuration: .50, // Default resize duration seconds
+		resizeDuration: .35, // Default resize duration seconds
 		loadingString: &quot;Please wait. Loading...&quot;, // Default loading string message
 		closeString: &quot;Close window&quot;, // Default title attribute for close window link
 		params: {},
 		method: 'get' // Default Ajax request method
 	},
+	_options: new Object,
 	
 	setOptions: function(options) {
 		Object.extend(this.options, options || {});
@@ -68,7 +69,10 @@ Modalbox.Methods = {
 	
 	show: function(content, options) {
 		this.content = content;
+		
+		Object.extend(this._options, this.options); // Setting up original options with default options
 		this.setOptions(options);
+		
 		if(!this.isInitialized) this._init(options); // Check for is already initialized
 		Element.update(this.MBcaption, this.options.title); // Updating title of the MB
 		
@@ -184,18 +188,27 @@ Modalbox.Methods = {
 		Element.extend(this.MBcontent);
 		this.MBcontent.update(&quot;&quot;);
 		if(typeof content == 'string') {
-			Element.update(this.MBcontent, content);
+			//this.MBcontent.hide()
+			//if(console.log){console.log(this.MBcontent.getHeight())};
+			this.MBcontent.hide().update(content);
+			//if(console.log){console.log(this.MBcontent.getHeight())};
+			//this.MBcontent.show();
 		}
 		else if (typeof this.content == 'object') { // HTML Object is given
 			var _htmlObj = content.cloneNode(true); // If node already a part of DOM we'll clone it
 			_htmlObj.id = &quot;MB_&quot; + _htmlObj.id; // Modifying element ID to prevent duplicate IDs
-			this.MBcontent.appendChild(_htmlObj);
+			this.MBcontent.hide().appendChild(_htmlObj);
 			this.MBcontent.down().show(); // Toggle visibility for hidden nodes
 		}
 		// Prepare content
-		this.focusableElements = this._findFocusableElements();
-		this._moveFocus(); // Setting focus on first 'focusable' element in content (input, select, textarea, link or button)
-		this.event(&quot;afterLoad&quot;); // Passing callback
+		Modalbox.resize(0, this.MBcontent.getHeight() - Element.getHeight(this.MBwindow) + Element.getHeight(this.MBheader), {
+			afterResize: function(){
+				this.MBcontent.show();
+				this.focusableElements = this._findFocusableElements();
+				this._moveFocus(); // Setting focus on first 'focusable' element in content (input, select, textarea, link or button)
+				this.event(&quot;afterLoad&quot;); // Passing callback
+			}.bind(this)
+		});
 	},
 	
 	_loadAfterResize: function() {
@@ -274,6 +287,7 @@ Modalbox.Methods = {
 		}
 		Element.remove(this.MBoverlay);
 		Element.remove(this.MBwindow);
+		this.setOptions(this._options); //Settings options object into intial state
 		this.isInitialized = false;
 		this.event(&quot;afterHide&quot;); // Passing afterHide callback
 	},</diff>
      <filename>modalbox.js</filename>
    </modified>
    <modified>
      <diff>@@ -25,12 +25,12 @@
 	&lt;h1&gt;ModalBox Functional Test&lt;/h1&gt;
 	
 	&lt;ul&gt;
-		&lt;li&gt;&lt;a href=&quot;_ajax_js.html&quot; title=&quot;Modalbox JS passing test&quot; onclick=&quot;Modalbox.show(this.href, {title: this.title, width: 500, height: 200, afterLoad: function(){ passValue('Current document') } }); return false;&quot;&gt;Modalbox JS passing test&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;_ajax_form.html&quot; title=&quot;Modalbox Prevent Scroll Test&quot; onclick=&quot;Modalbox.show(this.href, {title: this.title, width: 500, height: 400, overlayClose: false}); return false;&quot;&gt;Modalbox Prevent Scroll Test&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox without Ajax Test&quot; onclick=&quot;Modalbox.show(Builder.build('&lt;h1&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/h1&gt;'), {title: this.title, width: 500, height: 400}); return false;&quot;&gt;Modalbox without Ajax Builder Test&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox without Ajax plain HTML test&quot; onclick=&quot;Modalbox.show('&lt;h1&gt;HTML Header&lt;/h1&gt;&lt;input type=\'button\' value=\'Button\' onclick=\'alert(1)\' /&gt;', {title: this.title, width: 500, height: 200 }); return false;&quot;&gt;Modalbox without Ajax plain HTML test&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox without Ajax by element ID test&quot; onclick=&quot;Modalbox.show($('testContent'), {title: this.title, width: 500, height: 200 }); return false;&quot;&gt;Modalbox without Ajax by element ID test&lt;/a&gt;&lt;/li&gt;
-		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox wrong parameter test&quot; onclick=&quot;Modalbox.show(123, {title: this.title, width: 500, height: 200 }); return false;&quot;&gt;Modalbox wrong parameter test&lt;/a&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;a href=&quot;_ajax_js.html&quot; title=&quot;Modalbox JS passing test&quot; onclick=&quot;Modalbox.show(this.href, {title: this.title, width: 300, afterLoad: function(){ passValue('Current document') } }); return false;&quot;&gt;Modalbox JS passing test&lt;/a&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;a href=&quot;_ajax_form.html&quot; title=&quot;Modalbox Prevent Scroll Test&quot; onclick=&quot;Modalbox.show(this.href, {title: this.title, overlayClose: false}); return false;&quot;&gt;Modalbox Prevent Scroll Test&lt;/a&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox without Ajax Test&quot; onclick=&quot;Modalbox.show(Builder.build('&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;/p&gt;'), {title: this.title}); return false;&quot;&gt;Modalbox without Ajax Builder Test&lt;/a&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox without Ajax plain HTML test&quot; onclick=&quot;Modalbox.show('&lt;h1&gt;HTML Header&lt;/h1&gt;&lt;input type=\'button\' value=\'Button\' onclick=\'alert(1)\' /&gt;', {title: this.title }); return false;&quot;&gt;Modalbox without Ajax plain HTML test&lt;/a&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox without Ajax by element ID test&quot; onclick=&quot;Modalbox.show($('testContent'), {title: this.title }); return false;&quot;&gt;Modalbox without Ajax by element ID test&lt;/a&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Modalbox wrong parameter test&quot; onclick=&quot;Modalbox.show(123, {title: this.title }); return false;&quot;&gt;Modalbox wrong parameter test&lt;/a&gt;&lt;/li&gt;
 	&lt;/ul&gt;
 	
 	&lt;br /&gt;</diff>
      <filename>tests/functional/func-modalbox-test.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ccb9d5f25e58efe0e5c6afb037f20ff8d5468dc9</id>
    </parent>
  </parents>
  <author>
    <name>Andrey Okonetchnikov</name>
    <email>andrej.okonetschnikow@gmail.com</email>
  </author>
  <url>http://github.com/okonet/modalbox/commit/a9f8f107cb0be60a5efe2a3742f8d4b328a34760</url>
  <id>a9f8f107cb0be60a5efe2a3742f8d4b328a34760</id>
  <committed-date>2007-07-13T13:37:18-07:00</committed-date>
  <authored-date>2007-07-13T13:37:18-07:00</authored-date>
  <message>Options saving fixed; Parameters adjusted; IE resizing fixed; Loading message - spinner added</message>
  <tree>ca3235dceb165fd9bd264f86ba6d77165b6f159c</tree>
  <committer>
    <name>Andrey Okonetchnikov</name>
    <email>andrej.okonetschnikow@gmail.com</email>
  </committer>
</commit>
