$.fn.animate2 = function(css, speed, fn) {
	if(speed === 0) { // differentiate 0 from null
	  this.css(css)
	  window.setTimeout(fn, 0)
	} else {
	  if($.browser.webkit) {
	    var s = []
	    for(var i in css) 
	        s.push(i)
	  
	    this.css({ webkitTransitionProperty: s.join(", "),
	              webkitTransitionDuration: speed+ "ms",
	              webkitTransitionTimingFunction: 'ease-in-out' });
	  
	    window.setTimeout(function(x,y) {
	      x.css(y)
	    },0, this, css) // have to wait for the above CSS to get applied
	    
	    var thisObject	=	this;
	    window.setTimeout(function(){thisObject.css({webkitTransition:''})}, speed)
	    window.setTimeout(fn, speed)
	  } else {
	    this.animate(css, speed, fn)
	  }
	}
}
