//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   May 27, 2010, 12:40 am with psd2css Online version 1.78

$(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-8").addClass("Wrap-9-8").hide();
  $("#Layer-9").addClass("Wrap-9-8");
  $(".Wrap-9-8").hover(
    function(){ $("#Layer-8").show(); $("#Layer-9").hide(); },
    function(){ $("#Layer-9").show(); $("#Layer-8").hide(); });
  $("#Layer-10").addClass("Wrap-11-10").hide();
  $("#Layer-11").addClass("Wrap-11-10");
  $(".Wrap-11-10").hover(
    function(){ $("#Layer-10").show(); $("#Layer-11").hide(); },
    function(){ $("#Layer-11").show(); $("#Layer-10").hide(); });
  $("#Layer-17").addClass("Wrap-13-17").hide();
  $("#Layer-13").addClass("Wrap-13-17");
  $(".Wrap-13-17").hover(
    function(){ $("#Layer-17").show(); $("#Layer-13").hide(); },
    function(){ $("#Layer-13").show(); $("#Layer-17").hide(); });
  $("#Layer-18").addClass("Wrap-16-18").hide();
  $("#Layer-16").addClass("Wrap-16-18");
  $(".Wrap-16-18").hover(
    function(){ $("#Layer-18").show(); $("#Layer-16").hide(); },
    function(){ $("#Layer-16").show(); $("#Layer-18").hide(); });
  $("#Layer-20").addClass("Wrap-14-20").hide();
  $("#Layer-14").addClass("Wrap-14-20");
  $(".Wrap-14-20").hover(
    function(){ $("#Layer-20").show(); $("#Layer-14").hide(); },
    function(){ $("#Layer-14").show(); $("#Layer-20").hide(); });

  // Here are the functions to support communication between your
  // video controls and your video(s).  The video(s) play in p2cvideo.swf.
  // That swf file has registered the p2cplay(), p2crewind() and p2cpause() callbacks
  // with the javascript instance on this page.

  function getFlashVideo(div) {
    var flashVideo = ($('#'+div+' [name="'+div+'-video"]')[0]) ?
                      $('#'+div+' [name="'+div+'-video"]')[0] :
                            ((window[div+'-video']) ?
                              window[div+'-video'] : document[div+'-video']);
    return flashVideo;
  }

  $('#Layer-8').click(function(e){ e.preventDefault(); getFlashVideo('Layer-7').p2cPause(); });
  $('#Layer-9').click(function(e){ e.preventDefault(); getFlashVideo('Layer-7').p2cPause(); });
  $('#Layer-10').click(function(e){ e.preventDefault(); getFlashVideo('Layer-7').p2cPlay(); });
  $('#Layer-11').click(function(e){ e.preventDefault(); getFlashVideo('Layer-7').p2cPlay(); });
});

