$(document).ready(function(){

	$(".footer .navigation > ul > li:not(.footer .navigation > ul > li:last)").after(" <span class=\"separator\">|</span> ");
	$(".listings-current .post:last").addClass("listings-last");
	
	$('.slideshow .images').cycle({
		fx: 'fade',
		pause: 0,
		speed: 2000,
		timeout: 4000,
		before: cycleBefore,
		after: cycleAfter
	});
	
	Cufon.replace('.top-header .navigation > ul > li > a', { fontFamily: 'HelveticaNeueRoman' });
	Cufon.replace('.bottom-header .title h2', { fontFamily: 'HelveticaNeueLight' });
	Cufon.now();
	
	$('.top-header .navigation > ul > li').each(function() {
		$(this).bind('mouseenter', function() {
			Cufon.replace($(this).find("> a"), { fontFamily: 'HelveticaNeueRoman', forceHitArea: true, color: '#f26530' });
		});
		$(this).bind('mouseleave', function() {
			Cufon.replace($(this).find("> a"), { fontFamily: 'HelveticaNeueRoman', forceHitArea: true, color: '#80561a' });
		});
	});
	
	$('.bottom-header .title').height($('.bottom-header').height());
	
});

function cycleBefore(currSlideElement, nextSlideElement, options, forwardFlag) {

	$(nextSlideElement).find(".anim1").delay(1000).animate({ opacity:3 }, 100);

	$(nextSlideElement).find(".anim2").delay(1500).animate({ opacity:3 }, 100);

	$(nextSlideElement).find(".anim3").delay(2000).animate({ opacity:3 }, 100);

	$(nextSlideElement).find(".anim4").delay(2500).animate({ opacity:3 }, 100);
}
function cycleAfter(currSlideElement, nextSlideElement, options, forwardFlag) {
}
