$(document).ready(function() {

    $(function() {

        //Define vars
        var hideDelay = 100;
        var currentID;
        var hideTimer = null;
        var PrevLink;
        var Link;

        // One instance that's reused to show info for the current person   
        var container = $('<div id="Onev_popUpContainer">'
		  + '<div id="Onev_popUpContent"></div>'
		  + '</div>');

        $('body').append(container);


        $('.Onev_popUp').live('mouseover', function() {

            // format of 'href' tag: page link  
            Link = $(this).attr('href');

            //prevent load the same popup
            if (Link == PrevLink || Link == '') {
                return false;
            }

            if (hideTimer)
                clearTimeout(hideTimer);

            var pos = $(this).offset();
            var width = $(this).width();
            var Onev_popW = parseFloat($('#Onev_popUpContent').css('width'), 10);
         
            container.css({
                left: (pos.left +width) + 'px',
                top: pos.top - 5 + 'px'
            });

            $('#Onev_popUpContent').html('&nbsp;');


            var toolTip_txt = $(this).siblings('.Onev_popUpTip').html();
            $('#Onev_popUpContent').html(toolTip_txt);

            container.css('display', 'block');

            PrevLink = Link;
            return false;
        });


        // Allow mouse over of details without hiding details
        $('#Onev_popUpContainer').mouseover(function() {
            if (hideTimer)
                clearTimeout(hideTimer);
        });

        //Hide when click deactivate btn
        $(".deactivate").live('click', function() {
            initializeModule();
            return false;
        });
        // Hide after mouseout from a link
        $('.Onev_popUp').live('mouseout', function() {
 			initializeModule();    
        });

        // Hide after mouseout from a container
        $('#Onev_popUpContainer').mouseout(function() {
                initializeModule();
        });

        function initializeModule() {

            Link = null;
            PrevLink = null;
            container.css('display', 'none');
        }
    });
	
	
	$(".MixerCalc").css("cursor","pointer");
	$(".MixerCalc").hover( function(){
			$(".mixerTzuna").show();	
			$(".mixerItmes").hide();
	}, function(){
			$(".mixerTzuna").hide();	
			$(".mixerItmes").show();				
	});
});
