	// animação dos botões
	
	$(document).ready(function() {	
		
		$(".nav-shadow li").hover(function() {
			var e = this;
		    $(e).find("a").stop().animate({ marginLeft: "-8px" }, 200, function() {
		    	$(e).find("a").animate({ marginLeft: "-6px" }, 200);
		    });
		    $(e).find("img.shadow").stop().animate({ width: "25px", height: "25px", marginTop: "4" }, 200);
		},function(){
			var e = this;
		    $(e).find("a").stop().animate({ marginLeft: "2px" }, 150, function() {
		    	$(e).find("a").animate({ marginLeft: "0px" }, 150);
		    });
		    $(e).find("img.shadow").stop().animate({ width: "25px", height: "25px", marginTop: "4" }, 150);
		});
						
	});
  // fecha animação
  
  // Abre efeito imagens
  
  (function ($) {
        $.fn.fadeTransition = function(options) {
          var options = $.extend({pauseTime: 5000, transitionTime: 300}, options);
          var transitionObject;

          Trans = function(obj) {
            var timer = null;
            var current = 0;
            var els = $("> *", obj).css("display", "none").css("left", "0").css("top", "0").css("position", "absolute");
            $(obj).css("position", "relative");
            $(els[current]).css("display", "block");

            function transition(next) {
              $(els[current]).fadeOut(options.transitionTime);
              $(els[next]).fadeIn(options.transitionTime);
              current = next;
              cue();
            };

            function cue() {
              if ($("> *", obj).length < 2) return false;
              if (timer) clearTimeout(timer);
              timer = setTimeout(function() { transition((current + 1) % els.length | 0)} , options.pauseTime);
            };
            
            this.showItem = function(item) {
              if (timer) clearTimeout(timer);
              transition(item);
            };

            cue();
          }

          this.showItem = function(item) {
            transitionObject.showItem(item);
          };

          return this.each(function() {
            transitionObject = new Trans(this);
          });
        }

      })(jQuery);
    
      var page = {
        tr: null,
        init: function() {
          page.tr = $(".area").fadeTransition({pauseTime: 5000, transitionTime: 300});
          $(".nav-shadow").each(function() {
            $(this).children().each( function(idx) {
              if ($(this).is("li"))
                $(this).click(function() { page.tr.showItem(idx); })
            });
          });
        },

        show: function(idx) {
          if (page.tr.timer) clearTimeout(page.tr.timer);
          page.tr.showItem(idx);
        }
      };
	  
	  $(document).ready(page.init);
	  
	 