//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   January 10, 2009, 8:37 pm with psd2css Online version 1.30

$(document).ready(function(){

  // This is required for the PNG fix to work.
  if( $.fn.pngfix != null )
    $("img[@src$=png]").pngfix();


  // 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: mountain
  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 );


});

