/* 
faces.js

faces js library...
*/   

window.addEvent('domready', function(){
		// add toggle
		Fx.Style.implement({ toggle: function(min,max){ return this.start((this.element.getStyle(this.property).toInt() == min) ? max : min); } });		
		
		// define main window sliders
		var studio = new Fx.Style($('studio'), 'height', {duration: 500});
		var gallery = new Fx.Style($('myGallery'), 'height', {duration: 500});
		
		// initilly hide gallery and add event to toggle
		gallery.hide();
		$('galleryToggle').addEvent('click', function(){studio.toggle(0, 218), gallery.toggle(0, 218)});
		

		// define accordion
		//var categories = document.getElementsByClassName('category');
		//var contents = document.getElementsByClassName('content');
		var myAccordion = new Fx.Accordion($$('.category'), $$('.content'), {opacity: true, height: true, duration: 500, display: -1})
		
		// add accordian events
		//still need to add mouse overs to toggle accordian
		$$('.category').each(function(el){
			el.addEvent('mouseover', function(){el.setStyle('color', 'black')});
			el.addEvent('mouseout', function(){el.setStyle('color', 'white')});
		});
		
		// start gallery script
		startGallery();
		});

		
function startGallery() 
{
	var myGallery = new gallery($('myGallery'), 
	{
		timed: false,
		showInfopane: false,
		lightbox: true
	});
}

