jQuery.fn.scrollTo = function(speed) {
var targetOffset = $(this).offset().top;
$('html,body').stop().animate({scrollTop: targetOffset}, speed);
return this;
};
/* 平滑滚动插件 */
$(function() {
$('a,input[type="button"],input[type="submit"]').bind('focus',function(){
if(this.blur){
this.blur();
};
});
/* 去除链接点击后的虚线框 */
$(".posttext a").not("[href*=diggcafe.com]").not("[href^=#]").not("[href^=javascript]").not("[href^=mailto]").addClass('gooutsite');
$(".gooutsite").attr({ target: "_blank" });
/* 站外链接标识 */
$("#header_search_query").focus(function(){if (this.value == '搜索内容...') {this.value = '';}}).blur(function(){if (this.value == '') {this.value = '搜索内容...';}});
/* 搜索框文字 */
$(".posts a,a.totop").click(function(){
var target_id = $(this).attr("href");
$(target_id).scrollTo(500);
return false;
});
/* 平滑滚动之回到顶部 */
$("#imgads").scrollable({loop: true,size: 1,speed: 400}).navigator().autoscroll({autopause: true,interval:8000});
$("#indexmainbox").scrollable({loop: true,size: 1,speed: 800}).navigator().autoscroll({autopause: true,interval:8000});
/* 幻灯片 */
$("#diggtree a").tooltip({opacity: 0.85,predelay: 200,position:"center right",offset: [0, -10],effect: 'slide'}).dynamic(); 
/* 日程树浮动层 */
$("form.diggbox :input").tooltip({position: "center right",offset: [0, 5],effect: 'slide',tip: '#comment-greeting'});
$(".expose").click(function() { $(this).expose({api: true}).load();});
/* 聚焦 */
});