$.fn.overlay = function(options) {
	return this.each(function(){
	  this.settings = {position: 'tl'};
    if(options) { 
  	  $.extend(this.settings, options);  
    };
    var curleft = curtop = putleft = puttop = 0;
	  obj = this;
	  if (obj.offsetParent) {
  	  curleft = obj.offsetLeft
	    curtop = obj.offsetTop
	 	  while (obj = obj.offsetParent) {
    		curleft += obj.offsetLeft
	    	curtop += obj.offsetTop
		  }
	  }
	  var ovr = new Image();
	  ovr.src = this.settings.src;
	  ovr.pos = this.settings.position;
	  ovr.pwidth = this.width;
	  ovr.pheight = this.height;
	  ovr.onload = function() {
  	  switch(this.pos) {
  	  	case 'tl':
	    	default:
	     	  putleft = curleft;
	        puttop  = curtop;
  	      break;
	      case 'tr':
	        putleft = curleft + this.pwidth - this.width;
	        puttop  = curtop;
  	      break;
	      case 'bl':
	        putleft = curleft;
	        puttop  = curtop + this.pheight - this.height;
  	      break;
	      case 'br':
  	   	  putleft = curleft + this.pwidth - this.width;
	   	    puttop  = curtop + this.pheight - this.height;
	     	  break;
	    }
	    $("body").append('<img src="'+this.src+'" style="position:absolute; top:'+puttop+'px; left:'+putleft+'px;" />');
	  }
  });
};