/*	
Script: Extentips.js
	extended Tooltips
	
Dependencies:
	<Moo.js>, <Function.js>, <Array.js>, <String.js>, <Element.js>, <Fx.js>, <Tips.js>
	
Author:
	Patrick Kollitsch, <http://mad4milk.net>

License:
	MIT-style license.
	
Credits:
	Extentips.js is based on Tips.js by Valerio Proietti, <http://mad4milk.net>
*/

/*
Class: Extentips
	Display a tip on any element with a title and/or href.

Arguments: 
	elements - a collection of elements to apply the tooltips to on mouseover.
	options  - an object. See options Below.

Options (in brackets the defaults): 
	transitionStart - the transition effect used to show the tip (see <Fx.Transitions>).
	transitionEnd   - the transition effect used to hide the tip (see <Fx.Transitions>).
	maxTitleChars   - the maximum number of characters to display in the title of the tip. defaults to 30.
	fxDuration      - the duration (in ms) for the transition effect (150).
	maxOpacity      - how opaque to make the tooltip. defaults to 1.
	timeOut         - the delay to wait to show the tip (100).
	className       - the class name to apply to the tooltip
    contentClassName - the class name of the content-divs (they will be hidden on load). (tooltipcontent)
    
Example:
	(start code)
	<img src="..." title="tooltiptitle" class="tt" id="t1" />
	<div id="for-t1">
	   html-content
	</div>
	<script>
		var myExtentips = new Extentips($S('.tt'), {
			maxTitleChars: 50,
			maxOpacity: .9,
		});
	</script>
	(end)
*/
window.addEvent('domready', function(){
	var thetip = new Tips($$('.tips'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
}); 