var EducationDirect = {
	configure: function(){
		new SmoothScroll({"links": $$(".scroll")});
	
		$$(".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($("homewriting")){
			var flash = new FlashObject("/_images/flash/homewriting.swf", "homewriting", "290", "100", "8");
			flash.addParam("menu","false");
			flash.addParam("WMODE","transparent");
			flash.addParam("quality","high");
			flash.write("homewriting");
		}

		$$("#topbar ul.topnav li a").each(function(el){
			new ListItemSelector($(el),{ "fxMin": 1, "fxMax": 0.5, "staySelected": false });
		});

		$$(".newsticker").each(function(el){ new Ticker(el, {interval: 5000}) });
			
		/*		if($("topbar")){
			var tabs = $$(".topnav li");
			var tabContent = $$(".sectionpreview li");
			var showIndex = 0;
			
			tabs.addEvent("click", function(e){ 
				new Event(e).stop(); 
			});
	        tabs.each(function(item, index){
                if (item.hasClass("open")){
                showIndex = index;
                }
            });
			new Accordion(tabs, tabContent,{
			    "show":showIndex,
				"fixedHeight":189,
				"onActive": function(tab){
					tab.addClass("selected");
				},
				"onBackground": function(tab){
					tab.removeClass("selected");
			}
			});*/
			
		new MooSlideshow($("slideshow"), $$("#slideshow img"),{
			"wait": 5000,
			"fxDuration": 2000,
			"fxTransition": Fx.Transitions.Sine.easeIn
		});
	}
};

window.addEvent("domready", function(){
	EducationDirect.configure();
});
