// JavaScript Document
 
//to add a new one - copy one whole chunk, and change the element id (the second line inside the parentheses) to the id of the element you want to apply the effect to.
//you can also change the mouseover and mouseout functions, the width, and the css styles of the element 
//more information and examples can be found at : http://demos.mootools.net/Fx.Styles (on this same page you can find demo's of many different effects that you can use.

// Main Nav

window.addEvent('domready', function() {
var list = $$('#nav_main li a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:200, wait:false});
 
	element.addEvent('mouseover', function(){
		fx.start({
			
		'width': 120,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
		
				'width': 104,
			'color': '#888'
		});
	});
 
});

});




// porfolio tabs

// web
window.addEvent('domready', function() {
var list = $$('#nav_port li#web_tab a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseover', function(){
		fx.start({
			
		'width': 80,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 45,
			'color': '#888'
		});
	});
 
});

});




// brand

window.addEvent('domready', function() {
var list = $$('#nav_port li#brand_tab a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseover', function(){
		fx.start({
			
		'width': 170,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 45,
			'color': '#888'
		});
	});
 
});

});





// ads

window.addEvent('domready', function() {
var list = $$('#nav_port li#ad_tab a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseover', function(){
		fx.start({
			
		'width': 144,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 50,
			'color': '#888'
		});
	});
 
});

});





// identity tab

window.addEvent('domready', function() {
var list = $$('#nav_port li#id_tab a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseover', function(){
		fx.start({
			
		'width': 134,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 43,
			'color': '#888'
		});
	});
 
});

});




// print tab

window.addEvent('domready', function() {
var list = $$('#nav_port li#print_tab a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseover', function(){
		fx.start({
			
		'width': 104,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 48,
			'color': '#888'
		});
	});
 
});

});




// Contact tab - side navigation

window.addEvent('domready', function() {
var list = $$('#nav_sub li#contact a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 300,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 85,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('#nav_sub li#testimonials a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:200, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 75,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 60,
			'color': '#888'
		});
	});
 
});

});


window.addEvent('domready', function() {
var list = $$('#nav_sub li#gohome a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 80,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 65,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('#nav_sub li#bc a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 195,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 60,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('#nav_sub li#tour a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 195,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 60,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('#nav_sub li#restaurant a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 188,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 168,
			'color': '#888'
		});
	});
 
});

});


window.addEvent('domready', function() {
var list = $$('#nav_sub li#retail a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 154,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 134,
			'color': '#888'
		});
	});
 
});

});


window.addEvent('domready', function() {
var list = $$('#nav_sub li#construction a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'width': 168,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'width': 148,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('#nav_sub li#gohome-new a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'height': 69,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'height': 56,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('.contactButton');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'height': 67,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'height': 54,
			'color': '#888'
		});
	});
 
});

});

window.addEvent('domready', function() {
var list = $$('#nav_sub li#testimonials-new a');
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:300, wait:false});
 
	element.addEvent('mouseenter', function(){
		fx.start({
			
		'height': 69,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseout', function(){
		fx.start({
			'margin-left': 0,
				'height': 56,
			'color': '#888'
		});
	});
 
});

});
