$(document).ready(function() {

    $(".right-box-extra .content").each(function(index){
         //alert($(this).height()+80);
         $(".right-box-extra").height($(this).height());
    });

	$(".right-box-extra").hide();


	$("#right-box ul li").click(function(event){
		//alert ('hi - ');
		$(".right-box-extra").slideUp(600);

		//alert (406 - ($('#whatwedo').height()));


		//$(".wwd-extra").slideUp(600);
		if($(this).children(".right-box-extra").is(':hidden')){
			//	$('#whatwedo').animate({
			//		marginTop:"52px"
			//	}, 500, 'linear');
			$(this).children(".right-box-extra").slideToggle(600);
			$(this).children(".content").fadeIn(600);

			//$(this).children(".wwd-bottom").css('margin-top','-45px');
		} else {
			//$('#whatwedo').animate({
			//		marginTop:"112px"
			//	}, 600, 'linear');
		}
	});


   // #content #right-col #right-box ul li .right-box-title p

    $("#right-box ul li").hover(
      function(event){
              $(event.target).children(".sidebar_min_text").stop().animate({"marginLeft": "5px"}, "fast");
               $(event.target).children(".sb-greater").stop().fadeIn('fast');
      },
      function(event){
              $(event.target).children(".sidebar_min_text").stop().animate({"marginLeft": "0px"}, "fast");
               $(event.target).children(".sb-greater").stop().fadeOut('fast');
      }
    );

    $(".sb-greater").hide();

});
