﻿
//Reference: http: //craigsworks.com/projects/qtip/docs/#ref-style

function CreateToolTips(){
    $("td.TotalViolentCrime").qtip({
        content: {
            text: 'Equals the sum of murders, rapes, robberies, and aggravated assaults.',
            title: { text: 'Total Violent Crime' }
        },
        style: {
            name: 'cream', // Inherit from preset style
            color: 'black',
            width: 200,
            padding: 5,
            border: { color: 'black', width: 1, radius: 0 },
            classes: { title: 'ToolTipTitleBlue', content: 'ToolTipBody' }
        },
        show: { effect: { type: 'slide'} },
        position: {
            corner: {
                target: 'topRight',
                tooltip: 'bottomLeft'
            }
        }
    });
    $("td.TotalBurglary").qtip({
        content: {
            text: 'Equals the sum of residential and non-residential burglaries.',
            title: { text: 'Total Burglary' }
        },
        style: {
            name: 'cream', // Inherit from preset style
            color: 'black',
            width: 200,
            padding: 5,
            border: { color: 'black', width: 1, radius: 0 },
            classes: { title: 'ToolTipTitleBlue', content: 'ToolTipBody' }
        },
        show: { effect: { type: 'slide'} },
        position: {
            corner: {
                target: 'topRight',
                tooltip: 'bottomLeft'
            }
        }
    });
    $("td.TotalThefts").qtip({
        content: {
            text: 'Equals the sum of thefts >= $400 and thefts < $400.',
            title: { text: 'Total Thefts' }
        },
        style: {
            name: 'cream', // Inherit from preset style
            color: 'black',
            width: 200,
            padding: 5,
            border: { color: 'black', width: 1, radius: 0 },
            classes: { title: 'ToolTipTitleBlue', content: 'ToolTipBody' }
        },
        show: { effect: { type: 'slide'} },
        position: {
            corner: {
                target: 'topRight',
                tooltip: 'bottomLeft'
            }
        }
    });
    $("td.TotalPropertyCrime").qtip({
        content: {
            text: 'Equals the sum of Total Burglary, Total Thefts, and motor vehicle thefts.',
            title: { text: 'Total Property Crime' }
        },
        style: {
            name: 'cream', // Inherit from preset style
            color: 'black',
            width: 200,
            padding: 5,
            border: { color: 'black', width: 1, radius: 0 },
            classes: { title: 'ToolTipTitleBlue', content: 'ToolTipBody' }
        },
        show: { effect: { type: 'slide'} },
        position: {
            corner: {
                target: 'topRight',
                tooltip: 'bottomLeft'
            }
        }
    });
    $("td.CrimeIndex").qtip({
        content: {
            text: 'Equals the sum of Total Violent Crime and Total Property Crime. This figure is used by the FBI as a standard reportable index for comparing national crime statistics.',
            title: { text: 'Crime Index' }
        },
        style: {
            name: 'cream', // Inherit from preset style
            color: 'black',
            width: 200,
            padding: 5,
            border: { color: 'black', width: 1, radius: 0 },
            classes: { title: 'ToolTipTitleRed', content: 'ToolTipBody' }
        },
        show: { effect: { type: 'slide'} },
        position: {
            corner: {
                target: 'topRight',
                tooltip: 'bottomLeft'
            }
        }
    });
}
