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

var fancyHover = {
	init: function() {
		var works = $('#works_container li');
			
		works.hover(
			function () { 
				$(this).children('.hover').removeClass('offscreen'); 
			}, 
			function () { 
				$(this).children('.hover').addClass('offscreen');
			}
		);
		
	}
};
fancyHover.init();


var hoverAnim = {
	init: function() {
		var works = $('#works_container li');
		
		works.children('.hover').css({left: '0px'})
 		works.children().children('.hover-bg').fadeTo(1, 0.0)
		works.children().children('.hover-content').css({left: '-326px'})
 			
		works.hover(
			function () {
				$(this).children().children('.hover-content').css({left: '-326px'});
				$(this).children().children('.hover-bg').stop().fadeTo(600, 0.8);
				$(this).children('.more').stop().fadeTo(500, 0.0);
				$(this).children().children('.hover-content').stop().animate({left: '0px'} , 300);
			}, 
			function () {
				$(this).children().children('.hover-bg').stop().fadeTo(800 , 0.0);
				$(this).children('.more').stop().fadeTo(600 , 1.0);
				$(this).children().children('.hover-content').stop().animate({left: '326px'} , 200);
			}
		);
		
	}
};
hoverAnim.init();


});
