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");
	});
	
	if($("servicesTabs")){
	
		var togglers = $$("#servicesTabs a");
		var elements = $$("#serviesContainer .servicesContent");
	
		togglers.addEvent("click", function(e){ 
			new Event(e).stop();
		});
		
		var servicesTabs = new Accordion(togglers, elements,{
			"onActive": function(tab){
				tab.getParent().addClass("selected");
			},
			"onBackground": function(tab){
				tab.getParent().removeClass("selected");
			},
			"alwaysHide": false,
			"transition": null,
			"duration": 0
		});
	}	
	
	new Accordion($$("#faqlist li h2"), $$("#faqlist li div"), { "alwaysHide":true, "show":-1 });

		var fontfx = new Fx.Style(document.body, 'font-size',{duration:500});
		var fontSize = Cookie.get("fontSize");		
		if(fontSize){
			fontfx.set(fontSize);
		} else {
			fontfx.set(12);
			Cookie.set("fontSize", 12, { "path": "/" });
		}
		
		$("fontSmall").addEvent("click", function(e){
			new Event(e).stop();
			fontfx.start(12);
			Cookie.set("fontSize", 12, { "path": "/" });
		});
		
		$("fontMedium").addEvent("click", function(e){
			new Event(e).stop();
			fontfx.start(14);
			Cookie.set("fontSize", 14, { "path": "/" });
		});

		$("fontLarge").addEvent("click", function(e){
			new Event(e).stop();
			fontfx.start(18);
			Cookie.set("fontSize", 18, { "path": "/" });
		});




});

window.addEvent("load", function(){



});