$(document).ready(function(){
	$('.feature_right_bg').css({ opacity: 0.5 });
	$('.feature_right_detail').css({ opacity: 0 });
	$('.feature_right').hover(function() {
		animate_down($(this), '.feature_right_bg');
		animate_down($(this), '.feature_right_text');
		animate_right($(this), '.feature_right_arrow');
		show_detail($(this));
	}, function() {
		animate_up($(this), '.feature_right_bg');
		animate_up($(this), '.feature_right_text');
		animate_left($(this), '.feature_right_arrow');
		hide_detail($(this));
	});
	function animate_down(object, name) {
		object.find(name).animate({
			//top: '+=40px'
			opacity: 0
		}, 200, function() {});
	}
	function animate_up(object, name) {
		object.find(name).animate({
			//top: '-=40px',
			opacity: 0.7
		}, 200, function() {});
	}
	function animate_right(object, name) {
		object.find(name).animate({
			left: '+=5px'
		}, 200, function() {});
	}
	function animate_left(object, name) {
		object.find(name).animate({
			left: '-=5px'
		}, 200, function() {});
	}
	function show_detail(object) {
		object.find('.feature_right_detail').animate({
			opacity: 0.7
		}, 200, function() {});
	}
	function hide_detail(object) {
		object.find('.feature_right_detail').animate({
			opacity: 0
		}, 200, function() {});
	}
});

