window.addEvent('domready', function(){
		//var myTips = new Tips('.infoBox');	
		var myTips = new Tips(('.infoBox'), {
	className: 'customTips'
});
		if ($('products')){
		var lis = $('products').getElements('li');
		
		var divs = $$('#products div.tip');
		divs.each(function(el,index) {  
			el.set({'class': 'prodDetails', 'styles': {'opacity': 0}});
		}); 
		
		lis.each(function(el,index) { 
			var div = el.getLast();
			el.set({
				'events': {
					'mouseover': function(){  
						el.set('styles', {'z-index': '200'});
						//div.set('styles', {'z-index': '1'});
						div.fade('in');
						
						
				
					},
					'mouseout': function(){ 
						//div.set('styles', {'z-index': '1000'});
						div.fade('out');
						el.set('styles', {'z-index': '100'});
					}
				}
			});

		});
		
		} 
	}); 

	
	/*var info = new Element('div', {
		'class': 'title',
		'styles': {
			'display': 'block',
			'border': '1px solid black',
			'background': 'pink'
		}
	});
	var products = $('products');
	info.inject(products, 'before');
	info.set('html', '<strong>Info Box</strong>', '<p>This is the info</p>');

	products.addEvent('mousemove', function(e){
		var mouse = {x: (e.page.x + this.scrollElement.scrollLeft), y: (e.page.y + this.scrollElement.scrollTop)};
			console.log(mouse)
	});
	
	//declare variables
var x;
var y;

// call this function on page load
function init(){
var products = $('products');
products.onmousemove = getMovement;
// set an event to call showInfo() on mouseenter for the items

}

// this returns the x/y position of the mouse
function getMovement(e){
if (window.Event){
x = e.pageX;
y = e.pageY;
}else{
x = event.clientX + document.documentElement.scrollLeft;
y = event.clientY + document.documentElement.scrollTop;
}
// you can set the offset here if the item is far right so it doesn't widen the page
if(x>760){
x = x-190;
}
}

// this needs to set the x/y of the info box to the result of x/y above
function showInfo(){
// set the infoBox x and y to the above variables x & y
infoBox.x = x;
infoBox.y = y;
// we'll also need to update the info box with new details etc on mouseenter
}
	
	
	


	
}); */



