/* horizontal scroller start */
	
	function shiftLeft_scroller()
	{
		var final_left=$(".trendscontent").position().left-1;
		$(".trendscontent").css({"left":final_left+"px"});
		
		var first_child_width=$(".trendscontent li:first").width();
		
		if(final_left==first_child_width*(-1))
		{
			var child=$(".trendscontent li:first");
			$(".trendscontent li:first").remove();
			$(".trendscontent").append(child);	
			final_left=$(".trendscontent").position().left+first_child_width;
			$(".trendscontent").css({"left":final_left+"px"});
		}
	}

//You need an anonymous function to wrap around your function to avoid conflict  
(function($){  
	//Attach this new method to jQuery  
	$.fn.extend({
		horizontalscroll:function()
		{
			return this.each(function(){
				scroller_time=setInterval('shiftLeft_scroller()', 30);
				$(".search_link").live("hover",function(){
					clearTimeout(scroller_time);
					
					var top=$(this).parent().position().top;
					var height=$(this).parent().parent().height();

					var left=$(this).offset().left;
					var left1=120-$(this).width()/2;
					top = 420;
					var total_top=top+height;
					var total_left=left-left1;

					var detail=$(this).next("em").html();
					var title=$(this).html();

					description="<div class='trendtip-content'>Title:<br><a class='trendtip-trend' href='#'>"+title+"</a>";
					if(detail!="")
						description+="<br><div class='trendtip-why'><span class='trendtip-desc'>"+detail+"</span></div>";
					description+="<div class='trendtip-pointer'>&nbsp;</div>";
					$(".trendtip").css( { "top":total_top+ "px", "left":total_left+"px"} );
					$(".trendtip").html(description);
					$(".trendtip").show();
				});
				$(".search_link").live("mouseout",function(){
					$(".trendtip").hide();
					scroller_time=setInterval('shiftLeft_scroller()', 30);
				});
			});
		}
	});
})(jQuery);

