var glossaryWords = new Object();
var softPopupID = "softPopup";
var titleTag = "";

jQuery(document).ready(function () { 
	jQuery('.glossaryLink').mouseover(function(e) {
			
		var posx = 0;
		var posy = 0;
		posx = e.pageX;
		posy = e.pageY;
		//alert ('x client '+e.clientX+ ' Y  client'+e.clientY + ' x page '+e.pageX + ' y page ' +e.pageY );
		posXInnerContent = e.clientX;
		var bodyWidth = jQuery('body').outerWidth();
		var wrapperWidth = jQuery('#wrapper').outerWidth();
		
		posx = posx - ((bodyWidth - wrapperWidth ) /2 ) ;
			
		var glossaryDescId = jQuery(this).attr('id');
		//var glossaryDescTitle = jQuery('#Title_'+glossaryDescId).text();
		//var glossaryDescText = jQuery('#Desc_'+glossaryDescId).text();
		
		var glossaryDescTitle = jQuery(this).children('.glossaryText').text();
		var glossaryDescText = jQuery(this).children('.glossaryDesc').text();
		
		//alert('id ::' + glossaryDescId + '|| title ::' +glossaryDescTitle + '|| Text ::' +glossaryDescText );
		var popUpContent = '<div class="head"><h1>' + glossaryDescTitle + '</h1></div><div class="clear"></div><div class="softpopuptext">' + glossaryDescText + '</div>';
		
		jQuery('#softPopup').html(popUpContent);
		jQuery('#softPopup').addClass("glossaryPopup");
		
		jQuery('#softPopup').css({
			position: 	'absolute',
			top: 		(posy+10),
			left: 		(posx+10)		
		});
		jQuery('#softPopup').show();

		
	}).mouseout(function(){
		
		jQuery('#softPopup').hide();
		jQuery('#softPopup').empty();
		/*
		jQuery('#softPopup').css({
			position: 	'absolute',
			top: 		0,
			left: 		0		
		});
		*/
	});
});

/*
jQuery(document).ready(function () { 
	jQuery('.glossaryLink').mouseover(function(e) {
			
		var posx = 0;
		var posy = 0;
		posx = e.pageX;
		posy = e.pageY;
		//alert ('x client '+e.clientX+ ' Y  client'+e.clientY + ' x page '+e.pageX + ' y page ' +e.pageY );
		posXInnerContent = e.clientX;
		var bodyWidth = jQuery('body').outerWidth();
		var wrapperWidth = jQuery('#wrapper').outerWidth();
		
		posx = posx - ((bodyWidth - wrapperWidth ) /2 ) ;
			
		var glossaryDescId = jQuery(this).attr('id');
		var glossaryDescTitle = jQuery('#Title_'+glossaryDescId).text();
		var glossaryDescText = jQuery('#Desc_'+glossaryDescId).text();
		
		//alert('id ::' + glossaryDescId + '|| title ::' +glossaryDescTitle + '|| Text ::' +glossaryDescText );
		var popUpContent = '<div class="head"><h1>' + glossaryDescTitle + '</h1></div><div class="clear"></div><div class="softpopuptext">' + glossaryDescText + '</div>';
		
		jQuery('#softPopup').html(popUpContent);
		jQuery('#softPopup').addClass("glossaryPopup");
		
		jQuery('#softPopup').css({
			position: 	'absolute',
			top: 		(posy+10),
			left: 		(posx+10)		
		});
		jQuery('#softPopup').show('fast');

		
	}).mouseout(function(){
		
		jQuery('#softPopup').hide('fast');
		jQuery('#softPopup').empty();		
	});
});

*/