
$(document).ready(function(){if($('#email').val()=='')
$('#email').focus();else
$('#password').focus();$('.indexTopUsersPicDesc').hide();showTopUsers();$('.indexTopUsersPic').mouseover(function(){clearInterval(intervalID);showDescription($(this).attr('number'));});$('.indexTopUsersPic').mouseout(function(){intervalID=setInterval('showRandom()',switchingInterval);hideDescription($(this).attr('number'));});showRandom();intervalID=setInterval('showRandom()',switchingInterval);if(GRAY_DAY==1){$('img').each(function(){Pixastic.process(this,"desaturate",{average:false});});}});var switchingInterval=3000;var intervalID=-1;var current=0;var pattern=new Array(2,6,5,4,1,3);function showRandom(){if(current>5)
current=0;showDescription(pattern[current]);current++;}
function showDescription(number){$('.indexTopUsersPicDesc').hide();$('#userDescription'+number).show();}
function hideDescription(number){$('#userDescription'+number).hide();}
var count=1;function showTopUsers(){$('.topUsers').each(function(){var html="<a href='profile.php?userID="+$(this).attr('userid')+"'><img src='viewpicture.php?userID="+$(this).attr('userid')+"' class='topUserImage'/></a>";$('#userPic'+count).html(html);html="<div class='fullname blue'>"+$(this).attr('fullname')+"</div>";html=html+"<div class='location'>"+$(this).attr('province')+"&nbsp;"+$(this).attr('city')+"</div>";html=html+"<div class='friendsCount'>+<span class='orange '>"+$(this).attr('count')+"</span>位好友</div>";$('#userDescription'+count).find('.indexTopUsersPicDescRight').html(html);count++;});}
