$(document).ready(function() {
	
	$('.fader').cycle({ 
	    fx:     'fade', 
	    speed:   500, 
	    timeout: 3000, 
	    next:   '.fader img', 
	    pause:   1 
	});
	
	$('.fader li').hover(function() {
		$(this).find('.overlay').slideDown();
	}, function() {
		$(this).find('.overlay').slideUp();
	});
	
	$("#slider").easySlider({
		continuous: true,
		controlsShow: false,
		speed: 400
	});
	$("#slider2").easySlider({
		continuous: true,
		controlsShow: false,
		speed: 400
	});
	$("#slider3").easySlider({
		continuous: true,
		controlsShow: false,
		speed: 400
	});
	$("#slider4").easySlider({
		continuous: true,
		controlsShow: false,
		speed: 400
	});
	
	$('.awards-list div.column:nth-child(4n)').addClass('last');
	$('.projects-list div.column:nth-child(4n)').addClass('last');
	
	$('dl:odd').addClass('odd');
	$('dl:even').addClass('even').css('display', 'block');
	
	oc2 = $('.column h3').css('color');
	oc2b = $('.column h3').css('border-bottom-color');
	oc3 = $('.column span').css('color');
	oc4 = $('.column p').css('color');
	oc5 = $('.column a').css('color');
	
	$('#content.highlight .column').hover(function() {
		$(this).addClass('thehover').stop().animate({ backgroundColor: "#782327" }, '100');
		$(this).find('h3').stop().animate({ color: "#fff",  borderBottomColor: "#fff" }, '100');
		$(this).find('span').stop().animate({ color: "#fff" }, '100');
		$(this).find('p').stop().animate({ color: "#fff" }, '100');
		$(this).find('a').stop().animate({ color: "#fff" }, '100');	
	}, function() {
		$(this).stop().animate({ backgroundColor: "#fff" }, '100', function() {
			$(this).removeClass('thehover');
		});
		$(this).find('h3').stop().animate({ color: oc2, borderBottomColor: oc2b }, '100');
		$(this).find('span').stop().animate({ color: oc3 }, '100');
		$(this).find('p').stop().animate({ color: oc4 }, '100');
		$(this).find('a').stop().animate({ color: oc5 }, '100');
	});
	
	$('.column').not('.exception').equalHeights();
});
