/*
--------------------------------------------------------------------------------
 JavaScript: Dynamic Event Landing Page.
--------------------------------------------------------------------------------
*/

var PromotionPage = Class.create();

PromotionPage.prototype = {
	
	// Reference to the disclaimers.
	disclaimers : null,
	
	// Reference to the disclaimers link.
	disclaimersLink : null,
	
	// Reference to the details pane.
	details : null,
	
	// Reference to the details link.
	detailsLink : null,
	
	// Initializer.
	//
	initialize : function() {
		
		this.details = $( 'my_details' );
		this.detailsLink = $( 'my_detailsLink' );
		this.toggleDetails(); // Start with the details collapsed.
		Event.observe( this.detailsLink, 'click', this.toggleDetails.bind( this ), false );
	
	}, // End initialize().
	
	toggleDisclaimers : function() {
	
		if ( this.disclaimers.className == 'my_disclaimersOff' ) {
			this.disclaimers.className = 'my_disclaimersOn';
		} else {
			this.disclaimers.className = 'my_disclaimersOff';
		} // End if.
	
	}, // End toggleDisclaimers().
	
	toggleDetails : function() {
		
		if ( this.details.className == 'my_detailsOff' ) {
			this.details.className = 'my_detailsOn';
		} else {
			this.details.className = 'my_detailsOff';
		} // End if.
	
	} // End toggleDetails().

} // End class PromotionPage.
