/*
	20100913 tomc
	eclipse-creative.com
	
	EXCELSIOR FOOD PACKAGING TECHNOLOGIES	
	windows, popups, dialogs etc
*/
window.addEvent('load', function(){
	MUI.advancedEffects = true;
	
	//
	//	CONTACT
	//
	MUI.bookVisitWindow = function(){
		new MUI.Modal({
			id			:'bookVisitWindow',
			title		:'Book A Visit To Excelsior',
			type		:'modal',
			width		:480,
			height		:520,
			loadMethod	:'iframe',
			contentURL	:rootPath + "book-a-visit.html",
			draggable	:true,
			resizable	:true,
			onContentLoaded:function(){
				/*$("book-visit").addEvents({
					submit:function(e){
						new Event(e).stop();
						MUI.notification("Does Nothing");
						MUI.closeWindow($("bookVisitWindow"));
						return false;
					}
				});
				*/
			}
		});
	}
	$$(".book-visit-link").addEvents({
		"click":function(e){
			new Event(e).stop();
			MUI.bookVisitWindow();
		}
	});

	
	//
	//	VIDEO
	//
	MUI.youtubeWindow = function(){
		new MUI.Window({
			id			:'excelsior-video',
			title		:'Excelsior Corporate Video',
			loadMethod	:'iframe',
			contentURL	:rootPath + 'video.html',
			width		:640,
			height		:397,
			//resizeLimit: {'x': [640, 2500], 'y': [402, 2000]}
			resizable	:false,
			scrollbars	:false
		});
	}
	$$("#youtubeLinkCheck").addEvents({
		click:function(e){
			new Event(e).stop();
			MUI.youtubeWindow();
		}
	});
	
	
	//
	//	GALLERY POPUP
	//
	MUI.galleryWindow = function(){
		new MUI.Window({
			id: 'excelsior-gallery',
			title: 'Gallery Window',
			loadMethod: 'iframe',
			contentURL: rootPath + 'gallery.html',
			width: 670,
			height: 472,
			resizeLimit: {'x': [670, 2500], 'y': [472, 2000]}
		});
	}
	$$(".gallery-preview").addEvents({
		click:function(e){
			new Event(e).stop();
			MUI.galleryWindow();
		}
	});

});

