//
// java.js
//
//   This is where all the javascript required by your design is written.
//

var timerId;
$(document).ready(function(){

  // 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.
  $("#commercials-48").addClass("Wrap-47-48").hide();
  $("#commercials-47").addClass("Wrap-47-48");
  $(".Wrap-47-48").hover(
    function(){ $("#commercials-48").show(); $("#commercials-47").hide(); },
    function(){ $("#commercials-47").show(); $("#commercials-48").hide(); });
  $("#commercials-50").addClass("Wrap-49-50").hide();
  $("#commercials-49").addClass("Wrap-49-50");
  $(".Wrap-49-50").hover(
    function(){ $("#commercials-50").show(); $("#commercials-49").hide(); },
    function(){ $("#commercials-49").show(); $("#commercials-50").hide(); });
  $("#commercials-52").addClass("Wrap-51-52").hide();
  $("#commercials-51").addClass("Wrap-51-52");
  $(".Wrap-51-52").hover(
    function(){ $("#commercials-52").show(); $("#commercials-51").hide(); },
    function(){ $("#commercials-51").show(); $("#commercials-52").hide(); });
  $("#commercials-56").addClass("Wrap-55-56").hide();
  $("#commercials-55").addClass("Wrap-55-56");
  $(".Wrap-55-56").hover(
    function(){ $("#commercials-56").show(); $("#commercials-55").hide(); },
    function(){ $("#commercials-55").show(); $("#commercials-56").hide(); });
  $("#commercials-58").addClass("Wrap-57-58").hide();
  $("#commercials-57").addClass("Wrap-57-58");
  $(".Wrap-57-58").hover(
    function(){ $("#commercials-58").show(); $("#commercials-57").hide(); },
    function(){ $("#commercials-57").show(); $("#commercials-58").hide(); });
  $("#commercials-60").addClass("Wrap-59-60").hide();
  $("#commercials-59").addClass("Wrap-59-60");
  $(".Wrap-59-60").hover(
    function(){ $("#commercials-60").show(); $("#commercials-59").hide(); },
    function(){ $("#commercials-59").show(); $("#commercials-60").hide(); });
  $("#commercials-62").addClass("Wrap-61-62").hide();
  $("#commercials-61").addClass("Wrap-61-62");
  $(".Wrap-61-62").hover(
    function(){ $("#commercials-62").show(); $("#commercials-61").hide(); },
    function(){ $("#commercials-61").show(); $("#commercials-62").hide(); });
  $("#commercials-64").addClass("Wrap-63-64").hide();
  $("#commercials-63").addClass("Wrap-63-64");
  $(".Wrap-63-64").hover(
    function(){ $("#commercials-64").show(); $("#commercials-63").hide(); },
    function(){ $("#commercials-63").show(); $("#commercials-64").hide(); });
  
  // This is code to handle the contact_hmenu menu
  $("#commercials-45").hide().addClass("allMenus");
  $("#commercials-46").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#commercials-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( '$("#commercials-45").hide()', 2500 );
  });
  
  // This is code to handle the ourwork_hmenu menu
  $("#commercials-54").hide().addClass("allMenus");
  $("#commercials-53").mouseover(function(e){
    e.preventDefault();
    $(".allMenus").hide();
    $("#commercials-54").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( '$("#commercials-54").hide()', 2500 );
  });

});

