//***********************************************************************************************************
// Main JS for all pages
//***********************************************************************************************************


/* Default 'onload' events (for all pages) */
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
function GlobalStartup() {
  if (document.getElementById) {
   var tmpId = document.getElementById("search_text");
   if (tmpId.value == "") { tmpId.value = "Site search with Google"; }
  }
}


/* Simple Preloader (from DW-CS3) */
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Example:
// simplePreload( '01.gif', '02.gif' ); 

function Simple_Preload() {
  var args = simplePreload.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i < args.length; i++) {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}


/* Main Navigation (jQuery) */
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$(document).ready(function() {
  $("#Navigation_Main > ul > li").hover(
    function() {
      if($(this).find("ul").is(":animated")) {
        $(this).find("ul").stop(true, true);
      }
      $(this).find("ul").slideDown("fast");
    },
    function() {
      $(this).find("ul").delay(150).fadeOut("fast");
    }
  );
});


