$(document).ready(function(){
	$('.image_over').each(function(){
		$(this).css({
			'width': '355px',
			'height': '150px',
			'overflow': 'hidden',
			'position': 'relative',
		});
		
		$(this).children('a').css({
				'position': 'absolute',
			});
		
		$(this).children('a').bind('mouseenter',function(){
			$(this).stop();
			$(this).animate({top: -150}, 300);
		});
		
		$(this).children('a').bind('mouseleave',function(){
			$(this).stop();
			$(this).animate({top: 0}, 300);
		});
	});
	
	$('.homeslide').children('.box').css({'top' : -150});
	$('.homeslide').bind('mouseenter',function(){
		$(this).children('.box').animate({top: 0}, 300);
	});
	
	$('.homeslide').bind('mouseleave',function(){
		$(this).children('.box').animate({top: -150}, 300);
	});
	
	window.setTimeout(slidemove, 1000 * slide_time);
});


var slide_time = 5;
var slide_index = 0;

function slidemove()
{
	$target = $('.img_home .container');
	$total = $target.children().length;
	
	slide_index++;
	if(slide_index >= $total)
		slide_index = 0;
		
	$target.animate({left: slide_index * -720}, 500);
	window.setTimeout(slidemove, 1000 * slide_time);
}
