// JavaScript Document
window.addEvent('domready', function(){
//do not alter abover this line.	
 

	//set opacity here for validation purposes
    if ($E('body.home div#whiteBox div'))
    {
        $E('body.home div#whiteBox div').setStyle("filter:","alpha(opacity=60)");
        $E('body.home div#whiteBox div').setStyle("-moz-opacity","0.6");
        $E('body.home div#whiteBox div').setStyle("-khtml-opacity", "0.6");
        $E('body.home div#whiteBox div').setStyle("opacity", "0.6");
        
    }
	
	
	//transition the changing content
	//our container
	box = $E('div#white_sub');
	//our effect
	var myFx = new Fx.Style(box, 'opacity', { duration: 500, wait:false});
	//for each a tag with the class industryBtn do the following
	$(document.body).getElements('a.industryBtn').addEvents({
	//fadd a click event
	'mouseleave': function(e){
		myFx.cancel();
	},
    'click': function(e){
		//do this stop thing so the page does not reset
		e = new Event(e).stop();
		//get the contents of the container associated with the a tag
		var myText = this.getParent().getParent().innerHTML;
		//Fade out
		myFx.start(1,0).chain(function(){
		 //Change the text
		 $E('div#white_sub').setHTML(myText);
		 //Fade in
   		 this.start(0,1);
		 
		});
    }
	});
	
	
	
//do not delete below this line.	
});
