
    
window.addEvent('domready', function() {
	
	//THIRD EXAMPLE
	
	var anotherEl = $('0');
	var anotherEl1 = $('5');
	
	
	$('0').addEvent('click', function(e) {
		e.stop();
		var anotherEl = $('0');
		var anotherEl1 = $('1');
		var anotherEl2 = $('2');
		var anotherEl3 = $('3');
		var anotherEl4 = $('4');
		var anotherEl5 = $('5');

    
		anotherEl.morph('.d5');	
		anotherEl1.morph('.d4');
		anotherEl2.morph('.d3');
		anotherEl3.morph('.d2');
		anotherEl4.morph('.d1');
		// This is the clicked on one
		var x = new Chain();
		var zero = function(){
		anotherEl5.tween('opacity', 0);
	};
		var one = function(){
		anotherEl5.morph('.d0');
	};
        var two = function(){
		window.location="default.aspx";
	};
		x.chain(one);
	    x.chain(two);
	    x.callChain();
        x.callChain.delay(1000, x);
		
	});
	
	$('1').addEvent('click', function(e) {
		e.stop();
		
		var anotherEl = $('1');
		var anotherEl1 = $('0');
		var anotherEl2 = $('2');
		var anotherEl3 = $('3');
		var anotherEl4 = $('4');
		var anotherEl5 = $('5');

      
		anotherEl.morph('.d5');
		
		// This is the clicked on one
		var x = new Chain();
        var one = function(){
        anotherEl1.morph('.d0');
		
	};
	    var two = function(){
		window.location="aboutus.aspx";
		
	};
		x.chain(one);
	    x.chain(two);
	    x.callChain();
        x.callChain.delay(1000, x);

	    
		anotherEl2.morph('.d4');
		anotherEl3.morph('.d3');
		anotherEl4.morph('.d2');
		anotherEl5.morph('.d1');
		
	});
	


	$('2').addEvent('click', function(e) {

		e.stop();
		var anotherEl = $('0');
		var anotherEl1 = $('1');
		var anotherEl2 = $('2'); //MOVING
		var anotherEl3 = $('3');
		var anotherEl4 = $('4');
		var anotherEl5 = $('5');
		
		anotherEl2.morph('.d5');
		anotherEl3.morph('.d4');
		anotherEl4.morph('.d3');
		anotherEl5.morph('.d2');
		anotherEl.morph('.d1');
		// This is the clicked on one
		var x = new Chain();
		var one = function(){
		anotherEl1.morph('.d0');
	};
        var two = function(){
		window.location="services.aspx";
	};
		x.chain(one);
	    x.chain(two);
	    x.callChain();
        x.callChain.delay(1000, x);
		
	});
	
	$('3').addEvent('click', function(e) {

		e.stop();
		var anotherEl = $('0');
		var anotherEl1 = $('1');
		var anotherEl2 = $('2');
		var anotherEl3 = $('3');
		var anotherEl4 = $('4');
		var anotherEl5 = $('5');
		
		anotherEl3.morph('.d5');
		anotherEl4.morph('.d4');
		anotherEl5.morph('.d3');
		anotherEl.morph('.d2');
		anotherEl1.morph('.d1');
		// This is the clicked on one
		var x = new Chain();
		var one = function(){
		anotherEl2.morph('.d0');
	};
        var two = function(){
		window.location="Accreditations.aspx";
	};
		x.chain(one);
	    x.chain(two);
	    x.callChain();
        x.callChain.delay(1000, x);
	});
	
	$('4').addEvent('click', function(e) {

		e.stop();
		var anotherEl = $('0');
		var anotherEl1 = $('1');
		var anotherEl2 = $('2'); //MOVING
		var anotherEl3 = $('3');
		var anotherEl4 = $('4');
		var anotherEl5 = $('5');
		
		anotherEl4.morph('.d5');
		anotherEl5.morph('.d4');
		anotherEl.morph('.d3');
		anotherEl1.morph('.d2');
		anotherEl2.morph('.d1');
		// This is the clicked on one
		var x = new Chain();
		var one = function(){
		anotherEl3.morph('.d0');
	};
        var two = function(){
		window.location="Media.aspx";
	};
		x.chain(one);
	    x.chain(two);
	    x.callChain();
        x.callChain.delay(1000, x);
	});
	
    $('5').addEvent('click', function(e) {

		e.stop();
		var anotherEl = $('0');
		var anotherEl1 = $('1');
		var anotherEl2 = $('2'); //MOVING
		var anotherEl3 = $('3');
		var anotherEl4 = $('4');
		var anotherEl5 = $('5');
		
		anotherEl5.morph('.d5');
		anotherEl.morph('.d4');
		anotherEl1.morph('.d3');
		anotherEl2.morph('.d2');
		anotherEl3.morph('.d1');
		// This is the clicked on one
		var x = new Chain();
		var one = function(){
		anotherEl4.morph('.d0');
	};
        var two = function(){
		window.location="ContactUs.aspx";
	};
		x.chain(one);
	    x.chain(two);
	    x.callChain();
        x.callChain.delay(1000, x);
	});
  
}
);


   
