	window.addEvent('domready', function() {
	new Asset.images(['images/who/orangeheader.jpg', 'images/home/city.png', 'images/differ/header.jpg', 'images/contact/subheader.jpg', 'images/casestudies/header.jpg', 'images/products/header.jpg', 'images/who/subheader.jpg', 'images/home/logo.gif']
														   );
	
	
	var starttyping = function(name){
	var div = $('aheader').setStyles({
			display:'block',
			opacity: 0
						});

	new Fx.Style(div, 'opacity', {duration: 1000} ).start(1);
		};
			var starttyping2 = function(name){
				var div = $('aheader2').setStyles({
			display:'block',
			opacity: 0
						});
					new Fx.Style(div, 'opacity', {duration: 1000} ).start(1);
			};
	
			var ImageTranisitions = new Class({
				Implements: [Options], 
				options: {
					el: $('aheader'),
					startp: '',
					stopp: 150,
					restartp: 150,
					duration: 20000,
					move: ''
				},
				
				initialize: function(options) {
				this.setOptions(options);
			//	alert('test' + this.options.startp);
				this.move = new Fx.Elements(this.options.el,{duration: this.options.duration});
				this.restart();
			
				},
				itemloop: function() {
					this.options.z++;
						this.move.start({
								'0': { //let's change the first element's opacity and width
									 'left': [this.options.startp,this.options.stopp]
								}
							});
						
				
							this.options.startp = this.options.restartp;
							var id = this.restart.delay(200,this);
						
					
					},
					restart: function() {
						var lo = this.itemloop();
						}
				});
	

	var intromask = new Fx.Elements($('intromask'),{duration: 800});
	intromask.start({
								'0': { //let's change the first element's opacity and width
									 'left': [0,236]
								}
							}).chain(function() { 
							var ilogo = $('intrologo').setStyles({
							'display':'block',
							'opacity': 0
	});
	var ilogo = new Fx.Elements($('intrologo'),{duration: 700});
	ilogo.start({
								'0': { //let's change the first element's opacity and width
									 'top': [37,-1],
									 'opacity':[0,1]
								}
							}).chain(function() { 
					
	var itxt = $('introforcasting').setStyles({
							'display':'block',
							'opacity': 0
	});
	new Fx.Style(itxt, 'opacity', {duration: 1000} ).start(1).chain(function() { 
	
		var div = $('aheader').setStyles({
			display:'block',
			opacity: 0
						});

	new Fx.Style(div, 'opacity', {duration: 1000} ).start(1).chain(function() { 


	var hcross = new Fx.Elements($('hcross'),{duration: 500});
	
	var vcross = new Fx.Elements($('vcross'),{duration: 800});
	vcross.start({
								'0': { //let's change the first element's opacity and width
									 'left': [0,730]
								}
							}).chain(function() {
	hcross.start({
								'0': { //let's change the first element's opacity and width
									 'top': [0,124]
								}
							}).chain(function() { 
							var div = $('box').setStyles({
			display:'block',
			opacity: 0
						});

	new Fx.Style(div, 'opacity', {duration: 1000} ).start(1).chain(function() { 
		var div = $('flash').setStyles({
			display:'block',
			opacity: 0
						});

	new Fx.Style(div, 'opacity', {duration: 100} ).start(0.5).chain(function() { 
																		  

	new Fx.Style(div, 'opacity', {duration: 500} ).start(0).chain(function() { 
   
													
		vcross.start({
								'0': { //let's change the first element's opacity and width
									 'opacity': [1,0]
								}
									});
	hcross.start({
								'0': { //let's change the first element's opacity and width
									 'opacity': [1,0]
								}
									}).chain(function() { 		
									$('air').setStyle('display','none');
	var cdiv = new Fx.Elements($('city'),{duration: 500});
	$$('.flash').setStyle('display','none');
	cdiv.start({
								'0': { //let's chane first element's opacity and width
									 'display':'block',
									 'left':[733,458],
									 'top': [119,0],
									 'width':[1, 346],
									 'height':[1,204]
								}
							});

	
	
			var t1 = new ImageTranisitions({
				el: $$('.equation1'),
				startp: 12,
				stopp: 460,
				restartp: -177,
				duration: 20000
			}).itemloop();
			var t2 = new ImageTranisitions({
				el: $$('.equation2'),
				startp: 108,
				stopp: 460,
				restartp: -130,
				duration: 30000
			}).itemloop();
				var t3 = new ImageTranisitions({
				el: $$('.equation3'),
				startp: -74,
				stopp: 460,
				restartp: -74,
				duration: 20000
			}).itemloop();
				var t4 = new ImageTranisitions({
				el: $$('.equation4'),
				startp: 288,
				stopp: 460,
				restartp: -130,
				duration: 15000
			}).itemloop();
			
				var t5 = new ImageTranisitions({
				el: $$('.equation5'),
				startp: 724,
				stopp: -75,
				restartp: 880,
				duration: 30000
			}).itemloop();
				
					/*
				var el = $$('.equation5');
				var mySlide = new Fx.Slide('.equation5');
					mySlide.slideIn();
*/

		
		var list = $$('#nav li');
		


		
		
list.each(function(element) {
 
	var fx = new Fx.Styles(element, {duration:200, wait:false});
 
	element.addEvent('mouseenter', function(){
		eid='a.'+element.get('id');
		$$(eid).setStyle('color','#ff3300');
		fx.start({
			'margin-top': 5,
			color: '#ff8'
		});
	});
 
	element.addEvent('mouseleave', function(){
		eid='a.'+element.get('id');
		$$(eid).setStyle('color','#666666');
		fx.start({
			'margin-top': 0,
			'color': '#ff3300'
		});
	});
 
});
	});	
	});	
	});

	});
	});
	});
	

	});
	});
	});
});
	
});

		
	
		
 
				 
		
