$(document).ready(function(){

    $('.topmenu ul li').hover(
        function() {
            $(this).addClass("active");
      $('nobrd').addClass("active");
            $(this).find('ul').slideDown(100);
        },
        function() {
            $(this).removeClass("active");
      $('nobrd').removeClass("active");
            $(this).find('ul').slideUp(10);
        }
    );


  $('ul.line li').hover(
        function() {
            $(this).addClass("active");
            $(this).find('ul').slideDown(100);
        },
        function() {
            $(this).removeClass("active");
            $(this).find('ul').slideUp(10);
        }
    );



  $('.expando').hover(
    function () {
      $(this).css({'z-index' : '2'});
    },
    function () {
      $(this).css({'z-index' : '1'});
    }
  );






/*
  $('div.topmenu ul li').wrapInner("<b></b>");
  $('div.topmenu ul li ul li').unwrap("<b></b>");
*/



});



//$(function($){
/* SwitchBacks v0.01a
 * @author ZavuloN
 * @param Object  options   hash with options
 *                images      - Array список картинок для смены
 *                shiftingBlocks  - jQuery Object Блоки для смены внутри основного
 *                wait      - задержка перед сменой
 *                animationSpeed  - время анимации
 *
 */

/*
  $.fn.switchBacks = function(options) {
    $(this).each(function(){
      new switchBacks(this, options);
    })
    return this
  }

  var switchBacks = function(el, options){

    var $this = this;
    this.el = el;
    this.current_index = 0;
    this.wait_load = false;
    var defaults = {
      wait:9000,
      animationSpeed: 1200
    }

    $this.options = $.extend({}, defaults, options)
    $this.options.shiftingBlocks.hide().eq(0).show();

      $(this).css('background-image', 'url(' + $this.options.images[0] + ')')

    this.change = function(){
          if (!$this.wait_load) {
              if ($this.options.images[++$this.current_index] == undefined)
                  $this.current_index = 0
              $this.waitLoadImage($this.options.images[$this.current_index])
          }
      }

      this.interval = setInterval(this.change, $this.options.wait)

      this.waitLoadImage = function(link){
          $this.wait_load = true;
          var img = new Image();
          $(img).load(function(){
              $($this.el).fadeOut($this.options.animationSpeed, function(){
                  $($this.el).css('background-image', 'url(' + link + ')');
          $this.options.shiftingBlocks.hide().eq($this.current_index).show();
                  $($this.el).fadeIn($this.options.animationSpeed, function(){
                      $this.wait_load = false;
                  })
              })
        delete img;
          }).error(function(){
              if ($this.options.images[++$this.current_index] == undefined)
                  $this.current_index = 0
              $this.waitLoadImage($this.options.images[$this.current_index])
          }).attr('src', link);

      }

  }

}(jQuery));
*/

