// JavaScript Document
$(document).ready(function(){
	$('#cart').mouseover(function() {
		$(this).parent().find("#Laos_Cart").slideDown('fast').show();
		$(this).parent().hover(function() {
		}, function(){	
			$(this).parent().find("#Laos_Cart").slideUp('slow');
		});
	});
	var objStr = "#Tophelp";
	$(objStr).mouseover(function(){$(objStr + " dd").show();});
	$(objStr).mouseout(function(){$(objStr + " dd").hide();});
});
//
$(function(){
	setTimeout("showtopad();",6000);//顶部广告时间
    var len = $("#IdHdtitle > li").length;
	var index = 0;
	$("#IdHdtitle li").mouseover(function(){
	   index =   $("#IdHdtitle li").index(this);
	   showImg(index);
	}); 
	$('#IdHuodong').hover(function(){
		 if(MyTime){
		 clearInterval(MyTime);
		 }
	},function(){
		 MyTime = setInterval(function(){
		   showImg(index)
		 index++;
		 if(index==len){index=0;}
		 } , 4000);
	});
	var MyTime = setInterval(function(){
	   showImg(index)
	   index++;
	   if(index==len){index=0;}
	} , 4000);
})
function showImg(i){
   $("#IdHdmain").stop(true,false).animate({top : -210*i},800);
   $("#IdHdtitle li")
    .eq(i).addClass("on")
    .siblings().removeClass("on");
}
$(function() {
	var Pid=$('#Pid').text();
	//金鹰价
	$("#Jyjia").ajaxStart(function(){
      $("#Jyjia").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Jiage&Pid="+Pid+"",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#Jyjia").css("display","none");},success: function(msg){ 
         $("#Jinyingjia").html(msg);} 
     });
    $("#Jyjia").css("display","none");
	//有没货
	$("#Youmeihuo").ajaxStart(function(){
      $("#Youmeihuo").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Kucun&Pid="+Pid+"",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#Youmeihuo").css("display","none");},success: function(msg){ 
         $("#Pkucun").html(msg);} 
     });
    $("#Youmeihuo").css("display","none");
	//商品评论
	$("#PPlun").ajaxStart(function(){
      $("#PPlun").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=PPL&Pid="+Pid+"",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#PPlun").css("display","none");},success: function(msg){ 
         $("#Ppinglun").html(msg);} 
     });
    $("#PPlun").css("display","none");
	//购物车
	$("#Pgwc").ajaxStart(function(){
      $("#Pgwc").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Pgwcan&Pid="+Pid+"",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#Pgwc").css("display","none");},success: function(msg){ 
         $("#Pgouwuche").html(msg);} 
     });
    $("#Pgwc").css("display","none");
	//商品评分
	$("#Pfpf").ajaxStart(function(){
      $("#Pfpf").css("display","block");
	});
    $.ajax({type: "get",url: "/PPP.asp?Act=Pingfen&Pid="+Pid+"",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#Pfpf").css("display","none");},success: function(msg){ 
         $("#Pfpingfen").html(msg);} 
     });
    $("#Pfpf").css("display","none");
	//购前咨询
	$("#Pfzx").ajaxStart(function(){
      $("#Pfzx").css("display","block");
	});
    $.ajax({type: "get",url: "/PPP.asp?Act=Zixun&Pid="+Pid+"",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#Pfzx").css("display","none");},success: function(msg){ 
         $("#Pfzixun").html(msg);} 
     });
    $("#Pfzx").css("display","none");
	//头部登陆
	$("#HiJinying").ajaxStart(function(){
      $("#HiJinying").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Denglu",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#HiJinying").css("display","none");},success: function(msg){ 
         $("#welcome").html(msg);} 
     });
    $("#HiJinying").css("display","none");
	//浏览记录
	$("#loadimg").ajaxStart(function(){
      $("#loadimg").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Liulanjilu",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#loadimg").css("display","none");},success: function(msg){ 
         $("#Liulanjilu").html(msg);} 
     });
    $("#loadimg").css("display","none");
	//购物车
	$("#loadimgs").ajaxStart(function(){
      $("#loadimgs").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Gouwuche",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#loadimgs").css("display","none");},success: function(msg){ 
         $("#Laos_Cart").html(msg);} 
     });
    $("#loadimgs").css("display","none");
	
	$("#loadimgss").ajaxStart(function(){
      $("#loadimgss").css("display","block");
	});
    $.ajax({type: "get",url: "/Click.asp?Act=Gouwuches",datatype:"text",data: "name=John",cache:false,complete:function(){
         $("#loadimgss").css("display","none");},success: function(msg){ 
         $("#Fan_Carts").html(msg);} 
     });
    $("#loadimgss").css("display","none");
	//帮助中心树型菜单
	$(".HpmenuTitle").click(function(){
			$(this).next("div").slideToggle("slow")
			.siblings(".Hpmenum:visible").slideUp("slow");
		});
	//会员导航
	$('.User_Liebiao li').mouseover(function(){
	$(this).css("backgroundColor","#f1f1f1");
	}).mouseout(function(){
	$(this).css("backgroundColor","");
	});
	//选项卡
	$('.TabTitle li').click(function(){
		$(this).addClass("tabin").siblings().removeClass();
		$(".TabContent > ul").eq($(".TabTitle li").index(this)).show().siblings().hide();
	});
	// 放大镜
    var options =
    {
        zoomWidth: 350,
        zoomHeight: 240,
        showEffect:'show',
        hideEffect:'fadeout',
        fadeoutSpeed: 'slow',
        title :false
    }
    $(".jqzoom").jqzoom(options);
    // 图片左右滚动
    $('#image_list').jcarousel();
    // 点击小图更换大图
    $('#image_list img:only-child').click(function(){
        $('#current_img').attr('src', this.src);
        // 大图的命名方式为 小图 + 下划线
        $('#current_img').parent().attr('href', this.alt);
    });
	$('#Huodong').Slider({width: 560,height: 210,title:'#title',shownum:true});
});
function killErrors() { 
return true; 
} 
window.onerror = killErrors; 