var sharejq = jQuery.noConflict();
(function(){
function addClass(o,cn){
	var re = new RegExp("(\\s*|^)"+cn+"\\b","g");o.className +=o.className?(re.test(o.className)?"":" "+ cn):cn
	sharejq("#channelHtml").css("margin-top",'0px');
}
function removeClass(o,cn){
	var re = new RegExp("(\\s*|^)"+cn+"\\b","g");var sName = o.className;o.className = sName.replace(re,"")
	sharejq("#channelHtml").css("margin-top",'0px');
}
})(jQuery);
sharejq(document).ready(function(){
	var shareH = sharejq("#bdshare_u").outerHeight(true);
	sharejq("div.cnmo_share_bottom div:first div a").click(function(){
		if (sharejq.browser.msie && (sharejq.browser.version == "6.0") && !sharejq.support.style) {
			var divLef = sharejq("#bdshare_u").css("left");
			if('auto' == divLef) divLef = 0;
			divLef = parseInt(divLef);
			if(divLef < 0) {
				sharejq("#bdshare_u").animate({left:"0px"},"slow");
				sharejq(this).removeClass().addClass("zhedie");
			}else {
				sharejq("#bdshare_u").animate({left:"-60px"},"slow");
				sharejq(this).removeClass().addClass("zhankai");
			}
		}else{
			var sharejqclassName = sharejq(this).attr("class");
			if(sharejqclassName == 'zhedie'){
				sharejq("#bdshare_u").animate({"top":document.documentElement.clientHeight},{queue:false,duration:1000}).animate({"height":"0px"},{queue:false,duration:1000});
				sharejq(this).removeClass().addClass("zhankai");
			}else{
				sharejq("#bdshare_u").fadeIn();
				sharejq("#bdshare_u").animate({"top":"0px"},{queue:false,duration:1000}).animate({"height":shareH},{queue:false,duration:1000}); 
				sharejq(this).removeClass().addClass("zhedie");
			}
		}
	});
});
sharejq("div.hui a.lan").click(function(){
	sharejq('html,body').animate({scrollTop: sharejq("#f_pst").offset().top}, 500);
	document.getElementById('f_pst').contentWindow.document.getElementById('message').focus() ; 
});
