$(document).ready(function(){

	////////////////////////////////
	//nav
	
	$('.mainnav li a')
	.css( {backgroundPosition: "0px 0px"} )
	.mouseover(function(){
		if ($(this).hasClass('active')){
			//do nothing
		} else {
			$(this).stop().animate({backgroundPosition:"(0px -13px)"}, {duration:150, easing: "easeOutQuad"})
		}
		
	})
	.mouseout(function(){
		if ($(this).hasClass('active')){
			$(this).stop().animate({backgroundPosition:"(0px -13px)"}, {duration:150, easing: "easeOutQuad"})
		} else {
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, { duration:150, easing: "easeOutQuad"})
		}
	})
	
	$('.active').animate({backgroundPosition:"(0px -13px)"}, {duration:400, easing: "easeOutQuad"})
	
	$('.sndnav li a')
	.css( {backgroundPosition: "0px 0px"} )
	.mouseover(function(){
		if ($(this).hasClass('active')){
			//do nothing
		} else {
			$(this).stop().animate({backgroundPosition:"(0px -13px)"}, {duration:150, easing: "easeOutQuad"})
		}
		
	})
	.mouseout(function(){
		if ($(this).hasClass('active')){
			$(this).stop().animate({backgroundPosition:"(0px -13px)"}, {duration:150, easing: "easeOutQuad"})
		} else {
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, { duration:150, easing: "easeOutQuad"})
		}
	})
	
	$('.sns .mainnav li a')
	.css( {backgroundPosition: "0px 0px"} )
	.mouseover(function(){
		if ($(this).hasClass('active')){
			//do nothing
		} else {
			$(this).stop().animate({backgroundPosition:"(0px -27px)"}, {duration:150, easing: "easeOutQuad"})
		}
		
	})
	.mouseout(function(){
		if ($(this).hasClass('active')){
			$(this).stop().animate({backgroundPosition:"(0px -27px)"}, {duration:150, easing: "easeOutQuad"})
		} else {
			$(this).stop().animate({backgroundPosition:"(0px 0px)"}, { duration:150, easing: "easeOutQuad"})
		}
	})
	
	////////////////////////////////
	//feature animation
	
	$('.feature_details')
	.mouseenter(function() {
	  $('.feature_details').animate({ paddingRight: 120 }, 300, "easeOutExpo");
	})
	.mouseleave(function() {
	  $('.feature_details').animate({ paddingRight: 80 }, 300, "easeOutExpo");
	})
	
	////////////////////////////////
	//project animation
	
	$('.thumb')
	.css( {backgroundPosition: "0px 0px"} )
	.mouseover(function(){
		$(this).stop().animate({backgroundPosition:"(0px -115px)"}, {duration:400, easing: "easeOutExpo"})
	})
	.mouseout(function(){
		$(this).stop().animate({backgroundPosition:"(0px 0px)"}, { duration:400, easing: "easeOutExpo"})
	})
	
	
});
