//
// Homepage.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   November 4, 2009, 6:20 am with psd2css Online version 1.56

 var $j = jQuery.noConflict();
                     $j(document).ready(function($)
                         
                        {     
var timerId;

  // This is required for the PNG fix to work.
  if( $.fn.pngfix != null )
    $("img[@src$=png]").pngfix();

  // This is some javascript to stop IE from displaying the img alt attributes
  // when you mouse over imagess.  If you would like IE to display the alt attributes,
  // just comment out the following 4 lines.  Don't worry, if you leave this in 
  // place, your ALT attributes are still readable by the search engines.
  var tmpalt;
  $("img").hover( 
    function(){ tmpalt = $(this).attr( "alt" ); $(this).attr( "alt", "" ); },
    function(){ $(this).attr( "alt", tmpalt ); });

  // This is code to handle all of the _linkover events.  It works by
  // creating a special Wrap class, adding it to the link and linkover
  // divs of each link and linkover pair, and assigning a hover event to
  // that.
  $("#Homepage-32").addClass("Wrap-26-32").hide();
  $("#Homepage-26").addClass("Wrap-26-32");
  $(".Wrap-26-32").hover(
    function(){ $("#Homepage-32").show(); $("#Homepage-26").hide(); },
    function(){ $("#Homepage-26").show(); $("#Homepage-32").hide(); });
  $("#Homepage-33").addClass("Wrap-27-33").hide();
  $("#Homepage-27").addClass("Wrap-27-33");
  $(".Wrap-27-33").hover(
    function(){ $("#Homepage-33").show(); $("#Homepage-27").hide(); },
    function(){ $("#Homepage-27").show(); $("#Homepage-33").hide(); });
  $("#Homepage-34").addClass("Wrap-28-34").hide();
  $("#Homepage-28").addClass("Wrap-28-34");
  $(".Wrap-28-34").hover(
    function(){ $("#Homepage-34").show(); $("#Homepage-28").hide(); },
    function(){ $("#Homepage-28").show(); $("#Homepage-34").hide(); });
  $("#Homepage-35").addClass("Wrap-29-35").hide();
  $("#Homepage-29").addClass("Wrap-29-35");
  $(".Wrap-29-35").hover(
    function(){ $("#Homepage-35").show(); $("#Homepage-29").hide(); },
    function(){ $("#Homepage-29").show(); $("#Homepage-35").hide(); });
  $("#Homepage-36").addClass("Wrap-30-36").hide();
  $("#Homepage-30").addClass("Wrap-30-36");
  $(".Wrap-30-36").hover(
    function(){ $("#Homepage-36").show(); $("#Homepage-30").hide(); },
    function(){ $("#Homepage-30").show(); $("#Homepage-36").hide(); });
  $("#Homepage-37").addClass("Wrap-31-37").hide();
  $("#Homepage-31").addClass("Wrap-31-37");
  $(".Wrap-31-37").hover(
    function(){ $("#Homepage-37").show(); $("#Homepage-31").hide(); },
    function(){ $("#Homepage-31").show(); $("#Homepage-37").hide(); });
   $("#Homepage-61").addClass("Wrap-60-61").hide();
   $("#Homepage-60").addClass("Wrap-60-61");
   $(".Wrap-60-61").hover(
     function(){ $("#Homepage-61").show(); $("#Homepage-60").hide(); },
     function(){ $("#Homepage-60").show(); $("#Homepage-61").hide(); });
   $("#Homepage-62").addClass("Wrap-59-62").hide();
   $("#Homepage-59").addClass("Wrap-59-62");
   $(".Wrap-59-62").hover(
     function(){ $("#Homepage-62").show(); $("#Homepage-59").hide(); },
     function(){ $("#Homepage-59").show(); $("#Homepage-62").hide(); });
   $("#Homepage-63").addClass("Wrap-58-63").hide();
   $("#Homepage-58").addClass("Wrap-58-63");
   $(".Wrap-58-63").hover(
     function(){ $("#Homepage-63").show(); $("#Homepage-58").hide(); },
     function(){ $("#Homepage-58").show(); $("#Homepage-63").hide(); });
   $("#Homepage-64").addClass("Wrap-57-64").hide();
   $("#Homepage-57").addClass("Wrap-57-64");
   $(".Wrap-57-64").hover(
     function(){ $("#Homepage-64").show(); $("#Homepage-57").hide(); },
     function(){ $("#Homepage-57").show(); $("#Homepage-64").hide(); });
   $("#Homepage-65").addClass("Wrap-56-65").hide();
   $("#Homepage-56").addClass("Wrap-56-65");
   $(".Wrap-56-65").hover(
     function(){ $("#Homepage-65").show(); $("#Homepage-56").hide(); },
     function(){ $("#Homepage-56").show(); $("#Homepage-65").hide(); });
   $("#Homepage-66").addClass("Wrap-55-66").hide();
   $("#Homepage-55").addClass("Wrap-55-66");
   $(".Wrap-55-66").hover(
     function(){ $("#Homepage-66").show(); $("#Homepage-55").hide(); },
     function(){ $("#Homepage-55").show(); $("#Homepage-66").hide(); });
   $("#Homepage-67").addClass("Wrap-54-67").hide();
   $("#Homepage-54").addClass("Wrap-54-67");
   $(".Wrap-54-67").hover(
     function(){ $("#Homepage-67").show(); $("#Homepage-54").hide(); },
     function(){ $("#Homepage-54").show(); $("#Homepage-67").hide(); });
   $("#Homepage-71").addClass("Wrap-70-71").hide();
   $("#Homepage-70").addClass("Wrap-70-71");
   $(".Wrap-70-71").hover(
     function(){ $("#Homepage-71").show(); $("#Homepage-70").hide(); },
     function(){ $("#Homepage-70").show(); $("#Homepage-71").hide(); });
   $("#Homepage-74").addClass("Wrap-73-74").hide();
   $("#Homepage-73").addClass("Wrap-73-74");
   $(".Wrap-73-74").hover(
     function(){ $("#Homepage-74").show(); $("#Homepage-73").hide(); },
     function(){ $("#Homepage-73").show(); $("#Homepage-74").hide(); });
   $("#Homepage-76").addClass("Wrap-75-76").hide();
   $("#Homepage-75").addClass("Wrap-75-76");
   $(".Wrap-75-76").hover(
     function(){ $("#Homepage-76").show(); $("#Homepage-75").hide(); },
     function(){ $("#Homepage-75").show(); $("#Homepage-76").hide(); });
   $("#Homepage-78").addClass("Wrap-77-78").hide();
   $("#Homepage-77").addClass("Wrap-77-78");
   $(".Wrap-77-78").hover(
     function(){ $("#Homepage-78").show(); $("#Homepage-77").hide(); },
     function(){ $("#Homepage-77").show(); $("#Homepage-78").hide(); });
   $("#Homepage-80").addClass("Wrap-79-80").hide();
   $("#Homepage-79").addClass("Wrap-79-80");
   $(".Wrap-79-80").hover(
     function(){ $("#Homepage-80").show(); $("#Homepage-79").hide(); },
     function(){ $("#Homepage-79").show(); $("#Homepage-80").hide(); });
   $("#Homepage-82").addClass("Wrap-81-82").hide();
   $("#Homepage-81").addClass("Wrap-81-82");
   $(".Wrap-81-82").hover(
     function(){ $("#Homepage-82").show(); $("#Homepage-81").hide(); },
     function(){ $("#Homepage-81").show(); $("#Homepage-82").hide(); });
   $("#Homepage-102").addClass("Wrap-101-102").hide();
   $("#Homepage-101").addClass("Wrap-101-102");
   $(".Wrap-101-102").hover(
     function(){ $("#Homepage-102").show(); $("#Homepage-101").hide(); },
     function(){ $("#Homepage-101").show(); $("#Homepage-102").hide(); });
   $("#Homepage-104").addClass("Wrap-103-104").hide();
   $("#Homepage-103").addClass("Wrap-103-104");
   $(".Wrap-103-104").hover(
     function(){ $("#Homepage-104").show(); $("#Homepage-103").hide(); },
     function(){ $("#Homepage-103").show(); $("#Homepage-104").hide(); });
   $("#Homepage-106").addClass("Wrap-105-106").hide();
   $("#Homepage-105").addClass("Wrap-105-106");
   $(".Wrap-105-106").hover(
     function(){ $("#Homepage-106").show(); $("#Homepage-105").hide(); },
     function(){ $("#Homepage-105").show(); $("#Homepage-106").hide(); });
  
  // This is code to handle the homebutton_hmenu_empty menu
   $("#Homepage-53").hide().addClass("allMenus");
   $("#Homepage-61").mouseover(function(e){
     e.preventDefault();
     $(".allMenus").hide();
     $("#Homepage-53").show();
 //    Remove the following 2 lines if you don't want this menu to dissappear
   //  automatically.  Change how long the menu stays visible by changing
   //  the 4000 to another number of milliseconds
     clearTimeout( timerId );
     timerId = setTimeout( '$("#Homepage-53").hide()', 4000 );
   });
  
 //  This is code to handle the wpbutton_hmenu menu
   $("#Homepage-25").hide().addClass("allMenus");
   $("#Homepage-62").mouseover(function(e){
     e.preventDefault();
     $(".allMenus").hide();
     $("#Homepage-25").show();
   //  Remove the following 2 lines if you don't want this menu to dissappear
   //  automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    // clearTimeout( timerId );
  //   timerId = setTimeout( '$("#Homepage-25").hide()', 4000 );
  });
  
  // This is code to handle the servicesbutton_hmenu menu
   $("#Homepage-45").hide().addClass("allMenus");
  $("#Homepage-63").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Homepage-45").show();
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
   //  clearTimeout( timerId );
   //  timerId = setTimeout( '$("#Homepage-45").hide()', 4000 );
  });
  
  // This is code to handle the resourcesbutton_hmenu menu
  $("#Homepage-15").hide().addClass("allMenus");
  $("#Homepage-64").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Homepage-15").show();
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
   //  clearTimeout( timerId );
   //  timerId = setTimeout( '$("#Homepage-15").hide()', 4000 );
  });
  
  // This is code to handle the newsbutton_hmenu menu
  $("#Homepage-38").hide().addClass("allMenus");
  $("#Homepage-65").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Homepage-38").show();
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
   //  clearTimeout( timerId );
   //  timerId = setTimeout( '$("#Homepage-38").hide()', 4000 );
  });
  
  // This is code to handle the supportbutton_hmenu menu
  $("#Homepage-19").hide().addClass("allMenus");
  $("#Homepage-66").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Homepage-19").show();
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
   //  clearTimeout( timerId );
   //  timerId = setTimeout( '$("#Homepage-19").hide()', 4000 );
  });
  
  // This is code to handle the askusbutton_hmenu menu
  $("#Homepage-12").hide().addClass("allMenus");
  $("#Homepage-67").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Homepage-12").show();
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
   //  clearTimeout( timerId );
   //  timerId = setTimeout( '$("#Homepage-12").hide()', 4000 );
  });
  
    // Here we add some javascript to take care of the scrolling
  // sections of the page that you designed.  It works by removing
  // each scrollcontent layer (and it's children) from the DOM and re-
  // inserting it (and a copy) inside the matching scrollframe layer.
  // Then we define an interval timer with a callback function
  // where we move the scrollcontent within the scrollframe.
  //  Scrolling code for: SubPageServices
  var scrollOffset88 = 0;
  $('#Subpage-87').append( $('#Subpage-88') );
  $('#Subpage-88').clone().addClass('Copy-Subpage-88').insertAfter('#Subpage-88');
  function ScrollFunc()
  {
    //  Change the speed of the scroll by changing the '2' in the following
   //  line after the '+='.  Negative numbers scroll the other way.
    scrollOffset88 += 2;
     // Scroll vertically by changing 'left' to 'top' and 'width' to 'height
    //  in the following lines
    $('#Subpage-88').css( 'left', scrollOffset88 );
    $('.Copy-Subpage-88').css( 'left', scrollOffset88 - $('.Copy-Subpage-88').width() + 1 );
   if( scrollOffset88 > $('.Copy-Subpage-88').width() )
     scrollOffset88 -= $('.Copy-Subpage-88').width();
 }
 setInterval( ScrollFunc, 64 ); 

});




