
/**
 * About Javascript
 *
 * @author 		Alfred Dagenais <adagenais@orangetango.com>
 * @copyright 	(c) 2008 orangetango Studio Web Inc.
 * @package 	gsm
 * @subpackage 	javascript
 */

var h2TotWidth = 0;
var h2Height = '';
$('.menu-about').find('h2.serviceTitle').each(function(z){
	if(h2Height == '' || $(this).height() > h2Height){
		h2Height = $(this).height();
	}
	
	h2TotWidth += $(this).width();
});

$('.menu-about').width(h2TotWidth);

var contMaxHeight = 0;
$('.menu-about').find('.about-container-content').each(function(z){
	if($(this).height() > contMaxHeight){
		contMaxHeight = $(this).height();
	}
});

$('.menu-about').find('.about-container-content').each(function(z){
	$(this).height(contMaxHeight);
});


$('.menu-about').find('h2.serviceTitle').each(function(z){
	$(this).height(h2Height);
});

$('.menu-about').hide();

var menuAboutScrolled = false;
$('#our_services').bind('click',function(){
	$('.menu-about').animate({
					   height: 'toggle', opacity: 'toggle'
					 }, "fast",'linear',function(){
					 	
					 	var d = $('.menu-about').css('display');
					 	
					 	if(d != 'none' && menuAboutScrolled === false){
					 		var h = $('.menu-about').height() + 15;
					 		$.scrollTo('+=' + h + 'px',450);
					 		//menuAboutScrolled = true;
					 	}
					 	
					 });
					 
					 
					 
	return false;
});
