﻿jQuery(document).ready(function ($) {


    var hoverAnim = {
        init: function () {
            var project = $('.teamItem');
            var projectTxt = project.children('.teamItemHover');
            var projectInfo = project.children('.imgStop');
            var originalBG = "#272623";
            var fadeColor = "#cc0000";

            project.children('.hover').css({ left: '0px' })
            project.children().children('.teamItemHoverBkG').fadeTo(1, 0.0)
            project.children().children('.teamItemHoverContent').css({ left: '-200px' })

            project.hover(
			function () {
			    $(this).children().children('.teamItemHoverContent').css({ left: '-200px' });
			    $(this).children().children('.teamItemHoverBkG').stop().fadeTo(600, 0.70);
			    $(this).children().children('.teamItemHoverContent').stop().animate({ left: '0px' }, { queue: false, duration: 450, easing: 'easeOutQuint' });
			    $(this).children('.imgStop').stop().animate({ backgroundColor: fadeColor }, 750);
			},
			function () {
			    $(this).children().children('.teamItemHoverBkG').stop().fadeTo(800, 0.0);
			    $(this).children().children('.teamItemHoverContent').stop().animate({ left: '200px' }, { queue: false, duration: 300, easing: 'easeOutQuint' });
			    $(this).children('.imgStop').stop().animate({ backgroundColor: originalBG }, 850);
			}
		);

        }
    };
    hoverAnim.init();


});
