function productNav() {
  if($('#nav-product li').length) {
    var indicatorPos = getIndicatorPos($('#nav-product .current'));
    $('#nav-product > ul').after('<span class="indicator" style="left:'+indicatorPos+'px;"></span>');

    $('#nav-product > ul > li > a').click(function(e) {
      var $productNavLink = $(this);
      $productNavLink.addClass('no-outline');
      $('#nav-product .current:first').removeClass('current');
      $('#nav-product .feature:visible').fadeOut(250);
      $productNavLink.addClass('current');
      var newIndicatorPos = getIndicatorPos($('#nav-product .current:first'));
      $('#nav-product .indicator').animate({ left: newIndicatorPos }, 500);
      $productNavLink.siblings('.feature').fadeIn(500, function() {
        $productNavLink.trigger("animation-finished");
      }).removeClass('hide');
      var tagline = $productNavLink.siblings().find('.scroller a:first').attr('title');
      if(tagline !== '') {
        $productNavLink.siblings().find('.description p').text(tagline);
      } else {
        $productNavLink.siblings().find('.description').hide();
      }

      if($productNavLink.siblings().find('.scroller a').length) {
        //$productNavLink.parent().append('<div class="feature main-feature hide"></div>')
        $productNavLink.siblings().find('.scroller a').each(function() {
          var galleryImage = $(this).attr('href');
          $.preLoadImages(galleryImage);
        });
      }

      e.preventDefault();
    });
    $('body').append('<span class="screen-reader gallery-loading"></span>');
    var $productGallery = $('#nav-product .nav-product-gallery');
    $productGallery.append('<div class="feature main-feature hide"><img src="'+$('#nav-product .nav-product-gallery .scroller a:first-child').attr('href')+'" /></div>');
    $productGallery.find('.scroller li:first-child').addClass('current');
    $productGallery.find('.scroller img').after('<span class="overlay"></span>');
    $productGallery.find('.scroller a').click(function(e) {
      var $galleryPhoto = $(this),
          newPhoto = $galleryPhoto.attr('href'),
          newTagline = $galleryPhoto.attr('title'),
          $galleryFeature = $('#nav-product .nav-product-gallery .main-feature'),
          $galleryPhotoParent = $galleryPhoto.parent();
      $galleryPhoto.addClass('no-outline');

      if(!$galleryPhotoParent.hasClass('current')) {
        $galleryPhotoParent.append('<span class="loading hide">Loading</span>');
        $galleryPhotoParent.find('.loading').fadeIn(250);
        $galleryFeature.find('img').fadeOut(500,function() {
          $(this).attr('src',newPhoto).fadeIn(750, function() { $galleryPhoto.trigger('animation-finished'); });
          if(newTagline !== '') {
            $productGallery.find('.description').show().find(' p').text(newTagline);
          } else {
            $productGallery.find('.description').hide();
          }
        });
        $productGallery.find('.scroller .current').removeClass('current');
        $galleryPhotoParent.addClass('current');
        $galleryPhotoParent.find('.loading').delay(750).fadeOut(250,function() {
          $(this).remove();
        });
      }
      e.preventDefault();
    });
  }
}
