/*

Randomdistribute Version 1.0 | a Scriptographer 2.0 script
Randomly distributes objects within the document.

Scriptographer is a plugin for Adobe Illustrator(TM)
created by Jürg Lehni
http://www.scriptographer.com/

This script was written by Eike Menijn 
http://subfuse.net

*/

var selectedItems = document.selectedItems;

if(selectedItems) {
	for (var i = 0, l = selectedItems.length; i < l; i++) {
		var item = selectedItems[i];
		var size = document.size - item.bounds.size;
		item.position = new Point(size * Point.random()) + item.bounds.size / 2;
	}
}

