var iCurrImgIndex=0;
$(function (){
$('#pic_list img').mouseover(function(){
if($('#this_pic').attr('src') == $(this).attr('src')) return;
var imgs = $('#pic_list img');
if( imgs.length>0 ) {
for( var i=0;i<imgs.length;i++ ) {
if($(this).attr('src')==$(imgs[i]).attr('src')) {
iCurrImgIndex=i;
break;
}
}
}
$('#this_pic').fadeOut(0).fadeIn(300).attr('src',$(this).attr('src'));
$('#this_a').attr('href',$(this).parents('a').attr('href'));
$('#this_a').attr('title',$(this).parents('a').attr('title'));
$('#qy').html($(this).parents('a').attr('title'));
$(this).parents('li').nextAll('li').find('img').animate({top:18,opacity:0.6},500);
$(this).parents('li').prevAll('li').find('img').animate({top:18,opacity:0.6},500);
$(this).animate({top:0},300).css('opacity','1');

});
});
$(function(){
$('#transparence').css('opacity','0.4');
$('#pic_list img').css({'opacity':'0.6'});
$('#pic_list img:eq(0)').css({'top':'0','opacity':'1'});
$('#pic_list a').click(function(){return false});
});
$(function(){
$('#topic').css('opacity','0.4');
});

function loopPicList() {
var imgs = $('#pic_list img');
if(iCurrImgIndex>=imgs.length) iCurrImgIndex = 0;
$(imgs[iCurrImgIndex]).mouseover();
iCurrImgIndex++;
setTimeout('loopPicList()', 5000);
}
$(function(){
var imgs = $('#pic_list img');
if( imgs.length>0 ) {loopPicList();}
});
