﻿$(function(){
change1(".ggt",".br3","bcf br3 nb lk0 h22 lh25 mgt4 mgl5 mgr5","c15 cnr h27 lh27",".gg");
change1(".boxt1",".br3","bcf br3 nb lk0 h22 lh25 mgt4 mgl5 mgr5","c15 cnr h27 lh27",".box1");
change1(".boxt2",".br3","bcf br3 nb lk0 h22 lh25 mgt4 mgl5 mgr5","c15 cnr h27 lh27",".box2");
change1(".boxt3",".br3","bcf br3 nb lk0 h22 lh25 mgt4 mgl5 mgr5","c15 cnr h27 lh27",".box3");
});


function change1(boxt,boxy,ty1,ty2,box2)
{
	$(boxt).eq(0).removeClass(ty2);
	$(boxt).eq(0).addClass(ty1);
	$(boxt).each(function(i){
	$(this).click(function(){

	$(boxt+boxy).addClass(ty2);
	$(boxt+boxy).removeClass(ty1);

	$(this).removeClass(ty2);
	$(this).addClass(ty1);
	$(box2+":visible").hide();
	$(box2).eq(i).show();

});
});

}




//加入收藏夹
function addFavorite()
{ 		
	var description=document.title; 
    try{//IE 
	     window.external.AddFavorite(window.location.href,description); 
       }catch(e)
       {//FF 
	     window.sidebar.addPanel(description,window.location.href,""); 
        }  
}



//设为首页
function setHomepage()
{
 if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
        document.body.setHomePage(window.location);
 
    }
    else if (window.sidebar)
    {
        if(window.netscape)
        {
             try
             {  
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
             }  
             catch (e)  
             {  
               alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );  
             }
        } 
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
        prefs.setCharPref('browser.startup.homepage',window.location);
    }
}

