$(document).ready(
  function()
  {
    
    if ("function" == typeof secondary_load) 
    {
      secondary_load();
    } 
    $('div.cloud a.plus').hover(
      function()
      {
        $(this).parent().addClass('highlightplus');
      },
      function()
      {
        $(this).parent().removeClass('highlightplus');
      }
    )
    $('div.cloud a.minus').hover(
      function()
      {
        $(this).parent().addClass('highlightminus');
      },
      function()
      {
        $(this).parent().removeClass('highlightminus');
      }
    )
  }
);


function populate_element(selector, defvalue) 
{
  if($.trim($(selector).val()) == "") 
  {
    $(selector).val(defvalue);
  }

  $(selector).focus(function() 
    {
      if($(selector).val() == defvalue) 
      {
        $(selector).val("");
      }
    }
  );
  
  $(selector).blur(function() 
    {
      if($.trim($(selector).val()) == "") 
      {
        $(selector).val(defvalue);
      }
    }
  );
}










var saycount=0;
function say(text) 
{
  if(typeof(console) == 'object' && typeof(console.log) == 'function')
  {
    console.log(text); 
  }
  else
  {
    if(document.getElementById('say'))
    {
      saycount++;
      $('#say').prepend('<div>'+saycount+'. '+text+'</div>');
    }
    else
    {
      alert(text);
    }
  }
}
      

