$(document).ready(function(){
    $("#colaboradores-carousel").jCarouselLite({btnNext:".next", btnPrev:".prev", visible:5});
    $("#colaboradores").hide();
    $("#colaboradores").css('margin-top', 0);
    $.prettySociable();
    var icon_path = '/blog2010/wp-content/themes/cafundo/images/prettySociable/large_icons/';
    $.prettySociable.settings.websites.facebook.icon = icon_path + 'facebook.png';
    $.prettySociable.settings.websites.twitter.icon = icon_path + 'twitter.png';
    $.prettySociable.settings.websites.delicious.icon = icon_path + 'delicious.png';
    $.prettySociable.settings.websites.digg.icon = icon_path + 'digg.png';
    $.prettySociable.settings.websites.linkedin.icon = icon_path + 'linkedin.png';
    $.prettySociable.settings.websites.reddit.icon = icon_path + 'reddit.png';
    $.prettySociable.settings.websites.stumbleupon.icon = icon_path + 'stumbleupon.png';
    $.prettySociable.settings.websites.tumblr.icon = icon_path + 'tumblr.png';
    var cookie = $.cookies.get('_cafundo_session');
    if(cookie == null) {
        $.cookies.set('_cafundo_session', {'theme':$('link[alt=cafundo]').attr('href')});
    }
    Cufon.replace('.museo');
    $(".delete-me").remove();
    $(".box  span , .featured  span").hover(
        function() {
            $(".box  span .testmdsoft , .featured  span").stop().animate({"opacity": "0.2"}, "normal");
        },
        function() {
            $(".box  span .testmdsoft , .featured  span").animate({"opacity": "1"}, "normal");
    });
	
	$(".box2  span , .featured  span").hover(
        function() {
            $(".box2  span .testmdsoft , .featured  span").stop().animate({"opacity": "0.2"}, "normal");
        },
        function() {
            $(".box2 span .testmdsoft , .featured span").animate({"opacity": "1"}, "normal");
    });
	
	$(".box3 span , .featured span").hover(
        function() {
            $(".box3 span .testmdsoft , .featured span").stop().animate({"opacity": "0.2"}, "normal");
        },
        function() {
            $(".box3 span .testmdsoft , .featured span").animate({"opacity": "1"}, "normal");
    });
	
	$(".box4 span , .featured span").hover(
        function() {
            $(".box4 span .testmdsoft , .featured span").stop().animate({"opacity": "0.2"}, "normal");
        },
        function() {
            $(".box4 span .testmdsoft , .featured span").animate({"opacity": "1"}, "normal");
    });
	
	$(".box5 span , .featured span").hover(
        function() {
            $(".box5 span .testmdsoft , .featured span").stop().animate({"opacity": "0.2"}, "normal");
        },
        function() {
            $(".box5 span .testmdsoft , .featured span").animate({"opacity": "1"}, "normal");
    });
	
	
    $("#on-off li a").click(function() { 
        $.cookies.set('_cafundo_session', {'theme':$(this).attr('href')});
        window.location.reload();
        return false;
    });
    $('#search').focus(function() {
        if($(this).val() == 'Busca') { $(this).val(''); }
    });
    $('#search').blur(function() {
        if($(this).val() == '') { $(this).val('Busca'); }
    });
    $(".categorias-btn").click(function(){
        $(".arquivos-btn").removeClass("active-arquivos");
        $(".colaboradores-btn").removeClass("active-colaboradores");
        $(this).toggleClass("active-categorias");
        $("#arquivos").slideUp("slow", function() {
            $("#colaboradores").slideUp("slow", function() {
                $("#categorias").slideToggle("slow");
            })
        });
        return(false);
    });
    $(".arquivos-btn").click(function(){
        $(".categorias-btn").removeClass("active-categorias");
        $(".colaboradores-btn").removeClass("active-colaboradores");
        $(this).toggleClass("active-arquivos");
        $("#categorias").slideUp("slow", function() {
            $("#colaboradores").slideUp("slow", function() {
                $("#arquivos").slideToggle("slow");
            })
        });
        return(false);
    });
    $(".colaboradores-btn").click(function(){
        $(".categorias-btn").removeClass("active-categorias");
        $(".arquivos-btn").removeClass("active-arquivos");
        $(this).toggleClass("active-colaboradores");
        $("#categorias").slideUp("slow", function() {
            $("#arquivos").slideUp("slow", function() {
                $("#colaboradores").slideToggle("slow");
            })
        });
        return(false);
    });
});

