(function() {
  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
  ($(document)).ready(function() {
    var delay;
    ($('.side_menu_tip')).mouseenter(function() {
      var menu;
      menu = $('.side_menu', this);
      if (menu.is(':hidden')) {
        menu.unbind('mouseleave');
        return menu.show('slide', {
          direction: 'left'
        }, 1000, __bind(function() {
          return menu.mouseleave(function() {
            return menu.delay(500).hide('slide', {
              direction: 'left'
            }, 1000);
          });
        }, this));
      }
    });
    delay = function(ms, func) {
      return setTimeout(func, ms);
    };
    if ((window.location.protocol + '//' + window.location.hostname + '/') === (window.location + '')) {
      ($('.side_menu_tip')).mouseenter();
      delay(5000, function() {
        return ($('.side_menu')).mouseleave();
      });
    }
    ($('#cabecalho_menu #indique')).mouseenter(function() {
      return ($('#indique_1', this)).hide('fade', 300, __bind(function() {
        return ($('#indique_2', this)).show('fade', 500);
      }, this));
    });
    ($('#cabecalho_menu #indique')).mouseleave(function() {
      return ($('#indique_2', this)).hide('fade', 300, __bind(function() {
        return ($('#indique_1', this)).show('fade', 500);
      }, this));
    });
    ($('#cabecalho_menu #siga-nos')).mouseenter(function() {
      return ($(this)).hide('fade', 300, function() {
        return ($('#cabecalho_menu #siga-nos_botoes')).show('fade', 500);
      });
    });
    ($('#cabecalho_menu #siga-nos_botoes')).mouseleave(function() {
      return ($(this)).hide('fade', 300, function() {
        return ($('#cabecalho_menu #siga-nos')).show('fade', 500);
      });
    });
    ($('#cabecalho_menu #busca')).mouseenter(function() {
      ($(this)).animate({
        height: '45px'
      }, 500, function() {
        return ($('.menu_label', this)).click(function() {
          return document.location.href = "" + (($('#searchform')).attr('action')) + "/?s=" + (($('#s')).attr('value')) + "&submit=buscar";
        });
      });
      ($('#cabecalho_menu #indique')).hide('fade');
      return ($('.menu_label', this)).html('buscar');
    });
    return ($('#cabecalho_menu #busca')).mouseleave(function() {
      ($(this)).animate({
        height: '20px'
      }, 500);
      ($('#cabecalho_menu #indique')).show('fade');
      ($('.menu_label', this)).html('busca');
      return ($('.menu_label', this)).unbind('click');
    });
  });
}).call(this);

