window.addEvent("domready", function(){
	//var links = $$("a");
	new SmoothScroll();
	new Lightbox();

	$$(".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, #quicklinks 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("#ffffff");
			el.addEvents({
				"mouseover": function(){
					fx.start(oColor);
				},
				"mouseout": function(){
					fx.start("#ffffff");
				}			
			});
		}
	});

	$$(".features 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("#411e64");
			el.addEvents({
				"mouseover": function(){
					fx.start(oColor);
				},
				"mouseout": function(){
					fx.start("#411e64");
				}			
			});
		}
	});

	$$("#latestnews ul").each(function(el){ new Ticker(el, {interval: 5000}) });
	
	
});
