function bannerGallery(){
	$('.bannerArea ul li').css({opacity: '0'});
	$('.bannerArea ul li:first').css({opacity: '1'});
	$('.subBanner b').click(function(){
		$('.bannerArea ul li').each(function(){
			if($(this).css('visibility')=='visible'){
				$(this).animate({opacity: '0'},300);
			}
		});
		var str = $('i',this).html();
		$('.bannerArea ul li:nth-child('+str+')').animate({opacity: '1'},500);
		$('.subBanner b').each(function(){
			if($('strong',this).hasClass('slced')){
				$('strong',this).removeClass('slced');
			}
		});
		$('strong',this).addClass("slced");
	});				  
}

function botGallery(){
	var width = $('.botGl dd').width();
	var pos = $('.botGl').position();
	$('.botGl').prepend($('.botGl dd:last-child')).css({left: pos.left-width-20+'px'});
	$('.next').click(function(){				
		var pos = $('.botGl').position();
		$('.botGl').prepend($('.botGl dd:last-child')).css({left: pos.left-width-20+'px'});
		var pos = $('.botGl').position();
		$('.botGl').animate({left: pos.left+width+20+'px'},500);
		
	});
	$('.previous').click(function(){						
		var pos = $('.botGl').position();		
		$('.botGl').css({left: pos.left+width+20+'px'});	
		var pos = $('.botGl').position();		
		$('.botGl').append($($('.botGl dd:first-child'))).animate({left: pos.left-width-20+'px'},500);
	});
}


if($('.botGalCont dl dd').length>=4)                    botGallery();

