//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   January 6, 2010, 5:14 am with psd2css Online version 1.65

$(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-38").addClass("Wrap-39-38").hide();
  $("#Layer-39").addClass("Wrap-39-38");
  $(".Wrap-39-38").hover(
    function(){ $("#Layer-38").show(); $("#Layer-39").hide(); },
    function(){ $("#Layer-39").show(); $("#Layer-38").hide(); });
  $("#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(); });

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

});
