(function(a){if(!document.defaultView||!document.defaultView.getComputedStyle){var b=a.curCSS;a.curCSS=function(c,a,d){if(a==="background-position")a="backgroundPosition";if(a!=="backgroundPosition"||!c.currentStyle||c.currentStyle[a])return b.apply(this,arguments);var e=c.style;return!d&&e&&e[a]?e[a]:b(c,"backgroundPositionX",d)+" "+b(c,"backgroundPositionY",d)}}var d=a.fn.animate;a.fn.animate=function(a){if("background-position"in a){a.backgroundPosition=a["background-position"];delete a["background-position"]}if("backgroundPosition"in a)a.backgroundPosition="("+a.backgroundPosition;return d.apply(this,arguments)};function c(a){a=a.replace(/left|top/g,"0px");a=a.replace(/right|bottom/g,"100%");a=a.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var b=a.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(b[1],10),b[2],parseFloat(b[3],10),b[4]]}a.fx.step.backgroundPosition=function(b){if(!b.bgPosReady){var d=a.curCSS(b.elem,"backgroundPosition");if(!d)d="0px 0px";d=c(d);b.start=[d[0],d[2]];var f=c(b.end);b.end=[f[0],f[2]];b.unit=[f[1],f[3]];b.bgPosReady=true}var e=[];e[0]=(b.end[0]-b.start[0])*b.pos+b.start[0]+b.unit[0];e[1]=(b.end[1]-b.start[1])*b.pos+b.start[1]+b.unit[1];b.elem.style.backgroundPosition=e[0]+" "+e[1]}})(jQuery)
