jQuery(document).ready(function($) {

// Flickr Gallery Cycle Initialization
$(function() {
	$('.one .photo-carousel').cycle({ 
		fx: 'scrollDown',
		speed:    800, 
    	timeout:  5050 
	});
	$('.two .photo-carousel').cycle({ 
		fx: 'scrollDown',
		speed:    800, 
    	timeout:  6025 
	});
	$('.three .photo-carousel').cycle({ 
		fx: 'scrollDown',
		speed:    800, 
    	timeout:  6075 
	});
	$('.four .photo-carousel').cycle({ 
		fx: 'scrollDown',
		speed:    800, 
    	timeout:  7025 
	});
});

// 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' , '#e4e4e4' );
			}, 
			function () { 
				$(this).children('.hover').addClass('offscreen');
				$(this).children('.project-info').css( 'background-color' , '#e4e4e4' );
			}
		);
		
	}
};
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 = "#e4e4e4"; 
		var fadeColor = "#e4e4e4";
		
		project.children('.hover').css({left: '0px'})
 		project.children().children('.hover-bg').fadeTo(1, 0.0)
		project.children().children('.hover-content').css({left: '-300px'})
 			
		project.hover(
			function () {
				$(this).children().children('.hover-content').css({left: '-300px'});
				$(this).children().children('.hover-bg').stop().fadeTo(600, 0.70);
				$(this).children().children('.hover-content').stop().animate({left: '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({left: '300px'} , { queue: false, duration: 300, easing: 'easeOutQuint' });
				$(this).children('.project-info').stop().animate({backgroundColor:originalBG},850);
			}
		);
		
	}
};
hoverAnim.init();


});
