$(document).ready(function() {
// Hover for homepage client-banner project list
var fancyHover = {
	init: function() {
		var project = $('#client-banner li');
			
		project.hover(
			function () { 
				$(this).children('.hover').removeClass('offscreen'); 
				$(this).children('.project-info').css( 'background-color' , '#44423e' );
			}, 
			function () { 
				$(this).children('.hover').addClass('offscreen');
				$(this).children('.project-info').css( 'background-color' , '#272623' );
			}
		);
		
	}
};
fancyHover.init();


// Hover for homepage client-banner project list
var hoverAnim = {
	init: function() {
		var project = $('#client-banner li');
		var projectTxt = project.children('.hover');
		var projectInfo = project.children('.project-info');
		var originalBG = "#272623"; 
		var fadeColor = "#44423e";
		
		project.children('.hover').css({left: '0px'})
 		project.children().children('.hover-bg').fadeTo(1, 0.0)
		project.children().children('.hover-content').css({top: '-221px'})
 			
		project.hover(
			function () {
				$(this).children().children('.hover-content').css({top: '-221px'});
				$(this).children().children('.hover-bg').stop().fadeTo(600, 0.5);
				$(this).children().children('.hover-content').stop().animate({top: '0px'} , { queue: false, duration: 450, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:fadeColor}, 750);
			}, 
			function () {
				$(this).children().children('.hover-bg').stop().fadeTo(800 , 0);
				$(this).children().children('.hover-content').stop().animate({top: '221px'} , { queue: false, duration: 300, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:originalBG},850);
			}
		);
		
	}
};
hoverAnim.init();


// Hover for homepage client-banner2 project list
var fancyHover2 = {
	init: function() {
		var project2 = $('#client-banner2 li');
			
		project2.hover(
			function () { 
				$(this).children('.hover').removeClass('offscreen'); 
				$(this).children('.project-info').css( 'background-color' , '#44423e' );
			}, 
			function () { 
				$(this).children('.hover').addClass('offscreen');
				$(this).children('.project-info').css( 'background-color' , '#272623' );
			}
		);
		
	}
};
fancyHover2.init();


// Hover for homepage client-banner project list
var hoverAnim2 = {
	init: function() {
		var project2 = $('#client-banner2 li');
		var projectTxt = project2.children('.hover');
		var projectInfo = project2.children('.project-info');
		var originalBG = "#272623"; 
		var fadeColor = "#44423e";
		
		project2.children('.hover').css({left: '0px'})
 		project2.children().children('.hover-bg').fadeTo(1, 0.0)
		project2.children().children('.hover-content').css({top: '-330px'})
 			
		project2.hover(
			function () {
				$(this).children().children('.hover-content').css({top: '-330px'});
				$(this).children().children('.hover-bg').stop().fadeTo(600, 0.70);
				$(this).children().children('.hover-content').stop().animate({top: '0px'} , { queue: false, duration: 450, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:fadeColor}, 750);
			}, 
			function () {
				$(this).children().children('.hover-bg').stop().fadeTo(800 , 0.0);
				$(this).children().children('.hover-content').stop().animate({top: '330px'} , { queue: false, duration: 300, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:originalBG},850);
			}
		);
		
	}
};
hoverAnim2.init();



// Hover for portfolio images
var fancyHover3 = {
	init: function() {
		var project3 = $('#client-banner3 li');
			
		project3.hover(
			function () { 
				$(this).children('.hover').removeClass('offscreen'); 
				$(this).children('.project-info').css( 'background-color' , '#44423e' );
			}, 
			function () { 
				$(this).children('.hover').addClass('offscreen');
				$(this).children('.project-info').css( 'background-color' , '#272623' );
			}
		);
		
	}
};
fancyHover3.init();


// Hover for portfolio images
var hoverAnim3 = {
	init: function() {
		var project3 = $('#client-banner3 li');
		var projectTxt = project3.children('.hover');
		var projectInfo = project3.children('.project-info');
		var originalBG = "#272623"; 
		var fadeColor = "#44423e";
		
		project3.children('.hover').css({left: '0px'})
 		project3.children().children('.hover-bg').fadeTo(1, 0.0)
		project3.children().children('.hover-content').css({top: '-221px'})
 			
		project3.hover(
			function () {
				$(this).children().children('.hover-content').css({top: '-221px'});
				$(this).children().children('.hover-bg').stop().fadeTo(600, 0.50);
				$(this).children().children('.hover-content').stop().animate({top: '0px'} , { queue: false, duration: 450, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:fadeColor}, 750);
			}, 
			function () {
				$(this).children().children('.hover-bg').stop().fadeTo(800 , 0.0);
				$(this).children().children('.hover-content').stop().animate({top: '221px'} , { queue: false, duration: 300, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:originalBG},850);
			}
		);
		
	}
};
hoverAnim3.init();

});
