(function($) {
	$(function(){
		if($.browser.msie && ($.browser.version == "6.0")){
			transShow = 0
		} else {
			transShow = 550
		}
		
		
			   
		var delayTime = 7000;
	
		$("img.sys_playerProfileImg, div.imgContent").hide();
		$("img.sys_playerProfileImg:last, div.imgContent:last").addClass('last');
		
		photoIndex = 0;
		function play(){
			$("ul.sys_profileImgs li").eq(photoIndex).addClass('sys_linkSelect');
			$("img.sys_playerProfileImg").eq(photoIndex).fadeIn(transShow).animate({left:0},delayTime,function(){
				$(this).fadeOut(transShow, function(){
					if( $(this).hasClass('last') ){
						photoIndex = 0;
						play();
					} else {
						photoIndex++
						play();
					}
					$("ul.sys_profileImgs li").removeClass('sys_linkSelect');
					$("ul.sys_profileImgs li").eq(photoIndex).addClass('sys_linkSelect');
				});
			});
			
			$("div.imgContent").eq(photoIndex).fadeIn(transShow).animate({left:0},delayTime,function(){
				$(this).fadeOut(transShow);
			});
			
		
			
			$("ul.sys_profileImgs li").click(function(){
				$("ul.sys_profileImgs li").removeClass('sys_linkSelect');
				$(this).addClass('sys_linkSelect');
				clickIndex = $(this).parent().children("li").index(this);
				$("div.imgContent").stop().fadeOut(transShow);
				$("img.sys_playerProfileImg").eq(photoIndex).stop().fadeOut(transShow,function(){
					photoIndex = clickIndex;																	
					play();
				});
	
				return false;
			});
	
		}
		play();
	});
})(jQuery);