/* inserts a message box within the home page to provide further explanation for the six panels */

var tlmessage = '<h3>Pre-Employment Assessments</h3> Every job has a set of optimum characteristics, but not every person has what the job requires. By assessing the job and the candidate\'s motivations and DISC behavior, you increase your ability to make consistently better hiring decisions. <br /><br /> [<a id="clickclose">click to close</a>]';

var tcmessage = '<h3>Development Tools for Coaching and More</h3> Personal development and team development are essential factors for success. Personal DISC profiles can help employees to identify their strengths and weaknesses, while team profiles address the effectiveness and balance of skills among your teams. Coaches and facilitators can use these tools to zero-in on issues and tailor solutions to specific behavioral profiles.<br /><br /> [<a id="clickclose">click to close</a>]';

var trmessage = '<h3>Employee &amp; Customer Surveys</h3> Are you prepared for the undiluted truth? Data Dome specializes in getting employees and customers to share what they are really thinking. The key is anonymity. The value is immeasurable.<br /><br />Surveys can help you answer questions about your employees and your working environment: Why is your talent leaving? Is your ignorance or your employees\' true feelings ruining your company? How do good customers feel about you? Will they buy again? Would you skip an annual medical checkup Are corporate cancers growing? Etc. &nbsp; &nbsp; [<a id="clickclose">click to close</a>]';

var blmessage = '<h3>Who is Advanced DISC Certified?</h3> Why do so many people who are already certified in other DISC programs and other systems like Myers-Briggs come to Data Dome for Advanced Experiential DISC Certification? We offer <strong>Intense Training, but with a Safety Net</strong> We pride ourselves in offering some of the finest, most thorough and complete DISC training in the business. We set the bar high, which does mean that occasionally some students won\'t pass our exam the first time they take it. If this happens to you, don\'t worry, you\'ve got a safety net... <strong>Our one-on-one follow up and retest program:</strong> We pledge to work one-on-one with you until you are able to thoroughly understand all the concepts and are able to pass your certification - all for no additional cost.  &nbsp; &nbsp; [<a id="clickclose">click to close</a>]';

var bcmessage = '<h3>On-Site DISC Facilitation</h3> At Data Dome we see the kinds of challenges that corporations face every day when it comes to creating effective team performance, strong leaders, healthy communication, and of course, great sales. That is why we offer these focused DISC facilitation programs: <strong>Team Building</strong>, <strong>Leadership Development</strong>, <strong>Communication Insights</strong>, <strong>Behavioral Selling</strong>, <strong>Succession Planning</strong>, and more. We\'ll come to you and lead your team through a focused program designed to create immediate impact. <br /><br /> [<a id="clickclose">click to close</a>]';

var brmessage = '<h3>We Assess the Assessments</h3> We continuously survey the field of available assessments, and methodologies, so that we can offer you the finest, most thoroughly tested and effective tools for your company\'s situation. We would never ask you to drive a nail using a screwdriver nor would we try to make your human capital issues conform to fit mismatched assessment tools. <br /><br /> [<a id="clickclose">click to close</a>]';

jQuery.noConflict();


jQuery(document).ready(function() {
    var headerHome = jQuery(".headerhome");
    var hhheight = headerHome.height();
    var hhheightopen = hhheight + 150;

    jQuery("#homemessageanchor1").after('<div id="homestuffmessage1">message goes here Lorem ipsum dolor sit amet, consectetur adipisicing elit,  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br /><br /> [<a id="clickclose">click to close</a>]</div>');
    var homeStuffmessage1 = jQuery("#homestuffmessage1");
    var hsheight = homeStuffmessage1.height() + 20;

    homeStuffmessage1.hide();

    jQuery("#homemessageanchor2").after('<div id="homestuffmessage2">message goes here Lorem ipsum dolor sit amet, consectetur adipisicing elit,  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br /><br /> [<a id="clickclose">click to close</a>]</div>');
    var homeStuffmessage2 = jQuery("#homestuffmessage2");
    homeStuffmessage2.hide();

    var openclosespeed = 600;
    var timedelay = 250;

    function messagedisplay(messclose, messopen, messmess) {
        messopen.html(messmess);

        if (messclose.is(":visible")) {
            messclose.stop(true, false).slideUp(openclosespeed);
        };
        if (messopen.is(":hidden")) {
            messopen.stop(true, false).slideDown(openclosespeed);
        } else {
            messopen.stop(true, false).animate({
	            height: hsheight
	        },
	        50);
        };

        headerHome.stop(true, false).animate({
            height: hhheightopen
        },
        openclosespeed);
    }
    function messageclose(messopen) {
        messopen.delay(timedelay).slideUp(openclosespeed);
        headerHome.delay(timedelay).animate({
            height: hhheight
        },
        openclosespeed);
    }


    homeStuffmessage1.click(function() {
        homeStuffmessage1.slideUp('slow',
        function() {
            homeStuffmessage1.hide();
        }
        );
    }
    );
    homeStuffmessage2.click(function() {
        homeStuffmessage2.slideUp('slow',
        function() {
            homeStuffmessage2.hide();
        }
        );
    }
    );


    jQuery("#tlmore").parent().hover(
    function() {
        messagedisplay(homeStuffmessage2, homeStuffmessage1, tlmessage)
    },
    function() {
        messageclose(homeStuffmessage1)
    }
    );


    jQuery("#blmore").parent().hover(
    function() {
        messagedisplay(homeStuffmessage1, homeStuffmessage2, blmessage)
    },
    function() {
        messageclose(homeStuffmessage2)
    }
    );

    jQuery("#tcmore").parent().hover(
    function() {
        messagedisplay(homeStuffmessage2, homeStuffmessage1, tcmessage)
    },
    function() {
        messageclose(homeStuffmessage1)
    }
    );


    jQuery("#bcmore").parent().hover(
    function() {
        messagedisplay(homeStuffmessage1, homeStuffmessage2, bcmessage)
    },
    function() {
        messageclose(homeStuffmessage2)
    }
    );

    jQuery("#trmore").parent().hover(
    function() {
        messagedisplay(homeStuffmessage2, homeStuffmessage1, trmessage)
    },
    function() {
        messageclose(homeStuffmessage1)
    }
    );


    jQuery("#brmore").parent().hover(
    function() {
        messagedisplay(homeStuffmessage1, homeStuffmessage2, brmessage)
    },
    function() {
        messageclose(homeStuffmessage2)
    }
    );


});
