code: function findCenter( elem ) {
  	var offset,
  		document = $( elem.ownerDocument );
  	elem = $( elem );
  	offset = elem.offset();
  
  	return {
  		x: offset.left + elem.outerWidth() / 2 - document.scrollLeft(),
  		y: offset.top + elem.outerHeight() / 2 - document.scrollTop()
  	};
  }
docs: complex events *