.ad-gallery {
  width: 990px;
  overflow: hidden;
}
.ad-gallery, .ad-gallery * {
  margin: 0;
  padding: 0;
}
  .ad-gallery .ad-image-wrapper {
    width: 400px;
    height: 286px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
  }
    .ad-gallery .ad-image-wrapper .ad-loader {
      position: absolute;
      z-index: 10;
      top: 48%;
      left: 48%;
      border: 1px solid #CCC;
    }
    .ad-gallery .ad-image-wrapper .ad-next {
      position: absolute;
      right: 0;
      top: 0;
      width: 25%;
      height: 100%;
      cursor: pointer;
      display: block;
      z-index: 100;
    }
    .ad-gallery .ad-image-wrapper .ad-prev {
      position: absolute;
      left: 0;
      top: 0;
      width: 25%;
      height: 100%;
      cursor: pointer;
      display: block;
      z-index: 100;
    }
    .ad-gallery .ad-image-wrapper .ad-prev, .ad-gallery .ad-image-wrapper .ad-next {
      /* Or else IE will hide it */
      background: url(non-existing.jpg)\9
    }
      .ad-gallery .ad-image-wrapper .ad-prev .ad-prev-image, .ad-gallery .ad-image-wrapper .ad-next .ad-next-image {
        background: url(ad_prev.png);
        width: 30px;
        height: 30px;
        display: none;
        position: absolute;
        top: 47%;
        left: 0;
        z-index: 101;
      }
      .ad-gallery .ad-image-wrapper .ad-next .ad-next-image {
        background: url(ad_next.png);
        width: 30px;
        height: 30px;
        right: 0;
        left: auto;
      }
    .ad-gallery .ad-image-wrapper .ad-image {
      position: absolute;
      overflow: hidden;
      top: 0;
      left: 0;
      z-index: 9;
    }
      .ad-gallery .ad-image-wrapper .ad-image a img {
        border: 0;
      }
      .ad-gallery .ad-image-wrapper .ad-image .ad-image-description {
        position: absolute;
        bottom: 0px;
        left: 0px;
        padding: 7px;
        text-align: left;
        width: 100%;
        z-index: 2;
        background: url(opa75.png);
        color: #000;
      }
      * html .ad-gallery .ad-image-wrapper .ad-image .ad-image-description {
        background: none;
        filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true, sizingMethod=scale, src='opa75.png');
      }
        .ad-gallery .ad-image-wrapper .ad-image .ad-image-description .ad-description-title {
          display: block;
        }
  .ad-gallery .ad-controls {
    height: 20px;
  }
    .ad-gallery .ad-info {
      float: left;
    }
    .ad-gallery .ad-slideshow-controls {
      float: right;
    }
      .ad-gallery .ad-slideshow-controls .ad-slideshow-start, .ad-gallery .ad-slideshow-controls .ad-slideshow-stop {
        padding-left: 5px;
        cursor: pointer;
      }
      .ad-gallery .ad-slideshow-controls .ad-slideshow-countdown {
        padding-left: 5px;
        font-size: 0.9em;
      }
    .ad-gallery .ad-slideshow-running .ad-slideshow-start {
      cursor: default;
      font-style: italic;
    }
    .buttons {
	position: relative;
	top:10px;
	left:30px;
	z-index:40;
	}
/*	
	div.actions-title {
	width: 180px;
	position: absolute;
	margin-top: -9px;
	margin-left: 15px;
	text-align: center;
    color: #fff;
    font: bold 0.8em/1.3 arial, helvetica, sans-serif;
    text-decoration: none;
	z-index:300;
	}
	
	img.actions-image {
	width: 180px;
	border: 1px solid #FFF;
	position: absolute;
	margin-top: 22px;
	margin-left: 17px;
	}
	
	div.actions-desc {
	width: 180px;
	position: absolute;
	margin-top: 166px;
	margin-left: 17px;
	text-align: justify;
    color: #000;
    font: normal 0.8em/1.3 arial, helvetica, sans-serif;
	}
*/	
    .ad-gallery .ad-nav {
    width: 2000px;
    position: relative;
	top: -27px;
	/* В следующей строчке смещаются вправо на один шаг таблетки главной страницы, чтобы создать таблетку со ссылкой на другую страницу 
	left: 195px;*/
	/* В следующей строчке смещаются вправо на два шага таблетки главной страницы, чтобы создать две таблетки со ссылкой на другую страницу */
	left: 390px;
	z-index:50;
  }
      .ad-gallery .ad-forward, .ad-gallery .ad-back {
      position: absolute;
      top: 0;
      height: 100%;
      z-index: 10;
    }
    /* IE 6 doesn't like height: 100% */
    * html .ad-gallery .ad-forward, .ad-gallery .ad-back {
      height: 100px;
    }
    .ad-gallery .ad-back {
      cursor: pointer;
      left: -20px;
      width: 13px;
      display: block;
      background: url(ad_scroll_back.png) 0px 22px no-repeat;
    }
    .ad-gallery .ad-forward {
      cursor: pointer;
      display: block;
      right: -20px;
      width: 13px;
      background: url(ad_scroll_forward.png) 0px 22px no-repeat;
    }
    .ad-gallery .ad-nav .ad-thumbs {
      overflow: hidden;
      width: 100%;
    }
      .ad-gallery .ad-thumbs .ad-thumb-list {
        float: left;
		margin-top: 10px;
		margin-left: 8px;
        width: 9000px;
        list-style: none;
      }
        .ad-gallery .ad-thumbs li {
          float: left;
          padding: 7px;
		  width: 180px;
        }
          .ad-gallery .ad-thumbs li a {
            display: block;
          }
            .ad-gallery .ad-thumbs li a img {
			  margin-top:15px;
              border: 1px solid #FFF;
              display: block;
            }
            .ad-gallery .ad-thumbs li a.ad-active img {
			  margin-top:15px;
              border: 1px solid #616161;
            }
	.ad-gallery .ad-thumbs li.null_image {
	position: absolute;
	top: -100px;
	left: 30px;
	visibility: hidden;
	}
	
	.ad-thumb-list li {
	text-align: justify;
	color: #000;
	font: normal 0.8em/1.3 arial, helvetica, sans-serif;
	}
	
	.ad-thumb-list li a{
	text-align: center;
	color: #fff;
	font: bold 1em/1.5 arial, helvetica, sans-serif;
	text-decoration: none;
	}
	
/*Галерея для второй страницы*/

  .ad-gallery .from-left .ad-nav {
    width: 2000px;
	height: 500px;
    position: relative;
	top: -300px;
	left: 700px;
	z-index:50;
  } 	

      .ad-gallery .from-left .ad-forward, .ad-gallery .from-left .ad-back {
      position: absolute;
      top: 0;
      height: 100%;
      z-index: 10;
    }
    /* IE 6 doesn't like height: 100% */
    * html .ad-gallery .from-left .ad-forward, .ad-gallery .from-left .ad-back {
      height: 100px;
    }
    .ad-gallery .from-left .ad-back {
      cursor: pointer;
      left: -20px;
      width: 13px;
      display: block;
      background: url(ad_scroll_back.png) 0px 22px no-repeat;
    }
    .ad-gallery .from-left .ad-forward {
      cursor: pointer;
      display: block;
      right: -20px;
      width: 13px;
      background: url(ad_scroll_forward.png) 0px 22px no-repeat;
    }
    .ad-gallery .from-left .ad-nav .ad-thumbs {
      overflow: hidden;
      width: 100%;
	  height:500px;
    }
      .ad-gallery .from-left .ad-thumbs .ad-thumb-list {
        /*float: left;
		margin-top: 10px;
		margin-left: 8px;
        width: 9000px;*/
		display: block;
        list-style: none;
      }
        .ad-gallery .from-left .ad-thumbs .ad-thumb-list li {
          /*float: left;*/
          padding: 2px !important;
		  width: 180px;
        }
          .ad-gallery .from-left .ad-thumbs li a {
            display: block;
          }
            .ad-gallery .from-left .ad-thumbs li a img {
			  margin-top:0px;
              border: 0px;
              display: block;
            }
            .ad-gallery .from-left .ad-thumbs li a.ad-active img {
			  margin-top:0px;
              border: 0px;
            }
	.ad-gallery .from-left .ad-thumbs li.null_image {
	position: absolute;
	top: -100px;
	left: 30px;
	visibility: hidden;
	}
	
	.from-left .ad-thumb-list li {
	text-align: justify;
	color: #000;
	font: normal 0.8em/1.3 arial, helvetica, sans-serif;
	}
	
	.from-left .ad-thumb-list li a{
	text-align: center;
	color: #fff;
	font: bold 1em/1.5 arial, helvetica, sans-serif;
	text-decoration: none;
	}  
	
/* Can't do display none, since Opera won't load the images then */
.ad-preloads {
  position: absolute;
  left: -9000px;
  top: -9000px;
}