function bookmarkSite(title,url){if(document.all)window.external.AddFavorite(url,title);else if(window.sidebar)window.sidebar.addPanel(title,url,"")}function setHomePage(){if(document.all){document.body.style.behavior='url(#default#homepage)';document.body.setHomePage('http://www.61dh.com')}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','http://www.61dh.com')}}$(document).ready(function(){var ihtml='<div id="friend_sites"></div>';$("#labels").load("/blog/categories/labels.html?v1");$("#share").load("/blog/noimg_share.html?v1");$("#feed").load("/blog/feedrss.html?v1");$("#sidebar").append(ihtml);$("#friend_sites").load("/blog/friends.html?v1");var phost=location.hostname;if(!phost.match("^www")){phost="www\."+phost}$('#sidebar a:not(:has(img))').filter(function(){var lhost=this.hostname;if(lhost&&!lhost.match("^www")){lhost="www\."+lhost}return lhost&&lhost!==phost&&!lhost.match("delicious")}).after(' <img src="/images/external.png" alt="external link">')});jQuery(document).ready(function(){jQuery('#up').click(function(){if(jQuery.browser.safari){jQuery('body').animate({scrollTop:0},'slow');return false}else{jQuery('html').animate({scrollTop:0},'slow');return false}});jQuery('#down').click(function(){if(jQuery.browser.safari){jQuery('body').animate({scrollTop:jQuery('#footerPan').offset().top},'slow');return false}else{jQuery('html').animate({scrollTop:jQuery('#footerPan').offset().top},'slow');return false}})});

var tophtml = '<div class="devblog-top-wrap">' +
                     '<div class="devblog-top">' +
                     '通告：网站开发日志搬家了，请点击<a href="http://blog.jswenda.com/">这里</a>进入新日志！' +
                     '</div>' +
                     '</div>';
      $(document).ready(function(){
         $('body').append(tophtml);
      });




