
// HOVER ANIMATIONS //
$(document).ready(function(){
 
	$("img.a").hover(
		function() {
			$(this).stop().animate({"opacity": "0"}, "fast");
		},
		function() {
			$(this).stop().animate({"opacity": "1"}, "fast");
	});
	
	$("a.work-title-a").hover(
		function() {
			$(this).stop().animate({ "color": "#F0E963" }, "fast");
		},function() {
			$(this).stop().animate({ "color": "#3F3E3D" }, "fast");
	});
	
	$("a.linkhover").hover(
		function() {
			$(this).stop().animate({ "color": "#3B61AB" }, "fast");
				
		},function() {
			$(this).stop().animate({ "color": "#E73C1D" }, "fast");
	});

	$("a.contactlinkhover").hover(
		function() {
			$(this).stop().animate({ "color": "#3B61AB" }, "fast");
				
		},function() {
			$(this).stop().animate({ "color": "#31302F" }, "fast");
	});

	
	$("#fl_menu").hover(
		function() {
			$(this).stop().animate({ 
				"right": "-25px",
				"opacity": "1" 
			}, "fast");
		},function() {
			$(this).stop().animate({ 
				"right": "-95px",
				"opacity": ".5" 
			}, "fast");
	});
	
	$("#fl_menu").hover(
		function() {
				$(".fl-menu-text").stop().animate({ 
					"opacity": "1" 
				}, "fast");
			},function() {
				$(".fl-menu-text").stop().animate({ 
					"opacity": "0" 
				}, "fast");
	});
	
	pageScroll();

});


// EO HOVER ANIMATIONS //



// FLOATING NAV //

//nav pop out on scroll//
$(function() {
	var menu = $('#fl_menu');
	$(window).scroll(function() {
		if($(this).scrollTop() > 360) {
			menu.stop().animate({
				'right' : '-95px',
				'opacity' : '.5'
			}, "fast");
		} else {
			menu.stop().animate({'right' : '-150px'}, "fast");
		}
	});
});


//nav opacity/position change on mouseover//


// EO FLOATING NAV //



// PAGE SCROLL ANIMATION //

var pageScroll = function() {
    
	$('.scrollPage').click(function() {
		
		//Scroll Animation
		var sectionClicked = $(this).attr("href");
		var destination = $(sectionClicked).offset().top;
		$("html,body").animate({ scrollTop: destination}, 1000 );
		
		return false;
	});
	
}

// EO PAGE SCROLL ANIMATION //




