document.write('<style type="text\/css">.downloadsw{display:none;}  a {-o-transition:color 0.2s ease-in-out;-moz-transition:color 0.2s ease-in-out;-webkit-transition:color 0.2s ease-in-out;transition: color 0.2s ease-in-out;}<\/style>');

jQuery(document).ready(function($){   
    //图片载入
	//$("img").lazyload({
	// placeholder : "http://www.rainripple.com/wp-content/uploads/grey.gif",
	// effect:"fadeIn"}); 
  //页面无限文章
  $('#content').infinitescroll({
    debug           : false,
    nextSelector    : "div#ajaxmore  span.ajaxmorepage a:first",
    loadingImg      : "http://yuki.rippley.com/pic/ajax-loader3.gif",
    loadingText     : "<em>正在加载，请稍稍后......</em>",
    donetext        : "<em>好厉害，已经看完了......</em>",
    navSelector     : "div#ajaxmore",
    contentSelector : "#content",
    itemSelector    : "div#content  div.post",
	animate      : true,
      extraScrollPx: 200,
    },function(){
});
	//给ajaxmore绑定事件
 $(window).unbind('.infscr');//解绑事件，不自动load
    $('div#ajaxmore  span.ajaxmorepage a:first').click(function(){
      $(document).trigger('retrieve.infscr');
      return false;
    });
	//订阅
	$('a#myrss').hover(
	function(){$(this).text("订阅我");},
	function(){$(this).text("RSS");}
	);

	//侧边栏 打开或者关闭 cookie控制 2010年10月9日 15:46:31 bluels
	/*
	var m = document.cookie.match(new RegExp("(^| )"+"myside"+"=([^;]*)(;|$)"));
	if(m== null){//无cookie则默认为侧边栏不显示
		i=0;//侧边栏 不显示
	}
	else{
		i=m[2];//写入读取的状态值
	}
	var expdate = new Date(); 
	expdate.setTime(expdate.getTime()+(30*24*60*60*1000));
	var k=0;//click 执行判断
	if(i==0){
		$('a#show').text("打开侧栏");
		$('a#footershow').text("打开侧栏");
		k=0;
	}
	else{
		$('a#show').text("关闭侧栏");
		$('a#footershow').text("关闭侧栏");
		k=1;
	}
	function sidebarhide(){
	jQuery('#sidebar').hide('fast');
			$('#mainpage').animate({width:"600"}, 360);$('#container').animate({width:"588"}, 360);
			$('a#show').text("打开侧栏");
			$('a#footershow').text("打开侧栏");
			document.cookie = "myside" + "="+ k + ";expires=" + expdate.toGMTString();
	}
		function sidebarshow(){
		$('#mainpage').animate({width:"800"}, 360);$('#container').animate({width:"788"}, 360);
			$('a#show').text("关闭侧栏");	$('a#footershow').text("关闭侧栏");jQuery('#sidebar').show('normal');
			document.cookie = "myside" + "="+k + ";expires=" + expdate.toGMTString();}

	
	$('a#show').click(function(){
		if (k==1){
			k=0;
			sidebarhide();
		}
		else{
			k=1;
			sidebarshow();}
	});
		$('#footershow').click(function(){
		if (k==1){
			k=0;
		sidebarhide();
		}
		else{
			k=1;
		sidebarshow();}
		
	});
	*/
	//必应词典 搜索输入
		//获取所查词的URL
	function GetUrl(q) {
		var s = q.replace(/[<>/@&=+$#]/g, "");
		return "http://www.engkoo.com/?view=gadget#" + escape(s) + "|" + new Date().getTime();
	}
	//按钮事件
	$('a#bn').click(function(){
	$('#fo').attr("src", GetUrl(mainInputField.value));	});
	
	//日志加载效果
	$('h2.posttitle a').click(function(e){
		if(e.which == 2){
				return true;
		}
		else{
				window.location = $(this).attr('href');
				$(this).text('Loading......');
			}
	});
	//
		});	

	//
	
	//


