<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,12 +13,13 @@
   &lt;body&gt;
       &lt;div id=&quot;content&quot;&gt;
         &lt;div id=&quot;header&quot;&gt;
-          Welcome to the jQuery PageSlide Demo, below are some various interactions for you to play with.
+          &lt;p&gt;Welcome to the jQuery PageSlide Demo, below are some various interactions for you to play with.&lt;/p&gt;
+          &lt;p&gt;To close the slide, click anywhere on the screen. Only one slide can be open at a time.&lt;/p&gt;
         &lt;/div&gt;
         &lt;ul&gt;
-          &lt;li&gt;&lt;a href=&quot;_left.html&quot; id=&quot;slide-left&quot; rel=&quot;pageslide&quot;&gt;PageSlide from the left&lt;/a&gt;&lt;/li&gt;
-          &lt;li&gt;&lt;a href=&quot;_right.html&quot; id=&quot;slide-right&quot; rel=&quot;pageslide&quot;&gt;PageSlide from the right&lt;/a&gt;&lt;/li&gt;
-          &lt;li&gt;&lt;a href=&quot;_modal.html&quot; id=&quot;slide-modal&quot; rel=&quot;pageslide&quot;&gt;PageSlide as a modal element&lt;/a&gt;&lt;/li&gt;
+          &lt;li&gt;&lt;a href=&quot;_left.html&quot; id=&quot;slide-left&quot;&gt;PageSlide from the left&lt;/a&gt;&lt;/li&gt;
+          &lt;li&gt;&lt;a href=&quot;_right.html&quot; id=&quot;slide-right&quot;&gt;PageSlide from the right&lt;/a&gt;&lt;/li&gt;
+          &lt;li&gt;&lt;a href=&quot;_modal.html&quot; id=&quot;slide-modal&quot;&gt;PageSlide as a modal element&lt;/a&gt;&lt;/li&gt;
         &lt;/ul&gt;
       &lt;/div&gt;
   &lt;/body&gt;</diff>
      <filename>demo/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,8 @@
 		    modal:          false, // if true, the only way to close the pageslide is to define an explicit close class. 
 		    start:          function(){}, // event trigger that fires at the start of every open and close.
 		    stop:           function(){}, // event trigger that fires at the end of every open and close.
-		    complete:       function(){} // event trigger that fires once an open or close has completed.
+		    complete:       function(){}, // event trigger that fires once an open or close has completed.
+		    _identifier: $(this)
 		}, options);
 		
 		// these are the minimum css requirements for the pageslide elements introduced in this plugin.
@@ -67,13 +68,7 @@
         $(&quot;body&quot;).append( psSlideBlanket );
   	    $(&quot;#pageslide-blanket&quot;).click(function(){ return false; });
       }
-          
-	    $(&quot;#pageslide-slide-wrap&quot;).click(function(){ return false; });
-	    
-	    if (settings.modal != true) {
-	      $(document).unbind('click').click(function(elm) { _closeSlide(elm); return false });
-	    }
-	    
+          	    
 	    // Callback events for window resizing
 	    $(window).resize(function(){
         $(&quot;#pageslide-body-wrap&quot;).width( $(&quot;body&quot;).width() );
@@ -81,6 +76,7 @@
 	  };
 	  
 		function _openSlide(elm) {
+		  if($(&quot;#pageslide-slide-wrap&quot;).width() != 0) return false;
 		  _showBlanket();
 		  settings.start();
 		  // decide on a direction
@@ -92,7 +88,7 @@
 		  else {
 		    direction = {left:&quot;-&quot;+settings.width};
 		    $(&quot;#pageslide-slide-wrap&quot;).css({right:0});
-		  };
+		  }
     	$(&quot;#pageslide-slide-wrap&quot;).animate({width: settings.width}, settings.duration);
 		  $(&quot;#pageslide-body-wrap&quot;).animate(direction, settings.duration, function() {
 		    settings.stop();
@@ -114,7 +110,6 @@
   		              _closeSlide(elm);
   		              $(this).find('pageslide-close').unbind('click');
   		            });
-  		            
   		            settings.complete();
   		          });
   		      }
@@ -122,8 +117,8 @@
 		  });
 		};
 		
-		function _closeSlide(elm) {
-		  if ($(elm)[0].button != 2 &amp;&amp; $(&quot;#pageslide-slide-wrap&quot;).css('width') != &quot;0px&quot;) { // if not right click.
+		function _closeSlide(event) {
+		  if ($(event)[0].button != 2 &amp;&amp; $(&quot;#pageslide-slide-wrap&quot;).css('width') != &quot;0px&quot;) { // if not right click.
 		    _hideBlanket();
   		  settings.start();
   		  direction = ($(&quot;#pageslide-slide-wrap&quot;).css(&quot;left&quot;) != &quot;0px&quot;) ? {left: &quot;0&quot;} : {right: &quot;0&quot;};
@@ -165,8 +160,12 @@
     return this.each(function(){
       $(this).unbind(&quot;click&quot;).bind(&quot;click&quot;, function(){
     	  _openSlide(this);
+    	  $(&quot;#pageslide-slide-wrap&quot;).click(function(){ return false; });
+    	  if (settings.modal != true) {
+  	      $(document).unbind('click').click(function(evt) { _closeSlide(evt); return false });
+  	    }
     	  return false;
-    	});
+    	});	
     });
     
   };</diff>
      <filename>jquery.pageslide.js</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-(function($){$.fn.pageSlide=function(options){var settings=$.extend({width:&quot;300px&quot;,duration:&quot;normal&quot;,direction:&quot;left&quot;,modal:false,start:function(){},stop:function(){},complete:function(){}},options);var pageslide_slide_wrap_css={position:'fixed',width:'0',top:'0',height:'100%',zIndex:'999'};var pageslide_body_wrap_css={position:'relative',zIndex:'0'};var pageslide_blanket_css={position:'absolute',top:'0px',left:'0px',height:'100%',width:'100%',opacity:'0.0',backgroundColor:'black',zIndex:'1',display:'none'};function _initialize(anchor){if($(&quot;#pageslide-body-wrap, #pageslide-content, #pageslide-slide-wrap&quot;).size()==0){var psBodyWrap=document.createElement(&quot;div&quot;);$(psBodyWrap).css(pageslide_body_wrap_css);$(psBodyWrap).attr(&quot;id&quot;,&quot;pageslide-body-wrap&quot;).width($(&quot;body&quot;).width());$(&quot;body&quot;).contents().wrapAll(psBodyWrap);var psSlideContent=document.createElement(&quot;div&quot;);$(psSlideContent).attr(&quot;id&quot;,&quot;pageslide-content&quot;).width(settings.width);var psSlideWrap=document.createElement(&quot;div&quot;);$(psSlideWrap).css(pageslide_slide_wrap_css);$(psSlideWrap).attr(&quot;id&quot;,&quot;pageslide-slide-wrap&quot;).append(psSlideContent);$(&quot;body&quot;).append(psSlideWrap)}if($(&quot;#pageslide-blanket&quot;).size()==0&amp;&amp;settings.modal==true){var psSlideBlanket=document.createElement(&quot;div&quot;);$(psSlideBlanket).css(pageslide_blanket_css);$(psSlideBlanket).attr(&quot;id&quot;,&quot;pageslide-blanket&quot;);$(&quot;body&quot;).append(psSlideBlanket);$(&quot;#pageslide-blanket&quot;).click(function(){return false})}$(&quot;#pageslide-slide-wrap&quot;).click(function(){return false});if(settings.modal!=true){$(document).unbind('click').click(function(elm){_closeSlide(elm);return false})}$(window).resize(function(){$(&quot;#pageslide-body-wrap&quot;).width($(&quot;body&quot;).width())})};function _openSlide(elm){_showBlanket();settings.start();if(settings.direction==&quot;right&quot;){direction={right:&quot;-&quot;+settings.width};$(&quot;#pageslide-slide-wrap&quot;).css({left:0});_overflowFixAdd()}else{direction={left:&quot;-&quot;+settings.width};$(&quot;#pageslide-slide-wrap&quot;).css({right:0})};$(&quot;#pageslide-slide-wrap&quot;).animate({width:settings.width},settings.duration);$(&quot;#pageslide-body-wrap&quot;).animate(direction,settings.duration,function(){settings.stop();$.ajax({type:&quot;GET&quot;,url:$(elm).attr(&quot;href&quot;),success:function(data){$(&quot;#pageslide-content&quot;).html(data).queue(function(){$(this).dequeue();$(&quot;#pageslide-slide-wrap a&quot;).unbind('click').click(function(elm){document.location.href=elm.target.href});$(this).find('.pageslide-close').unbind('click').click(function(elm){_closeSlide(elm);$(this).find('pageslide-close').unbind('click')});settings.complete()})}})})};function _closeSlide(elm){if($(elm)[0].button!=2&amp;&amp;$(&quot;#pageslide-slide-wrap&quot;).css('width')!=&quot;0px&quot;){_hideBlanket();settings.start();direction=($(&quot;#pageslide-slide-wrap&quot;).css(&quot;left&quot;)!=&quot;0px&quot;)?{left:&quot;0&quot;}:{right:&quot;0&quot;};$(&quot;#pageslide-body-wrap&quot;).animate(direction,settings.duration);$(&quot;#pageslide-slide-wrap&quot;).animate({width:&quot;0&quot;},settings.duration,function(){$(&quot;#pageslide-content&quot;).empty();$('#pageslide-body-wrap, #pageslide-slide-wrap').css('left','');$('#pageslide-body-wrap, #pageslide-slide-wrap').css('right','');_overflowFixRemove();settings.stop();settings.complete()})}};function _showBlanket(){if(settings.modal==true){$(&quot;#pageslide-blanket&quot;).toggle().animate({opacity:'0.8'},'fast','linear')}};function _hideBlanket(){if(settings.modal==true){$(&quot;#pageslide-blanket&quot;).animate({opacity:'0.0'},'fast','linear',function(){$(this).toggle()})}};function _overflowFixAdd(){($.browser.msie)?$(&quot;body, html&quot;).css({overflowX:'hidden'}):$(&quot;body&quot;).css({overflowX:'hidden'})}function _overflowFixRemove(){($.browser.msie)?$(&quot;body, html&quot;).css({overflowX:''}):$(&quot;body&quot;).css({overflowX:''})}_initialize(this);return this.each(function(){$(this).unbind(&quot;click&quot;).bind(&quot;click&quot;,function(){_openSlide(this);return false})})}})(jQuery);
\ No newline at end of file
+(function($){$.fn.pageSlide=function(options){var settings=$.extend({width:&quot;300px&quot;,duration:&quot;normal&quot;,direction:&quot;left&quot;,modal:false,start:function(){},stop:function(){},complete:function(){},_identifier:$(this)},options);var pageslide_slide_wrap_css={position:'fixed',width:'0',top:'0',height:'100%',zIndex:'999'};var pageslide_body_wrap_css={position:'relative',zIndex:'0'};var pageslide_blanket_css={position:'absolute',top:'0px',left:'0px',height:'100%',width:'100%',opacity:'0.0',backgroundColor:'black',zIndex:'1',display:'none'};function _initialize(anchor){if($(&quot;#pageslide-body-wrap, #pageslide-content, #pageslide-slide-wrap&quot;).size()==0){var psBodyWrap=document.createElement(&quot;div&quot;);$(psBodyWrap).css(pageslide_body_wrap_css);$(psBodyWrap).attr(&quot;id&quot;,&quot;pageslide-body-wrap&quot;).width($(&quot;body&quot;).width());$(&quot;body&quot;).contents().wrapAll(psBodyWrap);var psSlideContent=document.createElement(&quot;div&quot;);$(psSlideContent).attr(&quot;id&quot;,&quot;pageslide-content&quot;).width(settings.width);var psSlideWrap=document.createElement(&quot;div&quot;);$(psSlideWrap).css(pageslide_slide_wrap_css);$(psSlideWrap).attr(&quot;id&quot;,&quot;pageslide-slide-wrap&quot;).append(psSlideContent);$(&quot;body&quot;).append(psSlideWrap)}if($(&quot;#pageslide-blanket&quot;).size()==0&amp;&amp;settings.modal==true){var psSlideBlanket=document.createElement(&quot;div&quot;);$(psSlideBlanket).css(pageslide_blanket_css);$(psSlideBlanket).attr(&quot;id&quot;,&quot;pageslide-blanket&quot;);$(&quot;body&quot;).append(psSlideBlanket);$(&quot;#pageslide-blanket&quot;).click(function(){return false})}$(window).resize(function(){$(&quot;#pageslide-body-wrap&quot;).width($(&quot;body&quot;).width())})};function _openSlide(elm){if($(&quot;#pageslide-slide-wrap&quot;).width()!=0)return false;_showBlanket();settings.start();if(settings.direction==&quot;right&quot;){direction={right:&quot;-&quot;+settings.width};$(&quot;#pageslide-slide-wrap&quot;).css({left:0});_overflowFixAdd()}else{direction={left:&quot;-&quot;+settings.width};$(&quot;#pageslide-slide-wrap&quot;).css({right:0})}$(&quot;#pageslide-slide-wrap&quot;).animate({width:settings.width},settings.duration);$(&quot;#pageslide-body-wrap&quot;).animate(direction,settings.duration,function(){settings.stop();$.ajax({type:&quot;GET&quot;,url:$(elm).attr(&quot;href&quot;),success:function(data){$(&quot;#pageslide-content&quot;).html(data).queue(function(){$(this).dequeue();$(&quot;#pageslide-slide-wrap a&quot;).unbind('click').click(function(elm){document.location.href=elm.target.href});$(this).find('.pageslide-close').unbind('click').click(function(elm){_closeSlide(elm);$(this).find('pageslide-close').unbind('click')});settings.complete()})}})})};function _closeSlide(event){if($(event)[0].button!=2&amp;&amp;$(&quot;#pageslide-slide-wrap&quot;).css('width')!=&quot;0px&quot;){_hideBlanket();settings.start();direction=($(&quot;#pageslide-slide-wrap&quot;).css(&quot;left&quot;)!=&quot;0px&quot;)?{left:&quot;0&quot;}:{right:&quot;0&quot;};$(&quot;#pageslide-body-wrap&quot;).animate(direction,settings.duration);$(&quot;#pageslide-slide-wrap&quot;).animate({width:&quot;0&quot;},settings.duration,function(){$(&quot;#pageslide-content&quot;).empty();$('#pageslide-body-wrap, #pageslide-slide-wrap').css('left','');$('#pageslide-body-wrap, #pageslide-slide-wrap').css('right','');_overflowFixRemove();settings.stop();settings.complete()})}};function _showBlanket(){if(settings.modal==true){$(&quot;#pageslide-blanket&quot;).toggle().animate({opacity:'0.8'},'fast','linear')}};function _hideBlanket(){if(settings.modal==true){$(&quot;#pageslide-blanket&quot;).animate({opacity:'0.0'},'fast','linear',function(){$(this).toggle()})}};function _overflowFixAdd(){($.browser.msie)?$(&quot;body, html&quot;).css({overflowX:'hidden'}):$(&quot;body&quot;).css({overflowX:'hidden'})}function _overflowFixRemove(){($.browser.msie)?$(&quot;body, html&quot;).css({overflowX:''}):$(&quot;body&quot;).css({overflowX:''})}_initialize(this);return this.each(function(){$(this).unbind(&quot;click&quot;).bind(&quot;click&quot;,function(){_openSlide(this);$(&quot;#pageslide-slide-wrap&quot;).click(function(){return false});if(settings.modal!=true){$(document).unbind('click').click(function(evt){_closeSlide(evt);return false})}return false})})}})(jQuery);
\ No newline at end of file</diff>
      <filename>jquery.pageslide.min.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d226aae68da5f73623eb9115dc89a749de22f3a6</id>
    </parent>
  </parents>
  <author>
    <name>Derek Perez</name>
    <email>derek@caring.com</email>
  </author>
  <url>http://github.com/srobbin/jquery-pageslide/commit/d0e4b54803851575e78f2cfd0e211fe2f88841f4</url>
  <id>d0e4b54803851575e78f2cfd0e211fe2f88841f4</id>
  <committed-date>2009-06-19T10:38:30-07:00</committed-date>
  <authored-date>2009-06-19T10:38:30-07:00</authored-date>
  <message>fixes double side bug reported by charliegriefer (issue #17).</message>
  <tree>796aee4927c8517082baec038116a5653177b4de</tree>
  <committer>
    <name>Derek Perez</name>
    <email>derek@caring.com</email>
  </committer>
</commit>
