$(document).ready(function() {

	$(".slider_div").live('mouseenter',
			function(){
			var next = $(this).parent().next().children('img').css('z-index');
			var next = parseInt(next) + 1;
			var top = next + 1;
				$(this).next().delay(100).stop().animate({"left": "340"}, 500 );
				$(this).css("z-index", top);
		  		$(this).next().animate({"z-index": next }, 100 );
		  		}).live('mouseleave',	
			function(){
				$(this).next().animate({"left": "10"}, 500 );
		  		$(this).next().animate({"z-index": "0"}, 100 );
		  		$(this).animate({"z-index": "1"}, 1000 );
				}
		);
		
	$(".slider_div_end").live('mouseenter',
		function(){
		var next = $(this).parent().prev().children('img').css('z-index');
		var next = parseInt(next) + 1;
		var top = next + 1;
			$(this).next().delay(100).stop().animate({"left": "-320"}, 500 );
			$(this).css("z-index", top);
	  		$(this).next().animate({"z-index": next }, 100 );
	  		}).live('mouseleave',	
		function(){
			$(this).next().animate({"left": "10"}, 500 );
	  		$(this).next().animate({"z-index": "0"}, 100 );
	  		$(this).animate({"z-index": "1"}, 1000 );
			}
	);

	
		
	$(".slider_work").live('mouseenter',
			function(){
			var next = $(this).parent().next().children('a').children('.top').css('z-index');
			var next = parseInt(next) + 1;
			var top = next + 1;
				$(this).children().css("z-index", top);
				$(this).prev(".hideshow").css("z-index", next);
				$(this).prev(".hideshow").stop().animate({left: '340'}, 700);
				$(this).children(".top").fadeOut(900);
		  		}).live('mouseleave',	
			function(){
				$(this).prev(".hideshow").stop().animate({left: '10', "z-index": "0"}, 700);
				$(this).children().animate({"z-index": "0"}, 700);
		  		$(this).children(".top").fadeIn(900);
				}
		);
		
	$(".slider_work_end").live('mouseenter',
			function(){
			var next = $(this).parent().prev().children('a').children('.top').css('z-index');
			var next = parseInt(next) + 1;
			var top = next + 1;
				$(this).children().stop().css("z-index", top);
				$(this).prev(".hideshow").stop().css("z-index", next);
				$(this).prev(".hideshow").stop().animate({left: '-320'}, 700);
				$(this).children(".top").fadeOut(900);
		  		}).live('mouseleave',	
			function(){
				$(this).prev(".hideshow").stop().animate({left: '10', "z-index": "0"}, 700);
				$(this).children().animate({"z-index": "0"}, 700);
		  		$(this).children(".top").fadeIn(900);
				}
		);
	
	
});


