$(document).ready(function(){
 	var _animateEl = $('div.carousel li'),
		_length = _animateEl.length;
	
	var _nextEls = 2,
		_duration = 300;
	
	var _mainStyle = {
		'fontSize':13,
		'width':226,
		'paddingBottom':15
	},
	_style1 = {
		'fontSize':11,
		'width':142,
		'paddingBottom':8
	},
	_style2 = {
		'fontSize':9,
		'width':102,
		'paddingBottom':4
	},
	_style3 = {
		'fontSize':8,
		'width':82,
		'marginBottom':2
	},
	_style4 = {
		'fontSize':7,
		'width':65,
		'paddingBottom':1
	},
	_style5 = {
		'fontSize':7,
		'width':53,
		'paddingBottom':0
	},
	_otherStyle = {
		'fontSize':7,
		'width':45,
		'paddingBottom':0
	};
	_animateEl.css(_otherStyle).hide();
	
	var _f = 0;
	function setAnimate(_index) {
		_animateEl.eq(_index).animate(_mainStyle,{dyration:_duration,queue:false, complete:function(){
				if (_f==0) {
					_animateEl.show(300);
				}
			}
		});
		_animateEl.eq(_index).find('img').stop()
			.animate({'opacity':0.5},100)
			.animate({'opacity':1},100);
		
		if (_index-1 >= 0) _animateEl.eq(_index-1).animate(_style1,{dyration:_duration,queue:false});
		if (_index-2 >= 0) _animateEl.eq(_index-2).animate(_style2,{dyration:_duration,queue:false});
		if (_index-3 >= 0) _animateEl.eq(_index-3).animate(_style3,{dyration:_duration,queue:false});
		if (_index-4 >= 0) _animateEl.eq(_index-4).animate(_style4,{dyration:_duration,queue:false});
		if (_index-5 >= 0) _animateEl.eq(_index-5).animate(_style5,{dyration:_duration,queue:false});
		if (_index-6 >= 0) _animateEl.eq(_index-6).animate(_otherStyle,{dyration:_duration,queue:false});
		
		if (_index+1 < _length) _animateEl.eq(_index+1).animate(_style1,{dyration:_duration,queue:false});
		if (_index+2 < _length) _animateEl.eq(_index+2).animate(_style2,{dyration:_duration,queue:false});
		if (_index+3 < _length) _animateEl.eq(_index+3).animate(_style3,{dyration:_duration,queue:false});
		if (_index+4 < _length) _animateEl.eq(_index+4).animate(_style4,{dyration:_duration,queue:false});
		if (_index+5 < _length) _animateEl.eq(_index+5).animate(_style5,{dyration:_duration,queue:false});
		if (_index+6 < _length) _animateEl.eq(_index+6).animate(_otherStyle,{dyration:_duration,queue:false});
	}
		
	_animateEl.mouseenter(function(){
		var _index = _animateEl.index(this);
		setAnimate(_index);
		return false;
	});
	
	setAnimate(_animateEl.index(_animateEl.filter('.active')))
});