﻿var tmgr = {
    active: -1,
    tooltips: [
			"Recipients click the &quot;report spam&quot; button on your email message because they don't recognize the sender, they don't remember opting-in to your list, the content of the message is no longer relevant to their needs, they don't like the frequency of your emails, or they want to unsubscribe from your list.",
			"Emails that bounce because they were sent to invalid and inactive email accounts.  This occurs when senders don't follow list management best practices.",
			"Best practices for email size dictate that messages should be 10-60 kb and messages should never include attachments.",
			"Segment your list into smaller groups and throttle the deployment pattern so all of your messages aren't hitting the ISPs at the same time.",
			"ISPs like to see a steady deployment pattern from senders – sending too frequently or infrequently will trigger filters and will damage your reputation.",
			"While the text filters aren't as prominent as they once were, they still come into play if other best practices aren't being followed and words such as &quot;free&quot; will prevent your message from being delivered.",
			"ISPs are now monitoring the number of recipients who are opening and clicking on your messages along with the ones who continue to ignore or delete your emails.  You will hurt your reputation and deliverability if you send messages to inactive subscribers. ",
			"Most ISPs are augmenting their IP-based reputation systems with domain-based reputation services that rely on DK/DKIM.",
			"Spam traps are old email addresses that have been abandoned by their owners.  ISPs monitor these inboxes to see which senders continue to send emails to them even though the recipients never take action upon a message.",
			"ISPs rely on certification and accreditation services as they prove the sender is legitimate.  Other reputation services include white lists, blacklists, blocklists, etc.",
			"Send your email in a manner that is fully compliant with RFC standards and follow best practices in your email's heading, links, images, content, reverse DNS settings, etc., as they all factor into your reputation."
			],
    getActive: function() { return tmgr.tooltips[tmgr.active]; },
    setActive: function(alt) {
        switch (alt) {
            case "User Complaints": tmgr.active = 0; break;
            case "Invalid Addresses": tmgr.active = 1; break;
            case "Size": tmgr.active = 2; break;
            case "Volume": tmgr.active = 3; break;
            case "Frequency": tmgr.active = 4; break;
            case "Content": tmgr.active = 5; break;
            case "Engagement": tmgr.active = 6; break;
            case "Domain": tmgr.active = 7; break;
            case "Spam Trap Hits": tmgr.active = 8; break;
            case "3rd Party Reputation Services": tmgr.active = 9; break;
            case "Sending Infrastructure": tmgr.active = 10; break;
            default: tmgr.active = -1;
        }
    }
};

$(document).ready(function() {
    $('.simpletip').mouseover(function() {
        tmgr.setActive($(this).attr('alt'));
        $('.tooltip').html(tmgr.getActive()).show();
        $('.tooltip')
            .css('top', (130 - ($('.tooltip').height() / 2)) + 'px')
            .css('right', '5px');
    }).mouseout(function() {
        $('.tooltip').html('').hide();
    });

});
