
hs.graphicsDir = '/usr/system/plugins/highslide-full/graphics/';
hs.showCredits = false;
var lang="ru";
var sl_speed=3500;
var sl_timeout=3500;

var speed_slidedown=500;

function resized() {
   var w=($("#baseDiv_1").width() - 346)+'px';


    $("#innerContent").css('height', $("#baseDiv_1").height()-433);



   $(".topArt, #artContainer").css('width', w);
}

$(window).resize(resized);

$(document).ready(function() {
   resized();
   $(".banner").hover(function () {
         $(this).find(".hover").show();
         $(this).find(".default").hide();
      },
      function () {
         $(this).find(".hover").hide();
         $(this).find(".default").show();
      }
   );
   $(".topArt").cycle({
       fx:     'fade', 
       speed:   sl_speed,
       timeout: sl_timeout
   });
   $("#show_slideshow").click(function () {
      e=$("#contentSlideshow");
      if (e.is(":visible")) {
         e.hide();
      }
      else {
         e.show();
      }
   });
   $("#submenu li").hover(
      function () {
         
      },
      function () {
         var e2=$(this).find("ul");
         $(this).removeClass("act");
         if (e2.is(":visible")) {
            e2.slideUp(speed_slidedown);
         }
      }
   );
   $("#submenu > li > a").click(function () {
      var e=$(this).parent().find("ul");
      if (!e.length) {
         return true;
      }
      var t=$(this)[0];
      $("#submenu > li > a").each(function () {
         if ($(this)[0]!=t) {
            var e2=$(this).parent().find("ul");
            $(this).removeClass("act");
            if (e2.is(":visible")) {
               e2.slideUp(speed_slidedown);
            }
         }
      });
      $(this).addClass("act");
      if (!e.is(":visible")) {
         e.slideDown(speed_slidedown);
      }
      else {
         e.slideUp(speed_slidedown);
      }
      return false;
   });
});


// contacts

$(document).ready(function () {
   $("a.highslide").click(function() {
      return hs.expand(this);
   });
   $("input[type=button]").each(function () {
      if ($(this).attr('href')) {
        $(this).click(function () {
           window.location.href=$(this).attr('href');
        });
      }
   });
   if ($.validationEngine) {
      $(".valForm").validationEngine({
         ajaxSubmit: true,
         ajaxSubmitFile: $(".valForm").attr('action')
      });
   }
});

