$(document).ready(function(){


$(".imgRotate").rotateAnimation(0);

    $(".sliderWrap").click( function() {
        if ($(this).find(".openCloseIdentifier").is(":hidden")) {
            $(this).find(".slider").animate({ height: "0px"}, 500 );
            $(this).find(".openCloseIdentifier").show();
            $(this).find(".imgRotate").rotateAnimation(0);
        } else {
            $(this).find(".slider").animate({ height: "80px"}, 500 );
            $(this).find(".openCloseIdentifier").hide();
            $(this).find(".imgRotate").rotateAnimation(45);
        }
    });



$("#login").hide();
    $("a.login").click(function () {
        $("#login").fadeIn("slow");
        //$("#login").load("<?php bloginfo('stylesheet_directory'); ?>/register.php");
     });

    $("a.fechar").click(function () {
            $("#login").hide();
      });

$("#register").hide();
    $("a.register").click(function () {
            $("#register").fadeIn("slow");
           // $("#register").load("<?php bloginfo('stylesheet_directory'); ?>/register.php");
      });

    $("a.fechar").click(function () {
            $("#register").hide();
      });


// Botão MAIS
    $(".rotate").hover(
        function() {
          //$(this).animate({"opacity": "0"}, "slow");
          //$(this).find(".imgRotate").rotateAnimation(45);
          //$(this).find(".meta").slideDown("500");
        },
        function() {
          //$(this).animate({"opacity": "1"}, "slow");
          //$(this).find(".imgRotate").rotateAnimation(0);
          //$(this).find(".meta").slideUp("500");
    });

// super / sub
    $(".super").hover(
        function() {
          $(this).find(".sub").fadeIn("fast");
        },
        function() {
          $(this).find(".sub").fadeOut( "fast");
    });


//   Categorias
	$("#abasLaterais").hover(function(){
                $(this).animate({"left": "0px"}, "500");
		}, function () {
                $(this).animate({"left": "-180px"}, "500");
	});


        //   Destaque Header
	$("#destaque").hover(function(){
            $(".followMouse").fadeIn("slow");
            $().mousemove(function(e)
            {
                $(".follow").css( { "left": e.pageX + "px", "top": e.pageY + "px" } );
            });

            }, function () {
                //$(".followMouse").fadeOut("fast");
                $(".followMouse").css( {"display":"none"} );
	});

//   Autor
        $(".autor").hover(
            function() {
            $(this).find(".autorMeta").fadeIn("fast");
            },
            function() {
              $(this).find(".autorMeta").fadeOut("fast");
        });


    $(".referencias").css({"opacity": "0.3"}, "500");
    $(".referencias").hover(
        function(){
            //$(this).fadeIn("fast");
            $(this).animate({"opacity": "1"}, "500");
            //alert("colocou");
        },
       function(){
           $(this).animate({"opacity": "0.3"}, "500");
           //alert("tirou");
        }
    );


});

$(function() {
    $('#container-1').tabs({ fxFade: true, fxSpeed: 'fast' });
    $('#abasLaterais').tabs({ fxFade: true, fxSpeed: 'fast' });
});