$(document).ready(
    function()
    {
        // Getting started http://craigsworks.com/projects/qtip/docs/
        // Tutorial http://craigsworks.com/projects/qtip/docs/tutorials
        // Complete settings http://craigsworks.com/projects/qtip/docs/reference/#content

        // styles
        $.fn.qtip.styles.onepageStyleHome = { // Last part is the name of the style
            width: 200,
            background: '#fcf6c6',
            color: '#000000',
            textAlign: 'left',
            border: {
                width: 1,
                radius: 8,
                color: '#ffe04f'
            },
            tip: {
                corner: 'bottomMiddle',
                size: {
                   x: 20, // Be careful that the x and y values refer to coordinates on screen, not height or width.
                   y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
                }
            }
        }

        
        $.fn.qtip.styles.onepageStyleAccounts = { // Last part is the name of the style
            width: 200,
            background: '#fcf6c6',
            color: '#000000',
            textAlign: 'left',
            border: {
                width: 1,
                radius: 2,
                color: '#ffe04f'
            },
            tip: {
                corner: 'bottomLeft',
                size: {
                   x: 20, // Be careful that the x and y values refer to coordinates on screen, not height or width.
                   y : 5 // Depending on which corner your tooltip is at, x and y could mean either height or width!
                }
            }
        }

        // Identifies the homepage
        if ($('#video-box').length > 0)
        {
            //alert ("I am on the homepage");
           $('.learn-more').qtip({
                content: Translation['global.tooltip_learnmore'],
                style: 'onepageStyleHome',
                position: {
                    corner: {
                        target: 'topMiddle',
                        tooltip: 'bottomMiddle'
                    }
                }
            });
        }

        if (window.location.pathname.indexOf("/accounts") >- 1)
        {
            $('#table-project-title').qtip({
                content: Translation['global.tooltip_table_project_title'],
                style: 'onepageStyleAccounts',
                position: {
                    corner: {
                        target: 'topRight',
                        tooltip: 'bottomLeft'
                    }
                },
                show: { when: { event: 'click' } },
                hide: { when: { event: 'unfocus' } }
            });

	        $('#table-project-status').qtip({
                content: Translation['global.tooltip_table_project_status'],
                style: 'onepageStyleAccounts',
                position: {
                    corner: {
                         target: 'topRight',
                         tooltip: 'bottomLeft'
                    }
                },
                show: { when: { event: 'click' } },
                hide: { when: { event: 'unfocus' } }
            });

            $('#table-project-create-pdf').qtip({
                content: Translation['global.tooltip_table_project_create_pdf'],
               style: 'onepageStyleAccounts',
                position: {
                   corner: {
                     target: 'topRight',
                     tooltip: 'bottomLeft'
                        }
            },
                show: { when: { event: 'click' } },
                hide: { when: { event: 'unfocus' } }
             });

            $('#table-project-copy').qtip({
                content: Translation['global.tooltip_table_project_copy'],
                style: 'onepageStyleAccounts',
                position: {
                   corner: {
                     target: 'topRight',
                     tooltip: 'bottomLeft'
                        }
            },
                show: { when: { event: 'click' } },
                hide: { when: { event: 'unfocus' } }
            });
        }

        if (window.location.pathname.indexOf("/pages") >- 1)
        {
        }

        if (window.location.pathname.indexOf("/pages/about") >- 1)
        {
        }
    }
);
