var SLIDE_TIME = "slow";
var HOVER_COLOR = "#ffffff";
var PADDING = "10px";
var BLUE_ARROW = "/qb/products/common/comp_chart/images/arrow.gif";
var GRAY_ARROW = "/qb/products/common/comp_chart/images/arrow_gray.gif";

$(document).ready(function(){

	$(".chartTabFeature").click(					// when you click, it shows the next div with class hidden
		function () {  
			$(this).toggleClass("blue");
			
			$("td.imageArrow", this).show();
				if($(".imageArrow", this).attr("src") == GRAY_ARROW) {
					$(".imageArrow", this).attr("src",BLUE_ARROW);
				}
				else {
					$(".imageArrow", this).attr("src",GRAY_ARROW);
				}
				
			$("div.hidden").css("padding-top", PADDING);
			$("a.image").show(SLIDE_TIME);
			$("div.hidden", this).toggle("blind", {direction: "vertical"}, SLIDE_TIME);
		}
	);
	
	$(".expand").click(							// this will expand or collapse all
		function(){  
			$(".chartTabFeature").addClass("blue");
			$(".imageArrow").attr("src", BLUE_ARROW);
			$("div.hidden").css("padding-top", PADDING);
			$("a.image").slideDown(1500);
			$("div.hidden").slideDown(1500);
		}
	);
	
	$(".collapse").click(						// this will expand or collapse all
		function(){  
			$(".chartTabFeature").removeClass("blue");
			$(".imageArrow").attr("src", GRAY_ARROW);
			$("a.image").slideUp(1500);
			$("div.hidden").slideUp(1500);
		}
	);
	
});