﻿$(document).ready(function ()
{
    /*
    $('.toolTip').hover(
    function()
    {
    this.tip = this.title;
    $(this).append('<div class="table toolTipWrapper">'
    + '<div class="row">'
    + '<div class="columntooltip toolTipMid">'
    + this.tip
    + '</div>'
    + '<div class="column"></div>'
    + '</div>'
    + '</div>'
    );
    this.title = "";
    var thiswidth = $(this).width();*/
    /*this.width = $(this).width() - 200;*//*
    	$(this).find('.toolTipWrapper').css({ left: thiswidth })
    	$('.toolTipWrapper').fadeIn(0);
    },
    function()
    {
    	$('.toolTipWrapper').fadeOut(0);
    	$(this).children().remove();
    	this.title = this.tip;
    }
	);
	*/

    $('.toolTipPrimary').hover(
    function ()
    {
        this.tip = this.title;
        $(this).append(
     '<div class="toolTipWrapper">'
        + '<div class="toolTipTop"></div>'
        + '<div class="toolTipMid">'
          + this.tip
        + '</div>'
        + '<div class="toolTipBtm"></div>'
      + '</div>'
    );
        this.title = "";
        this.width = $(this).width();
        $(this).find('.toolTipWrapper').css({ left: this.width + 4 })
        $('.toolTipWrapper').fadeIn(0);
    },
    function ()
    {
        $('.toolTipWrapper').fadeOut(0);
        $(this).children().remove();
        this.title = this.tip;
    }
  );

    $('.toolTipSecondary').hover(
    function ()
    {
        this.tip = this.title;
        $(this).append(
     '<div class="toolTipWrapper">'
        + '<div class="toolTipTop"></div>'
        + '<div class="toolTipMid">'
          + this.tip
        + '</div>'
        + '<div class="toolTipBtm"></div>'
      + '</div>'
    );
        this.title = "";
        this.width = $(this).width();
        $(this).find('.toolTipWrapper').css({ left: this.width - (this.width / 2) })
        $('.toolTipWrapper').fadeIn(0);
    },
    function ()
    {
        $('.toolTipWrapper').fadeOut(0);
        $(this).children().remove();
        this.title = this.tip;
    }
  );


    $('.toolTipFooter').hover(
    function ()
    {
        this.tip = this.title;
        $(this).append(
     '<div class="toolTipWrapperFooter">'
        + '<div class="toolTipTop"></div>'
        + '<div class="toolTipMid">'
          + this.tip
        + '</div>'
        + '<div class="toolTipBtm"></div>'
      + '</div>'
    );
        this.title = "";
        this.width = $(this).width();
        /*$(this).find('.toolTipWrapperFooter').css({ left: this.width - 22 })*/
        $('.toolTipWrapperFooter').fadeIn(0);
    },
    function ()
    {
        $('.toolTipWrapperFooter').fadeOut(0);
        $(this).children().remove();
        this.title = this.tip;
    }
  );


});
 