$(document).ready(function() {
   
    // set up variables
    var searchId = 'enterEmail';
    var defaultText = "enter email";
   
    // when the input gets focus
    $('#' + searchId).focus(function() {
       
        // if the value in the input equals the default text
        if(this.value == defaultText) {
           
            // clear the input value
            this.value = '';
        }
       
    // when the input loses focus
    }).blur(function() {
       
        // if the value is empty
        if(this.value == '') {
           
            // set the input value to the default text
            this.value = defaultText;
        }
       
    });
});


jQuery(document).ready(function() {
    // grab the elements we will need
    var rotationItems = jQuery('#rotation-items').find('li');
    var rotationFrame = jQuery('#rotation-frame');
   
    // when an li element is hovered
    rotationItems.hover(function() {
       
        // loop through the items and remove the active class
        rotationItems.each(function() {
            jQuery(this).removeClass('active');
        });
       
        // re-assign "this" to use jquery and store in a local variable
        $this = jQuery(this);
       
        // add the active class to the hovered element
        $this.addClass('active');
       
        // change the image source in the rotation frame to match the one in the hovered element
        rotationFrame.find('img').attr('src', $this.find('img').attr('src'));
       
        // change the rotation frame content to use the hovered elements content
        rotationFrame.find('.content-box').html($this.find('textarea').text());
       
        // change the learn more link to use the same link as the list item
        rotationFrame.find('.learn-more').attr('href', $this.find('a').attr('href'));
    });
   
});