/* main js file for front-page */
	$(document).ready(function() {
				
		var effectTime = 250; // in ms
		var h1colors = [];
		
        $('#content div').each(function() {
            h1colors.push($('h1 a',this).css('color'));    
        })
        
		$('.container').not('#header, #footer').equalHeights(true);
		
		var fullHeight = $('#mainContainer').height();
		$('#mainContainer').css('margin-top',-(fullHeight/2)-20);
		
		
				$('#content li > a').hover(
								// over
								function() {
												$(this).animate({color:'#ffffff'},'fast',function() { $(this).css('text-decoration','underline'); });
								},
								// out
								function() {
												$(this)
																.stop(gotoEnd=true)
																.css('text-decoration','none')
																.animate({color:'#000000'});
								}
				);
		
		$('.container div h1 a').hover(
				function() {
				// over
				    $('.container div h1 a').css('border','none');
								$(this).stop(gotoEnd=true);
        oldColor = h1colors[$('#content > div').index($(this).parent().parent())];
								$(this).animate({'color':'#ffffff'},effectTime,function() {$(this).css('border-bottom','2px solid '+oldColor); });
				},
				function() {
				// out
				$(this)
								.stop(gotoEnd=true)
								.css('border','none')
								.animate({ 'color': oldColor });
				}
		);	
	
		$.get('http://chief.fishbucket.com/getSiteData.php');
	
	});
