//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   March 10, 2009, 3:36 pm with psd2css Online version 1.32

$(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-5").addClass("Wrap-4-5").hide();
  $("#Layer-4").addClass("Wrap-4-5");
  $(".Wrap-4-5").hover(
    function(){ $("#Layer-5").show(); $("#Layer-4").hide(); },
    function(){ $("#Layer-4").show(); $("#Layer-5").hide(); });
  $("#Layer-247").addClass("Wrap-246-247").hide();
  $("#Layer-246").addClass("Wrap-246-247");
  $(".Wrap-246-247").hover(
    function(){ $("#Layer-247").show(); $("#Layer-246").hide(); },
    function(){ $("#Layer-246").show(); $("#Layer-247").hide(); });
  $("#Layer-249").addClass("Wrap-248-249").hide();
  $("#Layer-248").addClass("Wrap-248-249");
  $(".Wrap-248-249").hover(
    function(){ $("#Layer-249").show(); $("#Layer-248").hide(); },
    function(){ $("#Layer-248").show(); $("#Layer-249").hide(); });
  $("#Layer-251").addClass("Wrap-250-251").hide();
  $("#Layer-250").addClass("Wrap-250-251");
  $(".Wrap-250-251").hover(
    function(){ $("#Layer-251").show(); $("#Layer-250").hide(); },
    function(){ $("#Layer-250").show(); $("#Layer-251").hide(); });
  $("#Layer-253").addClass("Wrap-252-253").hide();
  $("#Layer-252").addClass("Wrap-252-253");
  $(".Wrap-252-253").hover(
    function(){ $("#Layer-253").show(); $("#Layer-252").hide(); },
    function(){ $("#Layer-252").show(); $("#Layer-253").hide(); });
  $("#Layer-255").addClass("Wrap-254-255").hide();
  $("#Layer-254").addClass("Wrap-254-255");
  $(".Wrap-254-255").hover(
    function(){ $("#Layer-255").show(); $("#Layer-254").hide(); },
    function(){ $("#Layer-254").show(); $("#Layer-255").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: b
  var scrollOffset256 = 0;
  $('#Layer-263').append( $('#Layer-256') );
  $('#Layer-256').clone().addClass('Copy-Layer-256').insertAfter('#Layer-256');
  function ScrollFunc()
  {
    // Change the speed of the scroll by changing the '2' in the following
    // line after the '+='.  Negative numbers scroll the other way.
    scrollOffset256 += 2;
    // Scroll vertically by changing 'left' to 'top' and 'width' to 'height
    // in the following lines
    $('#Layer-256').css( 'left', scrollOffset256 );
    $('.Copy-Layer-256').css( 'left', scrollOffset256 - $('.Copy-Layer-256').width() + 1 );
    if( scrollOffset256 > $('.Copy-Layer-256').width() )
      scrollOffset256 -= $('.Copy-Layer-256').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',
    */
  });

});
