jQuery.noConflict();
(function($) {
    $(function() {
        $(document).ready(function() {

            //detecção de página ativa e aplicação de jQuery em cada uma
            var pagina = window.location.pathname;
            pagina = pagina.substring(pagina.lastIndexOf("/") + 1, pagina.length).replace(".aspx", "").toLocaleLowerCase();
            switch (pagina) {
                case "":
                    numMenu = 1;
                    break;

                default:
                    numMenu = 0;
                    break;
            }
        });
        
        

        $("ul.menu li a#menu" + numMenu).addClass("selecionado");

        $("#header .logo a").hover(
            function() { $("#header .logo").stop().animate({ "paddingTop": "20px" }, 200) },
            function() { $("#header .logo").stop().animate({ "paddingTop": "15px" }, 200) }
        );

        $("#destaque .produtos.box a.mais").hover(
            function() { $(this).stop().animate({ "marginRight": "5px" }, 200) },
            function() { $(this).stop().animate({ "marginRight": "0px" }, 200) }
        );

        $("#destaque .noticias.box a.mais").hover(
            function() { $(this).stop().animate({ "marginRight": "30px" }, 200) },
            function() { $(this).stop().animate({ "marginRight": "25px" }, 200) }
        );

        $("#noticias .content .col.left a.mais").hover(
            function() { $(this).stop().animate({ "marginRight": "15px" }, 200) },
            function() { $(this).stop().animate({ "marginRight": "10px" }, 200) }
        );

        $("#noticias .chamadas .titulo a").hover(
            function() { $(this).stop().animate({ "paddingRight": "10px" }, 200) },
            function() { $(this).stop().animate({ "paddingRight": "0px" }, 200) }
        );

        $(".paginacao").hover(
            function() { $(".paginacao span").stop().animate({ "paddingLeft": "5px","paddingRight": "5px", }, 200) },
            function() { $(".paginacao span").stop().animate({ "paddingLeft": "0px","paddingRight": "0px",  }, 200) }
        );

        $("#header .menu li a").hover(
          function() { $(this).stop().animate({ "paddingLeft": "20px", "paddingRight": "30px" }, 200); },
          function() { $(this).stop().animate({ "paddingLeft": "05px", "paddingRight": "10px" }, 500); }
        );

        $(".slider.home #nextBtn a").hover(
          function() { $(this).stop().animate({ "Top": "220px" }, 200); },
          function() { $(this).stop().animate({ "Top": "215px" }, 500); }
        );

/*
        $("#representantes .content .tabela .dados.line").hover(
          function() { $(this).stop().animate({ "backgroundColor": "#f5f5f5" }, 200); },
          function() { $(this).stop().animate({ "backgroundColor": "none" }, 500); }
        );
*/  
        $(".slider").easySlider();

        // set all input.text default value according to alt attribute
        $(".refill").each(function() {
            $(this).val($(this).attr("title"));
        });

        // clear input.text on focus, if still in default
        $(".refill").focus(function() {

            if ($(this).val() == $(this).attr("title")) {
                $(this).val("");
            }
        });

        // if field is empty afterward, add text again
        $(".refill").blur(function() {
            if ($(this).val() == "") {
                $(this).val($(this).attr("title"));
            }
        });
        
    });
})(jQuery);

