var FancyTips = new Class({

	Implements: [Options],

	options : {
		tipcontents: '.tipcontents'
	},

	initialize: function (elements, options) {

		this.setOptions(options);

		// Set up the fancy tips by inserting the tip contents element
		// into the title attribute of the element that is to have the tooltip
		elements.each(function (element) {
			contents_element = element.getElement(this.options.tipcontents);
			if (contents_element) {
				element.set('title', contents_element.get('html'));
			}
		}, this);

		this.tips = new Tips(elements, options);
	}
});

window.addEvent('domready', function() {
		var mytips = new FancyTips($$('.tips'));
});

