
initializeWindows = function(){
	
	MochaUI.makeMicroWindow = function(windowId, windowTitle, windowUrl){
			//this makes a window based on class
                new MochaUI.Window({
                        id: windowId + '_window',
                        title: windowTitle,
                        loadMethod: 'iframe',
                        contentURL: windowUrl,
						resizable: false,
						maximizable: false,
						onContentLoaded: function(windowEl){
							
							togglePlayPauseSlideShow();
						},			
						onClose: function(){
							togglePlayPauseSlideShow();
						},
						//onFocus:           $empty,
						//onBlur:            $empty,
						//onResize:          $empty,
						//onMinimize:        $empty,
						//onMaximize:        $empty,
						//onRestore:         $empty,
						//onClose:           $empty,
						//onCloseComplete:	onMochaClose(),
                        width: 890,
                        height:620
                });
        }
		
		if ($$('.publicGalleries')) {
                $$('.publicGalleries').addEvent('click', function(e){
                new Event(e).stop();
                        windowId = this.get('id');
                        windowTitle = this.get('title');
                        windowUrl = this.get('href');
                        MochaUI.makeMicroWindow(windowId, windowTitle, windowUrl);
                });
        }
	
	
		MochaUI.portFoilioWindow = function(windowId, windowTitle, windowUrl){
			//this makes a window based on class
                new MochaUI.Window({
                        id: windowId + '_window',
                        title: windowTitle,
                        loadMethod: 'iframe',
                        contentURL: windowUrl,
						resizable: false,
						maximizable: false,
						onContentLoaded: function(windowEl){
							
							togglePlayPauseSlideShow();
						},			
						onClose: function(){
							togglePlayPauseSlideShow();
						},
						//onFocus:           $empty,
						//onBlur:            $empty,
						//onResize:          $empty,
						//onMinimize:        $empty,
						//onMaximize:        $empty,
						//onRestore:         $empty,
						//onClose:           $empty,
						//onCloseComplete:	onMochaClose(),
                        width: 900,
                        height:550
                });
        }
		
		if ($$('.portfolio')) {
                $$('.portfolio').addEvent('click', function(e){
                new Event(e).stop();
                        windowId = this.get('id');
                        windowTitle = this.get('title');
                        windowUrl = this.get('href');
                        MochaUI.portFoilioWindow(windowId, windowTitle, windowUrl);
                });
        }
	
	
	MochaUI.ContactWindow = function(windowId, windowTitle, windowUrl){
			//this makes a window based on class
                new MochaUI.Window({
                        id: 'ContactWindow',
                        title: 'CONTACT 2CREATE.CA',
                        loadMethod: 'iframe',
                        contentURL: windowUrl,
						resizable: false,
						maximizable: false,
						onContentLoaded: function(windowEl){
							
							togglePlayPauseSlideShow();
						},			
						onClose: function(){
							togglePlayPauseSlideShow();
						},
						//onFocus:           $empty,
						//onBlur:            $empty,
						//onResize:          $empty,
						//onMinimize:        $empty,
						//onMaximize:        $empty,
						//onRestore:         $empty,
						//onClose:           $empty,
						//onCloseComplete:	onMochaClose(),
                        width: 460,
                        height:560
						
                });
        }
		
		if ($$('.contactUs')) {
                $$('.contactUs').addEvent('click', function(e){
                new Event(e).stop();
                        windowId = this.get('id');
                        windowTitle = this.get('title');
                        windowUrl = this.get('href');
                        MochaUI.ContactWindow(windowId, windowTitle, windowUrl);
                });
        }

}