$(document).ready(function() {
	
	// Center container
	var wH = $(window).height();
	var cH = $('#bodis').height();
	var mT = (wH - cH)/2
	$('#bodis').css('margin-top', mT + 'px');
	
	$('#item-1').hoverIntent({
		interval: 50,
		timeout: 200,
		over: function() {
			// move the bottle
			$('#bottle-1').animate({ top: '-=25px'}, 250);
			// move the shadow
			$('#shadow-1').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			$('#shadow-1-h').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			// move the reflection
			$('#reflection-1').animate({ top: '+=25px'}, 250);
		},
		out: function() {
			// move the bottle
			$('#bottle-1').animate({ top: '+=25px'}, 250);
			// move the shadow
			$('#shadow-1').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			$('#shadow-1-h').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			// move the reflection
			$('#reflection-1').animate({ top: '-=25px'}, 250);
		}
	});
	
	$('#item-2').hoverIntent({
		interval: 50,		
		timeout: 200,
		over: function() {
			// move the bottle
			$('#bottle-2').animate({ top: '-=25px'}, 250);
			// move the shadow
			$('#shadow-2').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			$('#shadow-2-h').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			// move the reflection
			$('#reflection-2').animate({ top: '+=25px'}, 250);
		},
		out: function() {
			// move the bottle
			$('#bottle-2').animate({ top: '+=25px'}, 250);
			// move the shadow
			$('#shadow-2').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			$('#shadow-2-h').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			// move the reflection
			$('#reflection-2').animate({ top: '-=25px'}, 250);
		}
	});	
	
	$('#item-3').hoverIntent({
		interval: 50,		
		timeout: 200,
		over: function() {
			// move the bottle
			$('#bottle-3').animate({ top: '-=25px'}, 250);
			// move the shadow
			$('#shadow-3').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			$('#shadow-3-h').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			// move the reflection
			$('#reflection-3').animate({ top: '+=25px'}, 250);
		},
		out: function() {
			// move the bottle
			$('#bottle-3').animate({ top: '+=25px'}, 250);
			// move the shadow
			$('#shadow-3').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			$('#shadow-3-h').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			// move the reflection
			$('#reflection-3').animate({ top: '-=25px'}, 250);
		}
	});	
	
	$('.item-1').hoverIntent({
		interval: 50,
		timeout: 200,
		over: function() {
			// move the bottle
			$('.item-bottle-1').animate({ top: '-=15px'}, 250);
			// move the shadow
			$('.item-shadow-1').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			$('.item-shadow-1-h').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			// move the reflection
			$('.item-reflection-1').animate({ top: '+=15px'}, 250);
		},
		out: function() {
			// move the bottle
			$('.item-bottle-1').animate({ top: '+=15px'}, 250);
			// move the shadow
			$('.item-shadow-1').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			$('.item-shadow-1-h').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			// move the reflection
			$('.item-reflection-1').animate({ top: '-=15px'}, 250);
		}
	});	
	
	$('.item-2').hoverIntent({
		interval: 50,
		timeout: 200,
		over: function() {
			// move the bottle
			$('.item-bottle-2').animate({ top: '-=15px'}, 250);
			// move the shadow
			$('.item-shadow-2').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			$('.item-shadow-2-h').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			// move the reflection
			$('.item-reflection-2').animate({ top: '+=15px'}, 250);
		},
		out: function() {
			// move the bottle
			$('.item-bottle-2').animate({ top: '+=15px'}, 250);
			// move the shadow
			$('.item-shadow-2').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			$('.item-shadow-2-h').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			// move the reflection
			$('.item-reflection-2').animate({ top: '-=15px'}, 250);
		}
	});
	
	$('.item-3').hoverIntent({
		interval: 50,
		timeout: 200,
		over: function() {
			// move the bottle
			$('.item-bottle-3').animate({ top: '-=15px'}, 250);
			// move the shadow
			$('.item-shadow-3').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			$('.item-shadow-3-h').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			// move the reflection
			$('.item-reflection-3').animate({ top: '+=15px'}, 250);
		},
		out: function() {
			// move the bottle
			$('.item-bottle-3').animate({ top: '+=15px'}, 250);
			// move the shadow
			$('.item-shadow-3').animate({ opacity: 1 }, 250, 'easeInOutQuart');
			$('.item-shadow-3-h').animate({ opacity: 0 }, 250, 'easeInOutQuart');
			// move the reflection
			$('.item-reflection-3').animate({ top: '-=15px'}, 250);
		}
	});		
	
});
