// JavaScript Document

$(document).ready(function(){
    $("#category_list .box, #category_list .boxR").each(function(){
        $(this).hover(
            function(){
                $(this).css({"border":"1px solid #ededed"}); 
            },
            function(){
                $(this).css({"border":"1px solid #fff"}); 
            }
        );
        
        $(this).click(function(){
            document.location = $(this).find("a").attr("href");
        });
    });
    
    $(".listLinks li").hover(
        function(){
            $(this).stop().animate({"border-left-width": "10px"},200);
            $(this).find("a").stop().animate({marginLeft: "25px"},200);
        },
        function(){
            $(this).stop().animate({"border-left-width": "0px"},400);
            $(this).find("a").stop().animate({marginLeft: "10px"},400);
        }
    );
    
    $("a[href='#']").each(function(){$(this).removeAttr('href')});
    
    $("#tagCloud .tagatelic").tagcloud({type:"list",sizemin:14,sizemax:40,power:.3, colormax:"BD002B", colormin:"BD002B", height:300});
    $("#tagCloud .tagatelic").css({"text-align": "center"});
    $("#tagCloud .tagatelic li a").each(function(){
        
        var colors    = [ "#BD002B", "#666", "#03541E"];
        var randColor = colors[Math.floor(Math.random() * colors.length)];
        $(this).css({"color": "" + randColor, "font-weight": "bold", "text-decoration":"none"});
    });
});

