window.addEvent("domready", function(){
	new SmoothScroll();
	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");
	});
	
	
	$$("#nav li a").each(function(el){
		if(!el.hasClass("selected")){
			var oColor = el.getStyle("color");
			var fx = new Fx.Style(el, "color", {"duration":300, "wait": false}).set("#000000");
			el.addEvents({
				"mouseover": function(){
					fx.start(oColor);
				},
				"mouseout": function(){
					fx.start("#000000");
				}			
			});
		}
	});

});

window.addEvent("load", function(){

	if($("activitiesContainer")){
		if($ES("li",$("activities")).length > 3){
			new NewsTicker("activities",{
				"speed": 1000,
				"delay": 2000,
				"direction": "vertical"
			});
		}
	}
	
});