﻿$(document).ready(function(){
function AutoScroll(obj){
$(obj).find("ul:first").animate({
marginTop:"-25px"
},500,function(){
$(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
});
}

//picture
$(function(){
var len = $("#idNum > li").length;
var index = 1;
$("#idNum li").mouseover(function(){
   index =   $("#idNum li").index(this);
   showImg(index);
}); 
$('#idTransformView').hover(function(){
     if(MyTime){
     clearInterval(MyTime);
     }
},function(){
     MyTime = setInterval(function(){
       showImg(index)
     index++;
     if(index==len){index=0;}
     } , 5000);
});
var MyTime = setInterval(function(){
   showImg(index)
   index++;
   if(index==len){index=0;}
} , 5000);
})
function showImg(i){
   $("#idSlider").stop(true,false).animate({bottom : -300*i},500);
   $("#idNum li")
    .eq(i).addClass("on")
    .siblings().removeClass("on");
}
})

$(document).ready(function(){
	$("#home_show_panel_list .item:even").css({"background-color":"#CCCCCC"})
	$("#home_show_panel_list .item:odd").css({"background-color":"#EEEEEE"})
	
	$("#bt_search").click(function(){
		if ($("#girl_color").val()==0 && $("#key").val()==""){alert("请输入搜索关键词");return}
		location="/?key="+escape($("#key").val())+"&color="+escape($("#girl_color").val())
		})
		
$("#head #nav .bt").hover(
  function () {
	$(this).parent().addClass("mhover") 
    
  },
  function () {
	$(this).parent().removeClass("mhover") 
  }
);

		
	})
