$(function(){
	
	var fgrid = {
		selector: $('.colour-grid li a'),
		
		a : {
			onstage: {
				zindex: 1
			},
			offstage: {
				zindex:0
			}
		},
		strong : {
			onstage: {
				width: '120px',
				height: '130px',
				left: '-3px',
				top: '-10px'
			},
			offstage: {
				width: '114.283px',
				height: '124px',
				left: '0px',
				top: '0px'
			}
		},
		span : {
			onstage: {
				height: 4,
				bottom: 0
			},
			offstage: {
				height: 0,
				bottom: 0
			}
		},
		
		shadow : {
			onstage: {
				opacity: 1
			}, 
			offstage: {
				opacity: 0
			}
		},
		
		img: {
			onstage: {
				top: -10
			},
			offstage: {
				top: 0
			}
		},
		
		xt : {
		queue:false,
		easing: 'linear',
		duration: 100
	}
	};
	
	/* shadow setup */
	fgrid.selector.children('em').css({opacity: 0}).show();
	
	fgrid.selector
	.bind('mouseover focus',function(){
		
		$(this)
		.css({
			'z-index': fgrid.a.onstage.zindex
		})
		.children('strong')
		.animate({
			width: fgrid.strong.onstage.width,
			height: fgrid.strong.onstage.height,
			left: fgrid.strong.onstage.left,
			top: fgrid.strong.onstage.top
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		.siblings('span')
		.animate({
			height: fgrid.span.onstage.height,
			bottom: fgrid.span.onstage.bottom
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		.siblings('em')
		.animate({
			opacity: fgrid.shadow.onstage.opacity
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		.siblings('img')
		.animate({
			top: fgrid.img.onstage.top
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		
	}).bind('mouseout blur',function(){
		
		$(this)
		.css({
			'z-index': fgrid.a.offstage.zindex
		})
		.children('strong')
		.animate({
			width: fgrid.strong.offstage.width,
			height: fgrid.strong.offstage.height,
			left: fgrid.strong.offstage.left,
			top: fgrid.strong.offstage.top
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		.siblings('span')
		.animate({
			height: fgrid.span.offstage.height,
			bottom: fgrid.span.offstage.bottom
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		.siblings('em')
		.animate({
			opacity: fgrid.shadow.offstage.opacity
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		.siblings('img')
		.animate({
			top: fgrid.img.offstage.top
		},{
			queue:false,
			easing: 'linear',
			duration: 100
		})
		
	})
});


