/*
* 图片向上翻动
*
*
*/
;
(function($){
	$.fn.emarquee = function(options){
		var opts = $.extend({},$.fn.emarquee.defaults,options);  	
		return this.each(function(){
			var em = $.meta ? $.extend({},opts,$this.data()) : opts;   
			
			$(this).css({"position":"relative"});
			var $table = $(this).children("table:first");
			if($table.html()){
					$table.css({"position":"absolute","top":0,"left":0});
					setInterval(function(){
						switch(em.direction){
						case "top":
								$table.animate({"top":dropPX($table.css("top"))-em.height},"slow",function(){
													$table.append($table.find("tr:first")).css({"top":0});
								});	
							break;
						case "left":
								$table.animate({"left":dropPX($table.css("left"))-em.scrollStep},"slow",function(){
													$table.find("tr").append($table.find("td:first"));
													$table.css({"left":0});
								});
							 break;
						}
					},em.delay);
				}		
		 })
		
	}
$.fn.emarquee.defaults = {  
    author  :  "joe",
	delay   :  6000,
	height  :  190,
	width   :  980,
scrollStep  :  120,
 direction  : "top"
};	
})(jQuery);
;
function dropPX(px){
	return px.substring(0,px.length-2);
	}
;
/*
**
** 图片向左走
**
*/
