
$(function(){
	$("#AddFavorite").click(function(){
		if (document.all){
		window.external.AddFavorite("http://www.hn-ty.cn","海宁郭店桃园膜分离设备厂");
		}
	});
	$("#homepage").click(function(){
		if (document.all)
		 {
		 document.body.style.behavior='url(#default#homepage)';
		 document.body.setHomePage("www.hn-ty.cn");
		 }
		 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',"www.cnhyjs.com.cn");
		 }
	});
});
$(function(){
	var i=1;
	$("#cates li[msg!='submenu']").each(function(){
		var id=$(this).attr("id");
		var subid=id.replace("cate","par");
		$(this).hover(function(){
			$("#"+subid).fadeIn(500);
		},function(){
			$("#"+subid).fadeOut(500);
		});
	});
});
