var TireSizeChart = Class.create();
TireSizeChart.prototype = {


// A reference the tire size chart.
tireSizeChartContent : null,


// Initializer.
//
initialize : function() {

	// Reference the tire size chart.
	this.tireSizeChart = $( 'tireSizeChart' );

	// Hide the chart at start.
	this.onToggle();

	// Add a click event to the tire size chart link.
	var tireSizeChartLink = $( 'tireSizeChartLink' );
	Event.observe( tireSizeChartLink, 'click', this.onToggle.bind( this ), false );
	tireSizeChartLink.onclick = function() { return false; };

}, // End initialize().


// Event called when the user toggles the tire size chart.
//
onToggle : function() {

	if ( this.tireSizeChart.hasClassName( 'tireSizeChartOn' ) ) {
		this.tireSizeChart.removeClassName( 'tireSizeChartOn' );
		this.tireSizeChart.addClassName( 'tireSizeChartOff' );
	} else {
		this.tireSizeChart.removeClassName( 'tireSizeChartOff' );
		this.tireSizeChart.addClassName( 'tireSizeChartOn' );
	} // End if.

} // End onToggle().


} // End class TireSizeChart.

new TireSizeChart();

