
jQuery.fn.Tips_attr=function(attrname,customcss,width,direction){ 
			var dirs;
			var X_offset;
			var Y_offset;
			if(attrname==undefined||attrname=='')
			{
				attrname='alt';	
			}
			if(width==undefined||width=='')
			{
				width='385';	
			}
			if(customcss==undefined||customcss=='')
			{
				customcss='tips_orange';	
			}
			if(direction==undefined||direction=='')
			{
				direction='bottom';	
				dirs='t';
			}
			if(direction=='bottom')
			{
				dirs='t';
				X_offset='5';
				Y_offset='-150';
			}else{
				X_offset='-62';
				Y_offset='-0';
				dirs='b';
			}
			
			var hiddenid='cmstopAttrHiddenDiv'+customcss;
	   		var defaults = {
				hiddenid:hiddenid,//隐藏层id
				attrs:attrname,//显示出属性的数据
				showtype:'fadeIn',//显示效果fadeIn("fast"),show()默认fadeIn("fast")自适应
				Xoffset:X_offset,//距离鼠标X值
				Yoffset:Y_offset,//距离鼠5标Y值
				index:'8888'//z-index
			};
		var opts =defaults;
		jQuery('body').append('<div id="'+opts.hiddenid+'"><!--CMSTOP漂浮提示信息插件--></div>');
		var hiddenObject=jQuery("#"+opts.hiddenid);
	
		hiddenObject.css({//给对象定义样式
				'position':'absolute',
				'overflow':'hidden',
				'display':'none',
				'z-index':opts.index
		});
		
		jQuery(this).bind('mouseover',function(e){
			//清除原来的内容
			hiddenObject.html('');
			datas=jQuery(this).attr(opts.attrs);
			
			//var htmls='<div style="width:'+width+'px;" class="'+customcss+'"><div class="tips_left"><div class="tips_right"><p>'+datas+'</p></div></div><div class="tips_bottom"><div class="tips_bottom_r"></div></div><div class="tips_arrow_'+dirs+'"></div></div>';
			var htmls='<div style="width:'+width+'px;" class="'+customcss+'"><div class="tips_left"><div class="tips_right"><p>'+datas+'</p></div></div><div class="tips_bottom"><div class="tips_bottom_r"></div></div><div ></div></div>';
			hiddenObject.html(htmls);
			var left=e.pageX+parseInt(opts.Xoffset)+"px";
			var top =e.pageY+parseInt(opts.Yoffset)+"px";
			
			if(direction=='top')
			{
				var top =e.pageY-parseInt(hiddenObject.outerHeight())+parseInt(opts.Yoffset)+"px";
			}
		
		hiddenObject.css({//给返回的数据定义样式
						'position':'absolute',
						'overflow':'hidden',
						'top':top,
						'left':left,
						'z-index':opts.index
					}).fadeIn();//显示对象,fadeIn("fast")可以增加效果fadeIn("fast")

		}).bind('mousemove',function(e){
				var left=e.pageX+parseInt(opts.Xoffset)+"px";
				var top =e.pageY+parseInt(opts.Yoffset)+"px";
			
				if(direction=='top')
				{
					var top =e.pageY-parseInt(hiddenObject.outerHeight())+parseInt(opts.Yoffset)+"px";
				}
			
				hiddenObject.css({
					top:top,
					left:left
				});
			}).bind('mouseout',function(){
					
					hiddenObject.removeClass(customcss);
					hiddenObject.html('');
					hiddenObject.hide();//隐藏对象
			});
	 };  
	
	
