(function( $ ){

  $.fn.imgdrag = function(positions) {
  
    var settings = {
		'positions' : []
    };
	
	if ( positions ) { 
        $.extend( settings, positions );
	}
	
	var useCoords = settings.positions[Math.floor(Math.random()*settings.positions.length)];
	this.css('left', useCoords[0]);
	this.css('top', useCoords[1]);
	this.draggable({'containment':'body'});

  };
})( jQuery );
