jQuery(document).ready(function($){
//载入中 Loding..
//$('#loading-one').empty().append('页面载入完毕.').parent().fadeOut('slow');


//侧边栏链接轻移
$(".entry_title a,#sidebar a").hover(function(){$(this).stop().animate({'marginLeft':"+=12"}, 250);},function(){$(this).stop().animate({'marginLeft':"0"}, 150);});
//链接Loading
$('.entry_title a,#sidebar a').click(function(e){
	if(e.which == 2){
              return true;
        }else{
              $(this).text('华丽的装载中...');
	      $('#clickload').show();
              window.location = $(this).attr('href');
        }
});

//双击返回顶部
$body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body');
$body.dblclick(function(){
	$('body').fadeTo("100", 0.4, function(){
		$body.animate({scrollTop: 0},1000, function(){
			$('body').fadeTo("100", 1);
		});
	});
});
$('#comments').dblclick(function(e){e.stopPropagation();});

//URL提示
var sweetTitles = {
	init : function() {
	$("#nav_menu a,.post a,#sidebar a").mouseover(function(e){
		this.myTitle = this.title;
		this.myHref = this.href;
		this.myHref = (this.myHref.length > 30 ? this.myHref.toString().substring(0,30)+"..." : this.myHref);//这行第一个数字61看你的url长度自行调试，太短显不出中文字符；第二个数字表示url超过50个字符的部分用...代替，比第一个数字小才有效
		this.title = "";
		var tooltip = "<div id='tooltip'><p>"+this.myTitle+"<em>"+decodeURI(this.myHref)+"</em>"+"</p></div>";
	$('body').append(tooltip);
	$('#tooltip').css({
		"opacity":"0.8","top":(e.pageY+20)+"px","left":(e.pageX+10)+"px"
	}).show('fast');
	}).mouseout(function(){this.title = this.myTitle;
	$('#tooltip').remove();
	}).mousemove(function(e){
	$('#tooltip').css({"top":(e.pageY+20)+"px","left":(e.pageX+10)+"px"
	});
	});
	}
};
$(function(){
	sweetTitles.init();
});

});