window.addEvent('domready', function() {
  if ( $$('div.container-tips') ) {
    new MooTooltips({
      hovered:'.container-tips',    // the element that when hovered shows the tip
      ToolTipClass:'container-tips-content',  // tooltip display class
      toolTipPosition:-1, // -1 top; 1: bottom - set this as a default position value if none is set on the element
      sticky:false,   // remove tooltip if closed
      fromTop: 0,   // distance from mouse or object
      fromLeft: -55,  // distance from left
      duration: 300,    // fade effect transition duration
      fadeDistance: 20    // the distance the tooltip starts the morph
    });
  }
});

function confirmContactSubmission()
{
  var captcha = prompt( 'Please enter the verification code next to the submit button to confirm your submission.' );
  if ( captcha && 'null' != captcha && 'undefined' != captcha && '' != captcha) {
    $('contact-form').captcha.value = captcha;
  } else {
    alert( 'You must enter the verification code shown on the page to submit your message.' );
    return false ;
  }
}

var min=8;
var max=18;

function setFontSize(value,keyword) {
  var container = $('home-link');
  if ( container ) container.setStyle('backgroundImage', 'url(/images/shared/bg_text_' + keyword + '.gif)');

  // update p elements
  $$('#body-text p').each( function(element, index) {
    element.setStyle('fontSize',value);
  } );

  // update p elements
  $$('#body-text li').each( function(element, index) {
    element.setStyle('fontSize',value);
  } );
}

