﻿/*
@import MooTools.DomReady;
@import MooTools.Request;
@import MooTools.Element.Event;
@import MooTools.Element.Dimensions;
@import MooTools.Assets;
@import Calyptus.Popup.Lightbox;
@import Calyptus.Popup.Overlay;
@import ~/JS/Fader.js;
*/
window.addEvent('domready', function(){
	var overlay = new Popup.Overlay();
	var lightbox = new Popup.Lightbox({ holder: overlay });
	$$('a[rel^=lightbox]').each(function(a){
		if(a.href.charAt(a.href.length-1) == '&')
			a.href = a.href + 'w=' + 800 + '&h=' + 600 + '&m=true';
		lightbox.add(a.href, a.title);
		a.addEvent('click', function(e){ e.preventDefault(); lightbox.show(this.href, this.title); });
	});
	/*
	var overlay2 = new Popup.Overlay();
	var videobox = new Popup.Videobox({ holder: overlay2 });
	$$('a[rel^=videobox]').each(function(a){
		videobox.add(a.href, a.title);
		a.addEvent('click', function(e){ e.preventDefault(); videobox.show(this.href, this.title); });
	});
	*/
	if($('Fader')) new Fader('Fader');
});