//nav sub menu
var isNavHover=false;
function checkNavHover() {
	if(!isNavHover){
		$('.nav_sub_div').hide();//fadeOut(500);
	}
}



function copy_code(text) {
  if (window.clipboardData) {
    window.clipboardData.setData("Text", text)
	alert("已经成功复制到剪贴板！");
  } else {
    var flashcopier = 'flashcopier';
    if(!document.getElementById(flashcopier)) {
      var divholder = document.createElement('div');
      divholder.id = flashcopier;
      document.body.appendChild(divholder);
    }
    document.getElementById(flashcopier).innerHTML = '';
    var divinfo = '<embed src="/plus/images/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(text)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashcopier).innerHTML = divinfo;
	var x=prompt('你的浏览器可能不能正常复制\n请你手动进行：',text);
  }
  //return false;
}


$(document).ready(function(){

//nav sub menu
$('.nav_sub,.nav_sub_div').hover(
	function() {
		if(isNavHover==false )
		{$('.nav_sub_div').hide();}//fadeOut(500);}
		isNavHover=true;
		$(this).find('.nav_sub_div').fadeIn(500);
		
	},
	function() {
		setTimeout("checkNavHover()",750);
		isNavHover=false;
	}
);



//1st post show
$('#section_show_post').hover(
	function() {
		$("#post_show_link_l,#post_show_link_r").fadeIn();
	},
	function() {
		$("#post_show_link_l,#post_show_link_r").fadeOut();
	}
);




$('.entry').hover(
	function() {
			$(this).find('.meta_view_link').fadeIn();
	},
	function() {
		$(this).find('.meta_view_link').fadeOut();
	}
);

$('.comment').hover(
	function() {
			$(this).find('.commentmetadata').fadeIn();
	},
	function() {
		$(this).find('.commentmetadata').fadeOut();
	}
);

});