// JavaScript Document
window.addEvent('domready', function() {

//  Navigation Hover Effects
	// Create variables (in this case two arrays)
	var myPage = $$('.page');
	var mySplash = $$('.splash');

	// Set splash opacity to zero so they're hidden initially and toggle visibility on for the container
	mySplash.setStyle('opacity', 0);
		$('splashContent').setStyle('visibility','visible')

	// Add events to the navigation links
	myPage.each(function(el, i) {
		el.set('morph', {link : 'cancel'});
 		
		el.addEvents({
			'mouseenter': function() {
				mySplash[i].morph({
					'opacity' : 1,
					'margin-top' : '-15px'
				});
			},
			'mouseleave' : function() {
				mySplash[i].morph({
					'opacity' : 0,
					'margin-top' : 0
				});
			}
		});
	});
	
	

	
// Accordion Effects
	var myAccordion = new Accordion($$('.toggler'), $$('.accordion_content'), {
		display: 0,			// count starts at 0. To display none -1 or higher than 3. Also shows a transition effect. Use show for no transition on page load.
		fixedHeight: 250,	// default is set to false. Requires an integer, also an overflow property if content larger than fixedHeight.
		// Other options through fx:
		fps: 35,			// (number: defaults to 50) The frames per second for the transition.
		duration: 750		// (number: defaults to 500) The duration of the effect in ms. Can also be one of:
    	//						'short' - 250ms
    	//						'normal' - 500ms
    	//						'long' - 1000ms

	});
	


// Highlight Effects
	var myHighlight = $$('.highlight');
	
	myHighlight.setStyle('opacity', .5);
	
		myHighlight.each(function(el, i) {
			el.addEvents({
				'mouseenter': function() {
					myHighlight[i].morph({
						'opacity' : .99
					});
				}
				//'mouseleave' : function() {
//					myHighlight[i].morph({
//						'opacity' : .7
//					});
//				}
			});
		});
		
});