﻿
$(document).ready(function() {
    $("#prevslide").hover(
      function() {

          $("#prevslide").stop().animate({
              opacity: '1'

          }, 500);

      },
      function() {
          $("#prevslide").stop().animate({
              opacity: '0'
          }, 500);
      }
    );

    $("#nextslide").hover(
      function() {

          $("#nextslide").stop().animate({
              opacity: '1'
          }, 500);

      },
      function() {
          $("#nextslide").stop().animate({
              opacity: '0'
          }, 500);
      }
    );


      $('.img_slide').hover(function() {
          if (!$(this.parentNode).hasClass('active_slide_link')) {
              this.src = "/images/icons/blank.gif";
          }
      }, function() {
          if (!$(this.parentNode).hasClass('active_slide_link')) {
              this.src = "/images/design/gray_trans_pixel.png";
          }
      });

      // Show content button
      $(".img_slide").bind("click", function(e) {
      if (!$(this.parentNode).hasClass('active_slide_link') && !$.inAnimation) {
              $(".img_slide").attr("src", "/images/design/gray_trans_pixel.png");
              this.src = "/images/icons/blank.gif";
              $('.active_slide_link').removeClass('active_slide_link');
              $(this.parentNode).addClass('active_slide_link');
          }
      });



  });

$(window).bind("load", function() {

$('#supersize_links').serialScroll({
    items: '.showThisImage',
    offset: 0, //when scrolling to photo, stop 230 before reaching it (from the left)
    start: 0, //as we are centering it, start at the 1nd
    duration: 300,
    force: true,
    stop: false,
    lock: true,
    cycle: false, //don't pull back once you reach the end
    jump: false //click on the images to scroll to them

});

});
