var timerId;
$(document).ready(function(){					   

  // This is required for the PNG fix to work.
  if (window.DD_belatedPNG)
    DD_belatedPNG.fix('.pngimg');

  // 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.
  $("#Layer-3").addClass("Wrap-4-3").hide();
  $("#Layer-4").addClass("Wrap-4-3");
  $(".Wrap-4-3").hover(
    function(){ $("#Layer-3").show(); $("#Layer-4").hide(); },
    function(){ $("#Layer-4").show(); $("#Layer-3").hide(); });
  $("#Layer-5").addClass("Wrap-6-5").hide();
  $("#Layer-6").addClass("Wrap-6-5");
  $(".Wrap-6-5").hover(
    function(){ $("#Layer-5").show(); $("#Layer-6").hide(); },
    function(){ $("#Layer-6").show(); $("#Layer-5").hide(); });
  $("#Layer-7").addClass("Wrap-8-7").hide();
  $("#Layer-8").addClass("Wrap-8-7");
  $(".Wrap-8-7").hover(
    function(){ $("#Layer-7").show(); $("#Layer-8").hide(); },
    function(){ $("#Layer-8").show(); $("#Layer-7").hide(); });
  $("#Layer-9").addClass("Wrap-10-9").hide();
  $("#Layer-10").addClass("Wrap-10-9");
  $(".Wrap-10-9").hover(
    function(){ $("#Layer-9").show(); $("#Layer-10").hide(); },
    function(){ $("#Layer-10").show(); $("#Layer-9").hide(); });
  $("#Layer-11").addClass("Wrap-12-11").hide();
  $("#Layer-12").addClass("Wrap-12-11");
  $(".Wrap-12-11").hover(
    function(){ $("#Layer-11").show(); $("#Layer-12").hide(); },
    function(){ $("#Layer-12").show(); $("#Layer-11").hide(); });
  $("#Layer-13").addClass("Wrap-14-13").hide();
  $("#Layer-14").addClass("Wrap-14-13");
  $(".Wrap-14-13").hover(
    function(){ $("#Layer-13").show(); $("#Layer-14").hide(); },
    function(){ $("#Layer-14").show(); $("#Layer-13").hide(); });
  $("#Layer-15").addClass("Wrap-16-15").hide();
  $("#Layer-16").addClass("Wrap-16-15");
  $(".Wrap-16-15").hover(
    function(){ $("#Layer-15").show(); $("#Layer-16").hide(); },
    function(){ $("#Layer-16").show(); $("#Layer-15").hide(); });
  $("#Layer-22").addClass("Wrap-18-22").hide();
  $("#Layer-18").addClass("Wrap-18-22");
  $(".Wrap-18-22").hover(
    function(){ $("#Layer-22").show(); $("#Layer-18").hide(); },
    function(){ $("#Layer-18").show(); $("#Layer-22").hide(); });
  $("#Layer-23").addClass("Wrap-19-23").hide();
  $("#Layer-19").addClass("Wrap-19-23");
  $(".Wrap-19-23").hover(
    function(){ $("#Layer-23").show(); $("#Layer-19").hide(); },
    function(){ $("#Layer-19").show(); $("#Layer-23").hide(); });
  $("#Layer-24").addClass("Wrap-20-24").hide();
  $("#Layer-20").addClass("Wrap-20-24");
  $(".Wrap-20-24").hover(
    function(){ $("#Layer-24").show(); $("#Layer-20").hide(); },
    function(){ $("#Layer-20").show(); $("#Layer-24").hide(); });
  $("#Layer-25").addClass("Wrap-21-25").hide();
  $("#Layer-21").addClass("Wrap-21-25");
  $(".Wrap-21-25").hover(
    function(){ $("#Layer-25").show(); $("#Layer-21").hide(); },
    function(){ $("#Layer-21").show(); $("#Layer-25").hide(); });
  $("#Layer-31").addClass("Wrap-30-31").hide();
  $("#Layer-30").addClass("Wrap-30-31");
  $(".Wrap-30-31").hover(
    function(){ $("#Layer-31").show(); $("#Layer-30").hide(); },
    function(){ $("#Layer-30").show(); $("#Layer-31").hide(); });
  
 // This is code to handle the Aboutus submenu  
  $("#Clients_Active").addClass("Wrap-Clients_Over-Clients_Active").hide();
  $("#Clients_Over").addClass("Wrap-Clients_Over-Clients_Active");
  $(".Wrap-Clients_Over-Clients_Active").hover(
    function(){ $("#Clients_Active").show(); $("#Clients_Over").hide(); },
    function(){ $("#Clients_Over").show(); $("#Clients_Active").hide(); });
  $("#Testimonials_Actvive").addClass("Wrap-Testimonials_Over-Testimonials_Actvive").hide();
  $("#Testimonials_Over").addClass("Wrap-Testimonials_Over-Testimonials_Actvive");
  $(".Wrap-Testimonials_Over-Testimonials_Actvive").hover(
    function(){ $("#Testimonials_Actvive").show(); $("#Testimonials_Over").hide(); },
    function(){ $("#Testimonials_Over").show(); $("#Testimonials_Actvive").hide(); });
  
  // This is code to handle the portfolio submenu
  $("#Layer-17").hide().addClass("allMenus");
  $("#Layer-15").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Layer-17").show();
    clearTimeout( timerId );
  });
  // This is code to handle the aboutus_hmenu menu
  $("#Aboutus_hmenuBG").hide().addClass("allMenus");
  $("#Layer-9").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#Aboutus_hmenuBG").show();
    clearTimeout( timerId );
  });
    
// This is code to handle the Porfolio submenu timing
  
$("#Layer-15").mouseout(function(e){
    timerId = setTimeout( '$("#Layer-17").hide()', 300 );
  });


$("#Layer-17").mouseover(function(e){
    clearTimeout( timerId );
  });

$("#Layer-17").mouseout(function(e){
    timerId = setTimeout( '$("#Layer-17").hide()', 300 );
  });


  // This is code to handle the Aboutus submenu timing
$("#Layer-9").mouseout(function(e){
    timerId = setTimeout( '$("#Aboutus_hmenuBG").hide()', 300 );
  });


$("#Aboutus_hmenuBG").mouseover(function(e){
    clearTimeout( timerId );
  });

$("#Aboutus_hmenuBG").mouseout(function(e){
    timerId = setTimeout( '$("#Aboutus_hmenuBG").hide()', 300 );
  });


});
