window.addEvent('domready', function() {

	$(document.body).getElements('div[name=proj]').addEvents({			
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				//'opacity': 1,
				'background-color': '#f00'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				//opacity: 0.5,
				'background-color': '#111'
			});
		}
	});
	
	$(document.body).getElements('div[name=auxproj]').addEvents({			
		mouseenter: function(){
			// This morphes the opacity and backgroundColor
			this.morph({
				//'opacity': 1,
				'background-color': '#333'
			});
		},
		mouseleave: function(){
			// Morphes back to the original style
			this.morph({
				//opacity: 0.5,
				'background-color': '#222'
			});
		}
	});
	
	
	
	//create our Accordion instance
	var myAccordion = new Fx.Accordion($('accordion'), 'h3.toggler', 'div.element', {
		opacity: false,
		display: -1,
		show: 0
		/*
		onActive: function(toggler, element){
			toggler.setStyle('color', '#fff');
		},
		onBackground: function(toggler, element){
			toggler.setStyle('color', '#fff');
		}
		*/
	});
		
	
});

function contact() {
	mailadress = "office" + "@" + "stahlnow.com";
	location.href="mailto:" + mailadress;
}


function tweet() {
	window.open("http://twitter.com/share","Tweeeeeet!","menubar=no,width=500,height=360,toolbar=no");
}

function delicious(){
	f='http://delicious.com/save?url='+encodeURIComponent(window.location.href)+'&title='+encodeURIComponent(document.title)+'&v=5&';a=function(){if(!window.open(f+'noui=1&jump=doclose','deliciousuiv5','location=yes,links=no,scrollbars=no,toolbar=no,width=550,height=550'))location.href=f+'jump=yes'};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}
}
