- var fm = new FormManager(this.form);
- fm.onBeforeSubmit = function(fm_, evt) {return thisLightbox.onBeforeSubmit(fm_, evt);};
- fm.onResponseLoad = function(req) {return thisLightbox.onResponseLoad(req);};
+ var fm = this.fm = new FormManager(this.form);
+ addListener(this.form, 'change', function(evt){self.onChangeHandler(evt);});
+ fm.onBeforeSubmit = function(fm_, evt) {return self.onBeforeSubmit(fm_, evt);};
+ fm.onResponseLoad = function(req) {return self.onResponseLoad(req);};
+ }
+};
+
+Lightbox.prototype.windowScrollHandler = function(evt) {
+ if (this.toolbar.offsetTop < window.scrollY && !this.toolbarFixed) {
+ this.toolbarFixed = true;
+ this.backThreshold = this.toolbar.offsetTop;
+ this.switchToolBarPositioning(true);
+ }
+ else if (this.toolbarFixed && window.scrollY < this.backThreshold) {
+ this.toolbarFixed = false;
+ this.switchToolBarPositioning(false);