$(function(){
		   
	$(".post img").fadeTo(300, 0.5);
	
	var gcolor = $.cookie("bcolor");
	if(gcolor==null){
	 gcolor="#222";
	}
    $("body").before("<style> a { color:" + gcolor + ";} </style>");
    //$("body").css({ background: gcolor });
    $("a").css({ color: gcolor });
    $(".wp-pagenavi").css({color:gcolor});
    //$("textarea,input").css({"border-color":gcolor,"color":gcolor});
    $(".color_sel ul li").click(function()
        {
        var now_color = $(this).attr("class");
        $.cookie("bcolor", now_color);
        $("body").before(
            "<style> a { color:" + now_color + ";} </style>");
        //$("body").css({ background: now_color });
        $("a").css({ color: now_color });
        $(".wp-pagenavi").css({color:now_color});
        //$("textarea,input").css({"border-color":now_color,"color":now_color});
		$(".post").hover(function(){
										$(this).css({background:now_color});
										$(this).find("a").css({ color: "#000000" });
										$(this).find("img").fadeTo(300,1.0);
										$(this).find(".entry-content").slideDown();
										$(this).find(".tit").css({"font-size":"18px","padding-top":"6px"});
										},
										function(){
										$(this).css({background:"#000000"});
										$(this).find("a").css({ color: now_color });
										$(this).find("img").fadeTo(300,0.5);
										$(this).find(".entry-content").slideUp();
										$(this).find(".tit").css({"font-size":"14px","padding-top":"0px"});
										})
		
        }) 

		$(".post").hover(function(){
										$(this).css({background:gcolor});
										$(this).find("a").css({ color: "#000000" });
										$(this).find("img").fadeTo(300,1.0);
										$(this).find(".entry-content").slideDown();
										$(this).find(".tit").css({"font-size":"18px","padding-top":"6px"});
										},
										function(){
										$(this).css({background:"#000000"});
										$(this).find("a").css({ color: gcolor });
										$(this).find("img").fadeTo(300,0.5);
										$(this).find(".entry-content").slideUp();
										$(this).find(".tit").css({"font-size":"14px","padding-top":"0px"});
										})
		
		$(".end").prev().addClass("last");
	
})
