$(document).ready(function() {

	if ($.browser.msie) {
		$("head").append('<link rel="stylesheet" type="text/css" href="css/ie-v1.css" />');
	}

	
	$('.person').hover(
		
		function() {
			$('.tip-person').queue([]).stop();
			$('.tip-person').find("#person-name").empty().append($(this).attr("name"));
			$('.tip-person').find("#person-gig").empty().append($(this).attr("gig"));
			$('.tip-person')
				.css({ top: $(this).position().top + 120 })
				.animate({ opacity: 1, left: $(this).position().left - 24}, "fast", "easeOutSine");
		}, 
		
		function() {
			$('.tip-person').animate({opacity: 0}, 200);
		}
		
	);
	
	
	// timeline v-scroller
	
	if ($("#timeline-scroll").length > 0)
		$("#timeline-scroll").css({overflow: "hidden", position: "relative", top: 0, height: 400}).jScrollPane();
		
		
		//.mousemove(function(e) {
		//	$('#timeline-list').queue([]).stop();
		//	var offset = e.pageY - $("#timeline-scroll").position().top - 166;
		//	$("#timeline-list").css({position: "relative", top: (-2.6 * offset)})
		//})
		
		
	//$("#page").mouseover(function() {
	//	$("#timeline-list").animate({top: 0}, 1000, "easeOutBounce");
	//});
	
	
	
	$(".product-shadow")
		.mousemove(function(e) {
		
		
			var topOff = e.pageY - $(this).position().top - 210;
			var leftOff = e.pageX - $(this).position().left - 193;
		
			$(this).siblings(".product-img:first").css({top: topOff / -15, left: leftOff /-15});
		
		
		})
		.mouseout(function() {
			$(this).siblings(".product-img:first").animate({top: -20, left: -20}, "medium", "easeOutBounce")
		
		});
	
});