﻿//verify the user name exists   begin20100607//
if(GetCookie("name")!="")//username exists
{
    $(".yh_m").html("<b><a href=\"http://www.gojiaju.cn/user/\">"+GetCookie("name")+"</a></b> 您好");
    $(".login").hide();
    $(".login_2").show();
}
else
{

}
//verify the user name exists   end20100607//
//after login method    begin20100607//
var show_time = "200";
var timer1 = "";
var timer2 = "";
 
$(".my_sc,.headul").mouseover(function(){
    clearTimeout(timer2);
    timer1 = setTimeout(" $('.headul').show(100);",show_time);
}).mouseout(function(){
    clearTimeout(timer1);
    timer2 =setTimeout(" $('.headul').hide(100);",show_time);
})
 
$(".headul").find("li").mouseover(function(){
    $(this).addClass("this_3");
}).mouseout(function(){
    $(this).removeClass("this_3");
})
//after login method    end20100607//



$(document).ready(function(){
    // 商品导航	滑过
    var show_time = "200";
    var timer1 = "";
    var timer2 = "";
    
    var timer3 = "";
    var timer4 = "";
    
    
    $(".gn_title2,.sear_tit,.spdh_ul2,.All2").mouseover(function(){
        clearTimeout(timer2);
        timer1 = setTimeout("$('.spdh_ul2').show();$('.All2').show();$('.sear_tit').hide();",show_time);
        
    }).mouseout(function(){
        clearTimeout(timer1);
        //timer2 =setTimeout(" $('.spdh_ul2').hide();$('.All2').hide();$('.sear_tit').show();",show_time);
    });
 
    // 商品导航 列出滑过
    $(function(){	
        $(".spdh_ul2>li").hover(function () { 
                $(this).find(".warp").show();
                $(this).find("a").eq(0).addClass("this_2");
            },
            function () {
                $(this).find(".warp").hide();
                $(this).find("a").eq(0).removeClass("this_2");
            }
        );
        
        var ullen = $(".spdh_ul2>li").length;
        
        $(".spdh_ul2>li").each(function(i){
            var dt = ullen-i;						   
            $(this).css("z-index",dt);
        });
    });
    
    
//    $("#my_car,#car_hover").mouseover(function(){
//        $("#my_car").addClass("car_span");
//        clearTimeout(timer2);
//        timer1 = setTimeout(" $('#car_hover').show();",0);
//        $("#my_car").children("em").hide();
//        
//    }).mouseout(function(){
//        $("#my_car").removeClass("car_span");
//        clearTimeout(timer1);
//        timer2 =setTimeout(" $('#car_hover').hide();",0);
//        $("#my_car").children("em").show();
//    });
    
    
    $("#big_class_f,#search_big_class").mouseover(function(){
        $("#big_class_f").removeClass("text_1");
        $("#big_class_f").addClass("tex_1");
        $("#search_big_class").show();
    }).mouseout(function(){
        $("#big_class_f").removeClass("tex_1");
        $("#big_class_f").addClass("text_1");
        $("#search_big_class").hide();
    })
    
    $("#search_big_class").find("li").click(function(){
        $("#big_class_f").removeClass("tex_1");
        $("#big_class_f").addClass("text_1");
        $("#search_big_class").hide();
        
        var catid = $(this).find("a").attr("val");
        var class_id2 = $(this).find("a").attr("val2");
        
        $("#big_class").html($(this).find("a").html());
        $("#big_class").css({color:"#000","font-weight":"bold"});
        $("#catid").val(catid);
        $("#cat2id").val(class_id2);
        
        $("#subcatid").val("");
        $("#manuid").val("");
        
        $("#keyword").focus();
    })
    
    $("#search_big_class").find("li").mouseover(function(){
        clearTimeout(timer4);
        timer3 = setTimeout(" $(this).addClass('warp3_m');",show_time);
    }).mouseout(function(){
        clearTimeout(timer3);
        timer4 =setTimeout(" $(this).removeClass('warp3_m');",show_time);
    })
    
});


