//
// Created by Steve Chapman, Virtual Outdoor Adventures, 13th April 2009
// Modified from PSD2CSS output
//

$(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.

/*Guidebook Button Hover event*/
  $("#guidebook-b-h").addClass("Wrap-guidebook").hide();
  $("#guidebook-b-n").addClass("Wrap-guidebook");
  $(".Wrap-guidebook").hover(
    function(){ $("#guidebook-b-h").show(); $("#guidebook-b-n").hide(); },
    function(){ $("#guidebook-b-n").show(); $("#guidebook-b-h").hide(); });
  
/*Vtour Button Hover event*/
$("#vtour-b-h").addClass("Wrap-vtour").hide();
  $("#vtour-b-n").addClass("Wrap-vtour");
  $(".Wrap-vtour").hover(
    function(){ $("#vtour-b-h").show(); $("#vtour-b-n").hide(); },
    function(){ $("#vtour-b-n").show(); $("#vtour-b-h").hide(); });
  
/*Webdesign Button Hover event*/
$("#webdesign-b-h").addClass("Wrap-webdesign").hide();
  $("#webdesign-b-n").addClass("Wrap-webdesign");
  $(".Wrap-webdesign").hover(
    function(){ $("#webdesign-b-h").show(); $("#webdesign-b-n").hide(); },
    function(){ $("#webdesign-b-n").show(); $("#webdesign-b-h").hide(); });
  
 /*Contact Button Hover Event*/
 $("#contact-b-h").addClass("Wrap-contact").hide();
  $("#contact-b-n").addClass("Wrap-contact");
  $(".Wrap-contact").hover(
    function(){ $("#contact-b-h").show(); $("#contact-b-n").hide(); },
    function(){ $("#contact-b-n").show(); $("#contact-b-h").hide(); });
  
 /*Demo Button Hover Event*/
 $("#demo-b-h").addClass("Wrap-demo").hide();
  $("#demo-b-n").addClass("Wrap-demo");
  $(".Wrap-demo").hover(
    function(){ $("#demo-b-h").show(); $("#demo-b-n").hide(); },
    function(){ $("#demo-b-n").show(); $("#demo-b-h").hide(); });
  
 /*Terms Button Hover Event*/
$("#terms-b-h").addClass("Wrap-terms").hide();
  $("#terms-b-n").addClass("Wrap-terms");
  $(".Wrap-terms").hover(
    function(){ $("#terms-b-h").show(); $("#terms-b-n").hide(); },
    function(){ $("#terms-b-n").show(); $("#terms-b-h").hide(); });
  
/*Partners Button Hover Event*/  
$("#partners-b-h").addClass("Wrap-partners").hide();
  $("#partners-b-n").addClass("Wrap-partners");
  $(".Wrap-partners").hover(
    function(){ $("#partners-b-h").show(); $("#partners-b-n").hide(); },
    function(){ $("#partners-b-n").show(); $("#partners-b-h").hide(); });
  
/*Site Button Hover Event*/  
$("#site-b-h").addClass("Wrap-site").hide();
  $("#site-b-n").addClass("Wrap-site");
  $(".Wrap-site").hover(
    function(){ $("#site-b-h").show(); $("#site-b-n").hide(); },
    function(){ $("#site-b-n").show(); $("#site-b-h").hide(); });  

});
