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");
	});
	

	$$(".workingwith ul").each(function(el){ new Ticker(el, {"interval": 3000}) });
	
	$$(".awards").each(function(el){ new Ticker(el, {"interval": 5000}) });

	$$("#nav li a").each(function(el){
		new ListItemSelector($(el),{ "fxMin": 1, "fxMax": 0.6 });
	});

});

window.addEvent("load", function(){

	if($("latestNewscontainer")){
		if($ES("li",$("latestNews")).length > 2){
			new NewsTicker("latestNews",{
				"speed": 800,
				"delay": 3000,
				"direction": "vertical"
			});
		}
	}
	
});

	sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
