//when the dom is ready
window.addEvent('domready', function() {


	//store titles and text
	$$('a.contacttip').each(function(element,index) {
		if( element.get('title') ){
			var content = element.get('title').split('::');
			element.store('tip:title', content[0]);
			element.store('tip:text', content[1]);
		}
	});

	//create the tooltips
	var tipz = new Tips('.contacttip',{
		className: 'contacttip_container',
		fixed: false,
		hideDelay: 50,
		showDelay: 50,
		offset:{x:-294,y:-80},
		windowPadding:{x:0,y:0}
	});

});


//when the dom is ready
window.addEvent('domready', function() {

	//store titles and text
	$$('a.tipz').each(function(element,index) {
		if( element.get('title') ){
			var content = element.get('title').split('::');
			element.store('tip:title', content[0]);
			element.store('tip:text', content[1]);
		}
	});

	//create the tooltips
	var tipz = new Tips('.tipz',{
		className: 'tipz_container',
		fixed: true,
		hideDelay: 50,
		showDelay: 50,
		/*offset:{x:-220,y:-110},*/
		offset:{x:-160,y:-88},
		windowPadding:{x:20,y:20}
	});
	/*
	tipz.addEvent('show', function(tip, el){
	var div =       tip.getChildren()[1];

	 var h = div.getStyle('height').toString().toInt();

	var diff =    h  - 16;
	var top = tip.getStyle('top').toString().toInt();
 
	var newtop = top - diff;
	if (h > 0) {
	tip.setStyle('top', '100px');
    	tip.setStyle('top', newtop+'px');
    	}
	
	});
	*/

});
