﻿$(document).ready(function () {
    $('img.image1').data('ad-desc', '');
    $('img.image1').data('ad-title', '');
    $('img.image4').data('ad-desc', '');
    $('img.image5').data('ad-desc', '');
    var galleries = $('.ad-gallery').adGallery({
        slideshow: {
            enable: true,
            autostart: false,
            speed: 12000
        }
    });
    $('#switch-effect').change(
      function () {
          galleries[0].settings.effect = $(this).val();
          return false;
      }
    );
    $('#toggle-slideshow').click(
      function () {
          galleries[0].slideshow.toggle();
          return false;
      }
    );
    $('#toggle-description').click(
      function () {
          if (!galleries[0].settings.description_wrapper) {
              galleries[0].settings.description_wrapper = $('#descriptions');
          } else {
              galleries[0].settings.description_wrapper = false;
          }
          return false;
      });

    $('.video-icon').click(function () {
        $('.divYouTudeVideo').show();
        $('.ad-image-wrapper').hide();
        $('.div360dView').hide();
    });

    $('.image0').click(function () {
        $('.divYouTudeVideo').hide();
        $('.ad-image-wrapper').show();
        $('.div360dView').hide();
    });

    $('.product-view').click(function () {
        $('.divYouTudeVideo').hide();
        $('.ad-image-wrapper').hide();
        $('.div360dView').show();
    });
});
