var shadowbox = Class.create();
	shadowbox.prototype = {
		initialize: function(obj) {

			this.id = obj.rel.split("*")[1];
			this.text = obj.rel.split("*")[2];
			this.image = obj.rel.split("*")[3];
			Event.observe(obj, 'mouseover', this.activate.bindAsEventListener(this));
			Event.observe(obj, 'mouseout', this.deactivate.bindAsEventListener(this));
			Event.observe(obj, 'mousemove', this.positionIt.bindAsEventListener(this));
		},
		activate: function(e){
			$("shadowImg").src=this.image;
			$("shadowText").update(this.text);
			this.moveIt=true;
			$("shadowBox").setStyle({display:"block"});
		},
		deactivate: function(){
			this.moveIt=false;
			$("shadowBox").style.display="none";
		},
		positionIt: function(e){
			if(this.moveIt){
				this.yPos = Event.pointerY(e);
				this.xPos = Event.pointerX(e)+25;
				if(this.xPos+400>getBrowserWidth())
					this.xPos = this.xPos - 50 - 400;
				$("shadowBox").setStyle({top:this.yPos+"px",left:this.xPos+"px"});
			}
		}
	}

	function getBrowserWidth() {
	  var myWidth = 0;
	  if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
	  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	  }
	  return myWidth;
	}
