//
// psd2css.js
//
//   This is where all the javascript required by your design is written.
//
//   Originally generated at http://psd2cssonline.com 
//   August 31, 2009, 8:18 am with psd2css Online version 1.45

var timerId;
$(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-22").addClass("Wrap-25-22").hide();
  $("#Layer-25").addClass("Wrap-25-22");
  $(".Wrap-25-22").hover(
    function(){ $("#Layer-22").show(); $("#Layer-25").hide(); },
    function(){ $("#Layer-25").show(); $("#Layer-22").hide(); });
  $("#Layer-23").addClass("Wrap-26-23").hide();
  $("#Layer-26").addClass("Wrap-26-23");
  $(".Wrap-26-23").hover(
    function(){ $("#Layer-23").show(); $("#Layer-26").hide(); },
    function(){ $("#Layer-26").show(); $("#Layer-23").hide(); });
  $("#Layer-24").addClass("Wrap-27-24").hide();
  $("#Layer-27").addClass("Wrap-27-24");
  $(".Wrap-27-24").hover(
    function(){ $("#Layer-24").show(); $("#Layer-27").hide(); },
    function(){ $("#Layer-27").show(); $("#Layer-24").hide(); });
  $("#Layer-28").addClass("Wrap-29-28").hide();
  $("#Layer-29").addClass("Wrap-29-28");
  $(".Wrap-29-28").hover(
    function(){ $("#Layer-28").show(); $("#Layer-29").hide(); },
    function(){ $("#Layer-29").show(); $("#Layer-28").hide(); });
  $("#Layer-31").addClass("Wrap-34-31").hide();
  $("#Layer-34").addClass("Wrap-34-31");
  $(".Wrap-34-31").hover(
    function(){ $("#Layer-31").show(); $("#Layer-34").hide(); },
    function(){ $("#Layer-34").show(); $("#Layer-31").hide(); });
  $("#Layer-32").addClass("Wrap-35-32").hide();
  $("#Layer-35").addClass("Wrap-35-32");
  $(".Wrap-35-32").hover(
    function(){ $("#Layer-32").show(); $("#Layer-35").hide(); },
    function(){ $("#Layer-35").show(); $("#Layer-32").hide(); });
  $("#Layer-33").addClass("Wrap-36-33").hide();
  $("#Layer-36").addClass("Wrap-36-33");
  $(".Wrap-36-33").hover(
    function(){ $("#Layer-33").show(); $("#Layer-36").hide(); },
    function(){ $("#Layer-36").show(); $("#Layer-33").hide(); });
  $("#Layer-37").addClass("Wrap-38-37").hide();
  $("#Layer-38").addClass("Wrap-38-37");
  $(".Wrap-38-37").hover(
    function(){ $("#Layer-37").show(); $("#Layer-38").hide(); },
    function(){ $("#Layer-38").show(); $("#Layer-37").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(); });
  
  // This is code to handle the media_menu menu
  $("#Layer-30").hide().addClass("allMenus");
  $("#Layer-28").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-30").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-30").hide("slow")', 4000 );
  });
  
  // This is code to handle the store_menu menu
  $("#Layer-39").hide().addClass("allMenus");
  $("#Layer-37").click(function(e){
    e.preventDefault();
    $(".allMenus").hide("slow");
    $("#Layer-39").show("slow");
    // Remove the following 2 lines if you don't want this menu to dissappear
    // automatically.  Change how long the menu stays visible by changing
    // the 4000 to another number of milliseconds
    clearTimeout( timerId );
    timerId = setTimeout( '$("#Layer-39").hide("slow")', 4000 );
  });

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


});
