

jQuery(document).ready(function($){  //注意要用这个把jQuery代码都包裹起来，不然里面的可都是无效的

 //这是siderbar的
$("#sidebar ul li a").hover(function(){
		$(this).stop().animate({marginLeft:"22px"}, 250,"easeOutBounce");}
	,function(){
		$(this).stop().animate({marginLeft:"10px"}, 150,"easeOutBounce");
});

$("#sidebar ul li span a").hover(function(){
		$(this).stop().animate({marginLeft:"10px"}, 0,"easeOutBounce");}
	,function(){
		$(this).stop().animate({marginLeft:"10px"}, 0,"easeOutBounce");
});

$("#sidebar span a").hover(function(){
		$(this).stop().animate({marginLeft:"10px"}, 0,"easeOutBounce");}
	,function(){
		$(this).stop().animate({marginLeft:"10px"}, 0,"easeOutBounce");
});


$("#sidebar ul li ul li.sidecom2 a").hover(function(){
		$(this).stop().animate({marginLeft:"12px"}, 250,"easeOutBounce");}
	,function(){
		$(this).stop().animate({marginLeft:"0px"}, 150,"easeOutBounce");
});

//nav开始
$("#home a").hover(function (){
	$(this).animate({marginTop:"10px"}, 350,"easeOutBounce");
	}
	,function () {
    $(this).animate({marginTop:"0px"}, 150,"easeOutBounce");
	});
	
	
$("#home a").hover(function (){
	$(this).animate({marginTop:"10px"}, 350,"easeOutBounce");
	}
	,function () {
    $(this).animate({marginTop:"0px"}, 150,"easeOutBounce");
});



$("#arc a").hover(function (){
	$(this).animate({marginTop:"10px"}, 350,"easeOutBounce");
	}
	,function () {
    $(this).animate({marginTop:"0px"}, 150,"easeOutBounce");
});

$("#tag a").hover(function (){
	$(this).animate({marginTop:"10px"}, 350,"easeOutBounce");
	}
	,function () {
    $(this).animate({marginTop:"0px"}, 150,"easeOutBounce");
});



$("#link a").hover(function (){
	$(this).animate({marginTop:"10px"}, 350,"easeOutBounce");
	}
	,function () {
    $(this).animate({marginTop:"0px"}, 150,"easeOutBounce");
});



$("#about a").hover(function (){
	$(this).animate({marginTop:"10px"}, 350,"easeOutBounce");
	}
	,function () {
    $(this).animate({marginTop:"0px"}, 150,"easeOutBounce");
});

  
	//nav结束
	
	
	
	//滑动控制
	$('#shang').click(function(){$('html,body').animate({scrollTop: '0px'}, 1800,"easeInOutCubic");}); 
	$('#comt').click(function(){$('html,body').animate({scrollTop:$('#comments').offset().top}, 1800,"easeInOutCubic");});
	$('#xia').click(function(){$('html,body').animate({scrollTop:$('#footer').offset().top}, 1800,"easeInOutCubic");});
			
		
				
					
	//广告
	
	
						
						
					$("#adbg").hover(
					
					function() {	
				　　// 鼠标悬停时候被触发的函数
				   $(this).animate({'left':'+=200px'},250,"easeInOutCubic");

				  }, 
				  function() {
				   // 鼠标移出时候被触发的函数 /*ijomyo*/
				   $(this).animate({'left':'-200px'},250,"easeInOutCubic");   });
				   
												
										
				
});	



jQuery(document).ready(function($) {

$body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body');// 这行是 Opera 的补丁, 少了它 Opera 是直接用跳的而且画面闪烁 by willin

$('#comments #top').click(function(){
	$body.animate({scrollTop: $('#header').offset().top}, 1800,"easeInOutCubic");
	return false;
});

});


//导航 滑动*/ 

jQuery(document).ready(function($){ 

if ($ != jQuery) {
    $ = jQuery.noConflict();
};
	$(window).scroll(function (){ //浏览器滚动条触发事件
		$("#shangxia").animate({top : $(window).scrollTop() + 300 + "px" },{queue:false,duration:500});
	    $("#adbg").animate({top : $(window).scrollTop() + 150 + "px" },{queue:false,duration:500});		
	});

});
