// THIS IS FOR THE SCROLL BOX
jQuery(function( $ ){

	$('#content').attr({scrollTop:0,scrollLeft:0});
	
	$.localScroll.hash({
		target: '#content', //could be a selector or a jQuery object too.
		axis:'xy',//the default is 'y'
		queue:true,
		duration:1500
	});
	
	var $last = $([]);//save the last link

	$.localScroll({
		target: '#content', //could be a selector or a jQuery object too.
		axis:'xy', //the default is 'y'
		queue:true,
		duration:1000,
		hash:true,
		onBefore:function( e, anchor, $target ){//'this' is the clicked link
			$last.removeClass('current');
			$last.removeClass('scrolling');
			$last = $(this).addClass('current');
			$last = $(this).addClass('scrolling');
			if( this.blur )
				this.blur();//remove the awful outline
		},
		onAfter:function( anchor ){
			$last.removeClass('scrolling');
		}
	});
	
	//Highlighting current submenu
	$('.button').click(function() {
                $('.one').addClass("active");
				$('.two').removeClass("active");
				$('.three').removeClass("active");								
	}); 
	$('.one').click(function() {
                $('.one').addClass("active");
				$('.two').removeClass("active");
				$('.three').removeClass("active");
    }); 
	$('.two').click(function() {
                $('.one').removeClass("active");
				$('.two').addClass("active");
				$('.three').removeClass("active");
    }); 
	$('.three').click(function() {
                $('.one').removeClass("active");
				$('.two').removeClass("active");
				$('.three').addClass("active");
    }); 
});