$(function(){
	var t=500;
	var animated=0;
	$('#slider li').eq(1).css({'z-index':2,'top':'20px','left':'215px','width':'204px'}).show();
	$('#slider li').eq(1).find('span').css({'font-size':'0.8em','margin-top':'110px','padding-right':'10px'});
	$('#slider li').eq(1).find('a.title').css({'font-size':'0.8em','width':'204px','margin-top':'-40px'});
	$('#slider li').eq(0).css({'top':'10px','left':'20px','width':'149px'}).show();
	$('#slider li').eq(0).find('img').width(149);
	$('#slider li').eq(0).find('span').css({'z-index':2,'font-size':'0.64em','margin-top':'82px','padding-right':'4px'});
	$('#slider li').eq(0).find('a.title').css({'font-size':'0.64em','width':'149px','margin-top':'-30px'});
	$('#slider li').eq(2).css({'top':'10px','left':'468px','width':'149px'}).show();
	$('#slider li').eq(2).find('img').width(149);
	$('#slider li').eq(2).find('span').css({'font-size':'0.64em','margin-top':'82px','padding-right':'4px'});
	$('#slider li').eq(2).find('a.title').css({'font-size':'0.64em','width':'149px','margin-top':'-30px'});
	$('div.left').click(function(){
		if(!animated){
			animated=1;
			$('#slider li').eq(0).css('z-index',1).animate({'top':'0px','left':'315px','opacity':0,'width':'0px'},t,function(){
				$(this).hide();
			});
			$('#slider li').eq(0).find('img').animate({'width':'0px'},t);
			$('#slider li').eq(0).find('span').animate({'font-size':0,'margin-top':'0px','padding-right':'0px'},t);
			$('#slider li').eq(0).find('a.title').animate({'font-size':0,'width':'0px','margin-top':'0px'},t);
			$('#slider li').eq(1).animate({'top':'10px','left':'20px','width':'149px'},t);
			$('#slider li').eq(1).find('img').animate({'width':'149px'},t);
			$('#slider li').eq(1).find('span').animate({'font-size':'0.64em','margin-top':'82px','padding-right':'4px'},t);
			$('#slider li').eq(1).find('a.title').animate({'font-size':'10px','width':'149px','margin-top':'-30px'},t);
			$('#slider li').eq(2).css('z-index',2).animate({'top':'20px','left':'215px','width':'204px'},t);
			$('#slider li').eq(2).find('img').animate({'width':'204px'},t);
			$('#slider li').eq(2).find('span').animate({'font-size':'0.8em','margin-top':'110px','padding-right':'10px'},t);
			$('#slider li').eq(2).find('a.title').animate({'font-size':'0.8em','width':'204px','margin-top':'-40px'},t);
			$('#slider li').eq(3).css({'top':'0px','left':'315px','opacity':0,'width':'0px'}).show();
			$('#slider li').eq(3).find('img').width(0);
			$('#slider li').eq(3).find('span').css({'font-size':0,'margin-top':'0px','padding-right':'0px'});
			$('#slider li').eq(3).find('a.title').css({'font-size':'0em','width':'0px','margin-top':'0px'});
			$('#slider li').eq(3).animate({'top':'10px','left':'468px','opacity':1,'width':'149px'},t);
			$('#slider li').eq(3).find('img').animate({'width':'149px'},t);
			$('#slider li').eq(3).find('span').animate({'font-size':'0.64em','margin-top':'82px','padding-right':'4px'},t);
			$('#slider li').eq(3).find('a.title').animate({'font-size':'0.64em','width':'149px','margin-top':'-30px'},t);
			setTimeout(function(){
				$('#slider li').eq(-1).after($('#slider li').eq(0));
				animated=0;
			},t);
		}
		return false;
	});
	$('div.right').click(function(){
		if(!animated){
			animated=1;
			$('#slider li').eq(0).css('z-index',2).animate({'top':'20px','left':'215px','width':'204px'},t);
			$('#slider li').eq(0).find('img').animate({'width':'204px'},t);
			$('#slider li').eq(0).find('span').animate({'font-size':'0.8em','margin-top':'110px','padding-right':'10px'},t);
			$('#slider li').eq(0).find('a.title').animate({'font-size':'0.8em','width':'204px','margin-top':'-40px'},t);
			$('#slider li').eq(1).animate({'top':'10px','left':'468px','width':'149px'},t);
			$('#slider li').eq(1).find('img').animate({'width':'149px'},t);
			$('#slider li').eq(1).find('span').animate({'font-size':'0.64em','margin-top':'82px','padding-right':'4px'},t);
			$('#slider li').eq(1).find('a.title').animate({'font-size':'0.64em','width':'149px','margin-top':'-30px'},t);
			$('#slider li').eq(2).css('z-index',1).animate({'top':'0px','left':'315px','opacity':0,'width':'0px'},t,function(){
				$(this).hide();
			});
			$('#slider li').eq(2).find('img').animate({'width':'0px'},t);
			$('#slider li').eq(2).find('span').animate({'font-size':0,'margin-top':'0px','padding-right':'0px'},t);
			$('#slider li').eq(2).find('a.title').animate({'font-size':0,'width':'0px','margin-top':'0px'},t);
			$('#slider li').eq(-1).css({'top':'0px','left':'315px','z-index':1,'opacity':0,'width':'0px'}).show();
			$('#slider li').eq(-1).find('img').width(0);
			$('#slider li').eq(-1).find('span').css({'font-size':0,'margin-top':'0px','padding-right':'0px'});
			$('#slider li').eq(-1).find('a.title').css({'font-size':'0em','width':'0px','margin-top':'0px'});
			$('#slider li').eq(-1).animate({'top':'10px','left':'20px','opacity':1,'width':'149px'},t);
			$('#slider li').eq(-1).find('img').animate({'width':'149px'},t);
			$('#slider li').eq(-1).find('span').animate({'font-size':'0.64em','margin-top':'82px','padding-right':'4px'},t);
			$('#slider li').eq(-1).find('a.title').animate({'font-size':'0.64em','width':'149px','margin-top':'-30px'},t);
			setTimeout(function(){
				$('#slider li').eq(0).before($('#slider li').eq(-1));
				animated=0;
			},t);
		}
		return false;
	});
});
