//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   January 28, 2010, 8:33 pm with psd2css Online version 1.71

$(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.
  $("#Layer-40").addClass("Wrap-41-40").hide();
  $("#Layer-41").addClass("Wrap-41-40");
  $(".Wrap-41-40").hover(
    function(){ $("#Layer-40").show(); $("#Layer-41").hide(); },
    function(){ $("#Layer-41").show(); $("#Layer-40").hide(); });
  $("#Layer-42").addClass("Wrap-43-42").hide();
  $("#Layer-43").addClass("Wrap-43-42");
  $(".Wrap-43-42").hover(
    function(){ $("#Layer-42").show(); $("#Layer-43").hide(); },
    function(){ $("#Layer-43").show(); $("#Layer-42").hide(); });
  $("#Layer-44").addClass("Wrap-45-44").hide();
  $("#Layer-45").addClass("Wrap-45-44");
  $(".Wrap-45-44").hover(
    function(){ $("#Layer-44").show(); $("#Layer-45").hide(); },
    function(){ $("#Layer-45").show(); $("#Layer-44").hide(); });
  $("#Layer-46").addClass("Wrap-47-46").hide();
  $("#Layer-47").addClass("Wrap-47-46");
  $(".Wrap-47-46").hover(
    function(){ $("#Layer-46").show(); $("#Layer-47").hide(); },
    function(){ $("#Layer-47").show(); $("#Layer-46").hide(); });
  $("#Layer-48").addClass("Wrap-49-48").hide();
  $("#Layer-49").addClass("Wrap-49-48");
  $(".Wrap-49-48").hover(
    function(){ $("#Layer-48").show(); $("#Layer-49").hide(); },
    function(){ $("#Layer-49").show(); $("#Layer-48").hide(); });
  $("#Layer-50").addClass("Wrap-51-50").hide();
  $("#Layer-51").addClass("Wrap-51-50");
  $(".Wrap-51-50").hover(
    function(){ $("#Layer-50").show(); $("#Layer-51").hide(); },
    function(){ $("#Layer-51").show(); $("#Layer-50").hide(); });
  $("#Layer-52").addClass("Wrap-53-52").hide();
  $("#Layer-53").addClass("Wrap-53-52");
  $(".Wrap-53-52").hover(
    function(){ $("#Layer-52").show(); $("#Layer-53").hide(); },
    function(){ $("#Layer-53").show(); $("#Layer-52").hide(); });
  $("#Layer-54").addClass("Wrap-55-54").hide();
  $("#Layer-55").addClass("Wrap-55-54");
  $(".Wrap-55-54").hover(
    function(){ $("#Layer-54").show(); $("#Layer-55").hide(); },
    function(){ $("#Layer-55").show(); $("#Layer-54").hide(); });
  $("#Layer-56").addClass("Wrap-57-56").hide();
  $("#Layer-57").addClass("Wrap-57-56");
  $(".Wrap-57-56").hover(
    function(){ $("#Layer-56").show(); $("#Layer-57").hide(); },
    function(){ $("#Layer-57").show(); $("#Layer-56").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: info
  var scrollOffset8 = 0;
  $('#Layer-7').append( $('#Layer-8') );
  $('#Layer-8').clone().addClass('Copy-Layer-8').insertAfter('#Layer-8');
  function ScrollFunc()
  {
    // Change the speed of the scroll by changing the '2' in the following
    // line after the '+='.  Negative numbers scroll the other way.
    scrollOffset8 += 2;
    // Scroll vertically by changing 'left' to 'top' and 'width' to 'height
    // in the following lines
    $('#Layer-8').css( 'left', scrollOffset8 );
    $('.Copy-Layer-8').css( 'left', scrollOffset8 - $('.Copy-Layer-8').width() + 1 );
    if( scrollOffset8 > $('.Copy-Layer-8').width() )
      scrollOffset8 -= $('.Copy-Layer-8').width();
  }
  setInterval( ScrollFunc, 64 );


  // Here is the javascript that connects your lbthumb layers to
  // your jpeg images for lightbox.  There are a number of options
  // here you can modify.  Check their website for documentation.
  $('a.lightbox').lightBox({
    imageBtnClose: 'close.gif',
    imageBtnNext: 'next.gif',
    imageBtnPrev: 'prev.gif',
    imageLoading: 'loading.gif',
    containerResizeSpeed: 500,
    overlayBgColor: '#000' 
    /* 
    txtOf: 'de'  
    overlayOpacity: 0.6,
    txtImage: 'Imagem',
    */
  });

});
