$(document).ready(function () {
	
	var header2, header3;
	
	//adjusting innerMenu height
	$('.internalBody .leftStack').css('min-height', ($('#submenu').height() + 300) + 'px');
	
	//adjusting content height if it is less than menu
	if ($('.internalBody .rightStack').height() < ($('.internalBody #submenu').height() + 350)) {
		$('.internalBody .rightStack').css('min-height', ($('.internalBody #submenu').height() + 350) + 'px');
	}
	
	//evening out height of stacks inside content
	if ($('.internalBody .innerTwoStacks > div:first-child').height() < $('.internalBody .innerTwoStacks > div:last-child').height()) {
		$('.internalBody .innerTwoStacks > div:first-child').css('height', $('.internalBody .innerTwoStacks > div:last-child').height() + 'px');
	}
	
	//set header height the same for h1 and h2 from excel
	header2 = $('.internalBody .innerTwoStacks > div:first-child h1').height();
	header3 = $('.internalBody .innerTwoStacks > div:last-child h1').height();
	if (header2 > header3) {
		$('.internalBody .innerTwoStacks > div:last-child h1').css('height', header2 + 'px');
	}
	if (header3 > header2) {
		$('.internalBody .innerTwoStacks > div:first-child h1').css('height', header3 + 'px');
	}
	
	//fist page 4 big image rolover effect
	$('.homeBody .stackStiles > div').hover(function () {
		$('.homeBody .stackStiles > div:not(:last)').stop().animate({ 'width' : '136px' }, 100);
		$(this).stop().animate({ 'width' : '180px' }, 100);
		$(this).find('img').css({'opacity' : '1'});
		$(this).find('img').stop().animate({'opacity' : '0.8'}, 100, function () {
			$(this).animate({
					opacity: 1
				}, 200);
		});
		
		$(this).find('.stackEffect').css({backgroundPosition : '-160px 414px'});
		$(this).find('.stackEffect').stop().animate({backgroundPosition : '150px 414px'}, 300, function () {
			$(this).css({backgroundPosition : '-160px 414px'});
		});
	   
	}, function () {
		$('.homeBody .stackStiles > div:not(:last)').stop().animate({ 'width' : '145px' }, 100);
	});
	
});
