$(document).ready(function(){
					   	
	// PNG Fix
	$(document).pngFix(); 	

	// LocalScroll w/ #hash support	
	$.localScroll.hash({
		target: 'body', // Could be a selector or a jQuery object too.
		queue:true,
		offset: {top:-39},
		duration:1500
	});

	/* 	$('#navigation,#tophat').localScroll({ */
	$.localScroll({
		target: 'body', // could be a selector or a jQuery object too.
		queue:true,
		duration:1000,
		hash:true,
		offset: {top:-39},
		onBefore:function( e, anchor, $target ){
			// The 'this' is the settings object, can be modified
		},
		onAfter:function( anchor, settings ){
			// The 'this' contains the scrolled element (#content)
		}
	});
	
	// Cufon Font Replacement
	Cufon.replace('h1, #navigation li', { hover:true, fontFamily: 'avenir' });
	Cufon.replace('h4, h5, h6', { hover:true, fontFamily: 'avenir' });
	
	//Switch the "Open" and "Close" state per click
	$("#trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("#trigger").click(function(){
		$(this).next("#footer").slideToggle("slow");
	});
		
	//Switch the "Open" and "Close" state per click
	$('#navigation a').hover(function() {
		$(this).addClass("hover");
	}, function() {
		$(this).removeClass("hover");
	});
	$("#navigation a").click(function(){
		$("#navigation a").removeClass("active");
		$(this).addClass("active");
	});
	
});