/**
 * @author Aaron Maldonado
 */

$(document).ready(function () {
	 
  $("body").addClass("front page-about-front");

    
	$.localScroll.defaults.axis = 'xy';
	
	// Scroll initially if there's a hash (#something) in the url 
	$.localScroll.hash({
		target: '#content-inner', // Could be a selector or a jQuery object too.
		queue:true,
		duration:1500
	});
	
	/**
	 * NOTE: I use $.localScroll instead of $('#navigation').localScroll() so I
	 * also affect the >> and << links. I want every link in the page to scroll.
	 */
	$.localScroll({
		target: '#content-inner', // could be a selector or a jQuery object too.
		queue:true,
		duration:1000,
		hash:true,
    onBefore:function(e){
     
     var click_link = $(e.target).parent().attr('title');

     $('body').removeClass();   
     
     switch (click_link) {

       case "About Us":
         $('body').addClass('front page-about-front');       
         break;
         
       case "Services":
         $('body').addClass('front page-services-front');        
         break;
         
       default:
          break;                                    
     }        
    }
	});

	
});

