﻿// JScript 文件

$(document).ready(function(){
    $("#t1").hover(function(){GetFocus(1);},function(){});
    $("#t2").hover(function(){GetFocus(2);},function(){});
    $("#t3").hover(function(){GetFocus(3);},function(){});
    $("#t4").hover(function(){GetFocus(4);},function(){});
    $("#t5").hover(function(){GetFocus(5);},function(){});
    $("#t6").hover(function(){GetFocus(6);},function(){});
    
    $("#aOpenImg").click(function(){
        $("#img2").show();
        return false;
    });
    $("#aYuanTu").click(function(){
        $("#img2").show();
        return false;
    });
    $("#aCloseImg").click(function(){
        $("#img2").hide();
    });
    
    $("#kw").click(function(){
        if($(this).val()=="请输入关键字")
        {
            $(this).val("");
            
        }
    });

    $("#kw").blur(function(){
        if($(this).val()=="")
        {
            $(this).val("请输入关键字");            
        }
    });
    
    $("#SearchForm .txt1").click(function(){
        if($(this).val()=="关键字")
        {
            $(this).val("");
            
        }
    });

    $("#SearchForm .txt1").blur(function(){
        if($(this).val()=="")
        {
            $(this).val("关键字");            
        }
    });
	       
	       
});


function GetFocus(tID)
{
    //debugger;
    $("#nRecommT").find("li").each(function(i) {
		$(this).removeClass("sel");
		$(this).addClass("no");
	});
//	$("#tab").find("div").each(function(i) {
//	    $(this).removeClass("cSel");
//	    $(this).addClass("cNo");
//	});
	
	$("#c1").removeClass("cSel");
    $("#c1").addClass("cNo");
    $("#c2").removeClass("cSel");
    $("#c2").addClass("cNo");
    $("#c3").removeClass("cSel");
    $("#c3").addClass("cNo");
    $("#c4").removeClass("cSel");
    $("#c4").addClass("cNo");
	$("#c5").removeClass("cSel");
    $("#c5").addClass("cNo");
    $("#c6").removeClass("cSel");
    $("#c6").addClass("cNo");

    $("#t" + tID).removeClass("no");
    $("#t" + tID).addClass("sel");
    $("#c" + tID).removeClass("cNo");
    $("#c" + tID).addClass("cSel");
    return;
}


