4 This is a part of mkgallery.pl suite
5 http://www.average.org/mkgallery/
7 Uses mootools (1.2) http://www.mootools.net/
8 Uses slideshow http://www.phatfusion.net/slideshow/
12 Hidable "fullscreen" Window for Slideshow
15 var showWindow = new Class({
17 getOptions: function(){
20 container: document.body,
26 initialize: function(name,options){
27 this.setOptions(this.getOptions(), options);
29 this.options.container = $(this.options.container);
30 this.options.tohide = $(this.options.tohide);
32 this.container = new Element('div').addClass(name).
41 zIndex: this.options.zIndex,
44 }).addEvent('click', function(){
45 this.options.onClick()
46 }.bind(this)).injectInside(this.options.container);
50 window.addEvent('resize', this.position.bind(this));
51 window.addEvent('scroll', this.position.bind(this));
55 if(this.options.container == document.body){
56 this.h = window.getHeight();
57 this.s = window.getScrollTop();
59 var myCoords = this.options.container.getCoordinates();
60 this.h = myCoords.height;
61 this.s = myCoords.top;
63 this.container.setStyles({
70 if (this.options.tohide) {
71 this.options.tohide.setStyle('display', 'none');
73 this.container.setStyle('display', 'block');
77 if (this.options.tohide) {
78 this.options.tohide.setStyle('display', 'block');
80 this.container.setStyle('display', 'none');
83 showWindow.implement(new Options);