$(document).ready(function() {
	$('#logo a, #top_nav a, #bottom_nav a, .ajax_subnav a, #badge a').live('click',function() {
		$('#badge').fadeOut();
		var href = $(this).attr('href');
		var hashPosition = href.search('#')+1;
		var pageName = href.substring(hashPosition);
		if(pageName.length) {
			$(this).addClass('active');
			$.get("/content/"+pageName,function(data){
				$('#ajax').html(data).slideDown();
			});
		}
		return false;
	});
	
	$.localScroll.defaults.axis = 'x';
	$.localScroll({
		target: '.staff_department', // could be a selector or a jQuery object too.
		queue:true,
		duration:1000,
		hash:false,
		lazy:true,
		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)
		}
	});
});
