jQuery(function( $ ){
	/**
	 * Most jQuery.localScroll's settings, actually belong to jQuery.ScrollTo, check it's demo for an example of each option.
	 * @see http://flesler.demos.com/jquery/scrollTo/
	 * You can use EVERY single setting of jQuery.ScrollTo, in the settings hash you send to jQuery.LocalScroll.
	 */

	$(window).load(function(){
		$.scrollTo( {top:'0px',left:'2190px'}, 800 );
		$('#about').addClass('selected');		
		$('.nav').hide();
      	//$('#interviews').height($(window).height() -400); 
	});	
		 		
	//$(window).resize(function() { 
      //$('#interviews').height($(window).height() - 400); 
    //});


	$('.interview_link').mouseenter(function(){
		$(this).addClass('desc');    
    });
    
    $('.interview_link').mouseleave(function(){
		$(this).removeClass('desc');    
    });
    
	$('#interviews_up').click(function(){
		$('#interviews').scrollTo('-=150', 500, { axis:'y' });
	});

	$('#interviews_down').click(function(){
		$('#interviews').scrollTo('+=150', 500, { axis:'y' });
	});



	
	$('#up').click(function(){
		$.scrollTo( '-=400', 500, { axis:'y' } );
	});

	$('#down').click(function(){
		$.scrollTo( '+=400', 500, { axis:'y' } );
	});
	
	$('#left').click(function(){
		$.scrollTo( '-=400', 500, { axis:'x' } );
	});

	$('#right').click(function(){
		$.scrollTo( '+=400', 500, { axis:'x' } );
	});

	$('#return').click(function(){
		$.scrollTo( {top:'0px',left:'2190px'}, 800 );
		$('.selected').removeClass('selected');
		$('#about').addClass('selected');
		$('.nav').hide();
	});	
	
	$('.item').click(function(){
		$.scrollTo( $(this), 800, {offset: -50, queue:true} );
		$('.selected').removeClass('selected');
		$(this).addClass('selected');
		$('.nav').show();
	});    

	//$('#about').click(function(){
		//$('.nav').hide();
	//});    

	$('.bottom_right').mouseenter(function(){
		$(this).addClass('show');    
		$(this).removeClass('hide');		
    });

	$('.bottom_right').mouseleave(function(){
		$(this).addClass('hide');      
		$(this).removeClass('show');		
    });
    
	// The default axis is 'y', but in this demo, I want to scroll both
	// You can modify any default like this
	$.localScroll.defaults.axis = 'xy';
	
	$.localScroll({
		//target: '#content',  could be a selector or a jQuery object too.
		queue:true,
		duration:1000,
		hash:true,
		offset: -50,
		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)
		}
	});
});
