window.addEvent("domready", function(){
	
	new SmoothScroll({"links": $$(".scroll")});
	new AlphaPng();

	$$(".volatile").each(function(el){
		$(el).addEvent("focus", function(){
			if(this.getValue() == this.getProperty("title")) {
				this.value = "";
			}
		});
	});

	$$("a[rel*='external']").each(function(a){ 
		$(a).setProperty("target", "_blank");
	});
	
	if($("homeBanner")){
		var flash = new FlashObject("/_images/flash/projects.swf", "homeBanner", "750", "255", "9", "#ffffff");
		flash.addParam("WMODE","transparent");
		flash.addParam("menu","false");
		flash.addParam("quality","high");
		flash.write("homeBanner");
	}

	$$(".formOptions a, .pageOptions a").each(function(el){
		new ListItemSelector($(el),{ "fxMin": 0.5, "fxMax": 1 });
	});
	
	
	









	// Create a new multibox and assign it to the Scalextric object
	this.multibox = new MultiBox('multibox', {
		showControls:false,
		useOverlay:true
	});
	
	// Catch the close links for multibox popups
	$$(".multiboxClose").each(function(el){
		el.addEvent("click", function(e){
			new Event(e).stop();
			window.parent.Scalextric.multibox.close();
		});
	});
	
	
});
