//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   February 26, 2010, 7:03 pm with psd2css Online version 1.74

$(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-6").addClass("Wrap-7-6").hide();
  $("#Layer-7").addClass("Wrap-7-6");
  $(".Wrap-7-6").hover(
    function(){ $("#Layer-6").show(); $("#Layer-7").hide(); },
    function(){ $("#Layer-7").show(); $("#Layer-6").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-18").addClass("Wrap-19-18").hide();
  $("#Layer-19").addClass("Wrap-19-18");
  $(".Wrap-19-18").hover(
    function(){ $("#Layer-18").show(); $("#Layer-19").hide(); },
    function(){ $("#Layer-19").show(); $("#Layer-18").hide(); });
  $("#Layer-20").addClass("Wrap-21-20").hide();
  $("#Layer-21").addClass("Wrap-21-20");
  $(".Wrap-21-20").hover(
    function(){ $("#Layer-20").show(); $("#Layer-21").hide(); },
    function(){ $("#Layer-21").show(); $("#Layer-20").hide(); });
  $("#Layer-22").addClass("Wrap-23-22").hide();
  $("#Layer-23").addClass("Wrap-23-22");
  $(".Wrap-23-22").hover(
    function(){ $("#Layer-22").show(); $("#Layer-23").hide(); },
    function(){ $("#Layer-23").show(); $("#Layer-22").hide(); });
  $("#Layer-24").addClass("Wrap-25-24").hide();
  $("#Layer-25").addClass("Wrap-25-24");
  $(".Wrap-25-24").hover(
    function(){ $("#Layer-24").show(); $("#Layer-25").hide(); },
    function(){ $("#Layer-25").show(); $("#Layer-24").hide(); });
  $("#Layer-26").addClass("Wrap-27-26").hide();
  $("#Layer-27").addClass("Wrap-27-26");
  $(".Wrap-27-26").hover(
    function(){ $("#Layer-26").show(); $("#Layer-27").hide(); },
    function(){ $("#Layer-27").show(); $("#Layer-26").hide(); });

  // 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: banner
  var scrollOffset2 = 0;
  $('#Layer-8').append( $('#Layer-2') );
  $('#Layer-2').clone().addClass('Copy-Layer-2').insertAfter('#Layer-2');
  function ScrollFunc()
  {
    // Change the speed of the scroll by changing the '2' in the following
    // line after the '+='.  Negative numbers scroll the other way.
    scrollOffset2 += 2;
    // Scroll vertically by changing 'left' to 'top' and 'width' to 'height
    // in the following lines
    $('#Layer-2').css( 'left', scrollOffset2 );
    $('.Copy-Layer-2').css( 'left', scrollOffset2 - $('.Copy-Layer-2').width() + 1 );
    if( scrollOffset2 > $('.Copy-Layer-2').width() )
      scrollOffset2 -= $('.Copy-Layer-2').width();
  }
  setInterval( ScrollFunc, 64 );


});
