(function($){$.fx.step["backgroundPosition"]=function(fx){if(typeof fx.end=='string'){fx.start=getBgPos(fx.elem);fx.end=[parseFloat(fx.end.split(" ")[0]),parseFloat(fx.end.split(" ")[1])];}
var nowPosX=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit;var nowPosY=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit;fx.elem.style.backgroundPosition=nowPosX+' '+nowPosY;function getBgPos(elem){var top=0.0;var left=0.0;if($(elem).css("backgroundPosition")){top=parseFloat($(elem).css("backgroundPosition").split(" ")[0]);left=parseFloat($(elem).css("backgroundPosition").split(" ")[1]);}else{top=parseFloat($(elem).css("backgroundPositionX"));left=parseFloat($(elem).css("backgroundPositionY"));}
return[top,left];}}})(jQuery);