window.addEvent('domready', function() { 
	var sliders = $$("div#image h2");
	var triggers = $$("div#image h2 a") ;
	triggers.each(function( o, x ){ 	
		var sl = new Fx.Styles( sliders[x], {duration:400, wait:false} );
		$(triggers[x]).addEvent('mouseenter', function(){
			sl.start({
				'left': 0
			});
		});
		$(triggers[x]).addEvent('mouseleave', function(){
			sl.start({
				'left': -298
			});
		});
	});
});

window.addEvent('domready', function() {
	//select the theButton
	var theButton = $('gallery_toggle');
	//select the theContent element
	var theContent = $('gallery_wrapper');
	if(theButton){
		//The height transition we attach to theContent
		var theToggle = new Fx.Style('gallery_wrapper', 'height',{duration: 500});
		//add an onclick event listener to theButton
		theButton.addEvent('click', function(){
			//toggle height transition (hide-show)
			if(theContent.getStyle('height').toInt() > 0){
				//hide
				theToggle.start(0);
			}else{
				//show
				theToggle.start(Height);
			}
			//toggle classname button1 <-> button1 button1_
			theButton.toggleClass('hide_gallery');
			return false;
		});
		//set css display:block for the contentElements
		theContent.setStyle('display','block');
		//get the scrollSize of the contentElements
		var Height = theContent.getSize().scrollSize.y;
	}
});

window.addEvent('domready', function() {
	var accordion = new Accordion('.contact_list div dl dt', '.contact_list div dl dd', {
		opacity: false,
		start:'all-close',
		onActive: function(toggler, element){
			toggler.toggleClass('active');
		},
	 
		onBackground: function(toggler, element){
			toggler.removeClass('active');
		}
	}, $('accordion'));
});